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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 [IEvolution] Access violation when lost focus

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jfernandez Posted - Jul 04 2012 : 04:01:45
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



5   L A T E S T    R E P L I E S    (Newest First)
jfernandez Posted - Jul 11 2012 : 01:37:45
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



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


Regards

fab Posted - Jul 04 2012 : 11:17:12
Hello,
can you replicate without dockpanel?
I just retested in Windows 7 x64, and still cannot replicate.
jfernandez Posted - Jul 04 2012 : 09:10:56
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/
fab Posted - Jul 04 2012 : 08:07:56
Hello,
I cannot replicate, at least using last version.
Which IEvolution version are you using?