Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
cpav  
#1 Posted : Wednesday, March 19, 2008 10:31:51 PM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

Hi,

We reproduced an error on a vb 2005 sample that we attach(we do not attach GM dll files so it gets smaller to download). The problem is that while we try to get the frame of the image, we get this error:

System.ArgumentOutOfRangeException = {"Width of bitmap should be above zero.

Parameter name: width"}

This happens on this sample project, in our TRUE application we get the same error but not for the WIDTH, but for the HEIGHT, so we suppose is it likely the same problem.

Please first unzip the file and put the .jpg, tiff and bmp files on the root (c:\). Open the solution and run it. On form1, press the first button and a new form, form2 opens and you can see the images. After without minimazing, goto form1, and press the second button. Its ok, new images added in form2. Same things goes for button 3. In this case there is NO problem.

Now please try the same thing from the beginning, press first button BUT NOW MINIMIZE form2. While form2 is minimized press the second button on form1, and here starts the problem. You will notice the error on line 263.

Please ex message and also see that variable 'varIsNotEmpty' has values and its width and height value is more than zero but we still have error about this..

Is there something we have to change, or is it that there is probably a 'smart' bug?

cpav

File Attachment(s):
bitmapHeightWidthError.zip (1,009kb) downloaded 3 time(s).
Alex Kon  
#2 Posted : Monday, March 24, 2008 2:48:00 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hi,

Thank you for such detailed report. Yes, I have to confirm that we have an issue in WinControls. The reason is inside BitmapViewer class implementation. We will fix it in future releases.

By now you can use the following workaround to avoid the exception and be able to continue your work:

Form2.vb, code at the line 260

Code:

Try
        varIsNotEmpty = bitmapViewerMainView.Bitmap
        'Original version:
        'frame.GetBitmap(bitmapViewerMainView.Bitmap)
        'Workaround is to introduce interim bitmap:
        Dim interimBmp As New Aurigma.GraphicsMill.Bitmap()
        frame.GetBitmap(interimBmp)
        bitmapViewerMainView.Bitmap = interimBmp
Catch ex As Exception
        Stop
End Try

cpav  
#3 Posted : Monday, March 24, 2008 11:35:43 PM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

Well, thanks again Alex, now it works fine!:d/

But maybe in this way, we load continuously things in memory "Dim interimBmp As New Aurigma.GraphicsMill.Bitmap()" that we could avoid? Or maybe i am wrong on this?

I hope new release will come up pretty soon and solve this problem, so i can use my initial code with "frame.GetBitmap(bitmapViewerMainView.Bitmap)".

cpav  
#4 Posted : Tuesday, March 25, 2008 12:22:47 AM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

Well, after more testing Alex, there is another problem. This is new problem and it occurs because of the proposed change.

Using

Code:
Dim interimBmp As New Aurigma.GraphicsMill.Bitmap()  
frame.GetBitmap(interimBmp)
bitmapViewerMainView.Bitmap = interimBmp

instead of initial

Code:
frame.GetBitmap(bitmapViewerMainView.Bitmap)

makes the control(bitmapViewerMainView.Bitmap) to lose its ability to understand .CanUndo and .CanRedo operations, and i think in general it looses all operations.

When we use the initial code, and we apply 1 or 2 or more filters, then the buttons Undo and Redo we have on a toolbar, are enabled or disabled correctly and working perfect.

After using proposed solution, we apply 1 or 2 or more filters, and the Undo and Redo buttons are always disabled.

We use this simple code to check the Undo,Redo ability

Code:
Private Sub enableDisableUndoRedo()
            If bitmapViewerMainView.Bitmap.CanUndo = True Then
                toolbarUndo.Enabled = True
            Else
                toolbarUndo.Enabled = False
            End If
            If bitmapViewerMainView.Bitmap.CanRedo = True Then
                toolbarRedo.Enabled = True
            Else
                toolbarRedo.Enabled = False
            End If
    End Sub

As a result we altered the code to our initial, and the problem with Width/Height now remains.

Edited by user Wednesday, March 26, 2008 8:52:46 PM(UTC)  | Reason: Not specified

Alex Kon  
#5 Posted : Tuesday, March 25, 2008 6:22:41 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Yes, I understand your situation. Could you submit case with this problem? We will provide you with updated version of Graphics Mill for .NET.

Edited by user Thursday, May 22, 2008 2:09:48 PM(UTC)  | Reason: Not specified

cpav  
#6 Posted : Monday, March 31, 2008 3:54:09 AM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

Well, i have send to you Alex, a PM...did you get it?

And i also send e-mail to [email removed], but not get any reply yet...

i am not so sure if you or the [email removed] get the PM and the e-mail....

Please confirm..if you can....thanx

Edited by user Thursday, May 22, 2008 2:11:00 PM(UTC)  | Reason: Not specified

Alex Kon  
#7 Posted : Tuesday, April 1, 2008 7:20:31 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Yes, I got your private message, but I had no news from our support team. So I decided that you received the update. Sorry! I will check now where we've lost your request.

Edited by user Tuesday, April 1, 2008 7:21:13 PM(UTC)  | Reason: Not specified

Alex Kon  
#8 Posted : Tuesday, April 1, 2008 9:29:29 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Our guys said that they sent you an update yersterday. Please, let me know via private message whether you received it. I'm really sorry for delay!

cpav  
#9 Posted : Wednesday, April 2, 2008 3:42:44 PM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

Hi Alex...

well we received it from support. We have a small problem on how to do this, i guess we are doing something wrong.

The dlls are located at path C:\Program Files\Aurigma\ Graphics Mills 4.5 for .NET

2.0\Binaries

.

We kept all those files in a temp folder and we extracted the new dlls we received

at this path.

After this we open our project and rebuild it. We have :

Aurigma.GraphicsMill,

Aurigma.GraphicsMill.WinControls,

Aurigma.GraphicsMill.WinControls.VectorObjects

in References.

After this, we got the following new warning:

Warning 1

Found conflicts between different versions of the same dependent assembly.

And also when we run(F5) we get this error:

Quote:
System.InvalidOperationException was unhandled

Message="An error occurred creating the form. See Exception.InnerException for

details. The error is: Could not load file or assembly 'Aurigma.GraphicsMill.WinControls,

Version=4.5.3009.27623, Culture=neutral, PublicKeyToken=f4bbbf243f314012' or one

of its dependencies. The located assembly's manifest definition does not match the

assembly reference. (Exception from HRESULT: 0x80131040)"

Source="MyApp"

StackTrace:

at DocumentMan.My.MyProject.MyForms.Create__Instance__[T](T Instance) in

12d14f5d-a337-4978-8181-53493978a1071.vb:line 190

at DocumentMan.My.MyProject.MyForms.get_globalForm()

at DocumentMan.My.MyApplication.OnCreateMainForm() in C:\DEMO\DocumentMan\DocumentMan\My Project\Application.Designer.vb:line 35

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplica

tion

Model()

at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(

String[] commandLine)

at MyApp.My.MyApplication.Main(String[] Args) in 12d14f5d-a337-4978-8181-53493978a1071.vb:line 81

at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)

at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)

at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()

at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationCon

text activationContext, String[] activationCustomData)

at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationCon

text activationContext)

at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugIn

Zone()

at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.ThreadHelper.ThreadStart()

I guess something went wrong here and we did some wrong steps ?

cpav  
#10 Posted : Wednesday, April 2, 2008 3:57:26 PM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

IMPORTANT

I forget to mention that before rebuilding and running(F5), we selected the 3 Aurigma refences and we deleted them(since was the old ones). After this we added the references by browsing to the folder Binaries and selecting the 3 new extracted dlls.

cpav  
#11 Posted : Wednesday, April 2, 2008 5:35:08 PM(UTC)
cpav

Rank: Advanced Member

Groups: Member
Joined: 12/17/2007(UTC)
Posts: 49

Ok i fixed it. As i said..i was doing something wrong. By putting initial binaries to another folder, i put also .xml files so when i put the new dlls, the xml was missing. And also when running VS asked if i want to solve a version conflict about GM dlls automatically by doing something to app.config and i clicked Yes, so it working fine now
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.