ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 [IEvolution] Access violation when lost focus
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jfernandez

Spain
6 Posts

Posted - Jul 04 2012 :  04:01:45  Show Profile  Reply
Hello,

First of all , i'm sorry by my bad english.

I have an application with a form that include an ieviewer object and an iemulti object.

When i call the showdialog method, if i change the focused window to other application, my application trigger the win32 "0x0000005 access violation exception".

I attach the stack output, in this stack you can see that the exception is triggered when the user32 dll send a message to iecore.dll


	00000000()	
 	iecore.dll!0823da1e() 	
 	[Frames below may be incorrect and/or missing, no symbols loaded for iecore.dll]	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	iecore.dll!0823da1e() 	
 	user32.dll!gapfnScSendMessage()  + 0x332 bytes	
 	user32.dll!GetThreadDesktop()  + 0xd7 bytes	
 	user32.dll!GetThreadDesktop()  + 0x185 bytes	
 	user32.dll!GetThreadDesktop()  + 0x1e1 bytes	
 	ntdll.dll!KiUserCallbackDispatcher()  + 0x2e bytes	
 	user32.dll!PeekMessageW()  + 0x197 bytes	
 	[Managed to Native Transition]	
 	System.Windows.Forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(int dwComponentID, int reason = 4, int pvLoopData = 0) + 0x17d bytes	
 	System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason = 4, System.Windows.Forms.ApplicationContext context = {System.Windows.Forms.Application.ModalApplicationContext}) + 0x177 bytes	
 	System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes	
 	System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form) + 0x33 bytes	
 	System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner) + 0x370 bytes	
 	System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog() + 0x7 bytes	
>	VcClient.exe!sdm.ReaDoc.VcClient.frmMain.ShowCorreccion() Line 125 + 0xa bytes	Basic




when I close the Dialog, calling the dispose the ieviewer and iemultiobject, the exception persist in the main form (the objects aren't destroy correctly) and if i launch a windows explorer the application crash with a accessviolationexception.

some idea?

Best regards



fab

1310 Posts

Posted - Jul 04 2012 :  08:07:56  Show Profile  Reply
Hello,
I cannot replicate, at least using last version.
Which IEvolution version are you using?
Go to Top of Page

jfernandez

Spain
6 Posts

Posted - Jul 04 2012 :  09:10:56  Show Profile  Reply
Hello Fabrizio, i'm using the 4.1.2, but with the 3.1.2 is equal.

The system is windows 7 x64.
The control that contains ieviewer and iemulti is inserted in a dockpanel form
http://sourceforge.net/projects/dockpanelsuite/
Go to Top of Page

fab

1310 Posts

Posted - Jul 04 2012 :  11:17:12  Show Profile  Reply
Hello,
can you replicate without dockpanel?
I just retested in Windows 7 x64, and still cannot replicate.
Go to Top of Page

jfernandez

Spain
6 Posts

Posted - Jul 06 2012 :  01:18:03  Show Profile  Reply
I'm trying to do an example application to replicate the problem and upload its to you


Regards

Go to Top of Page

jfernandez

Spain
6 Posts

Posted - Jul 11 2012 :  01:37:45  Show Profile  Reply
Hello Frabrizio

I found the bug,

If i do a new instance of a memorystream object

"dim ms as new memorystream()"

and i save a TIFF multipage

IEMulti1.ImageList.SaveImages(ms, IEFileFormats.TIFF)

before of exit from the method, i'm calling the dispose method of IEMulti1 object, and next the method return the memorystream.

This memorystream object throw the Access Memory Exception when i try to read him.

i've fixed it doing a new memorystream object with the "writable" and "publicyvisible" flags assigned to true

Dim buf(ms.Length - 1) As Byte
ms.Read(buf, 0, buf.Length)
Dim aux As New MemoryStream(buf, 0, buf.Length, True, True)
Return Aux


Thanks for your help,

Best Regards



Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: