Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Automation error (-2147418107) (Read 11698 times)
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Automation error (-2147418107)
Aug 19th, 2006 at 5:34pm
Print Post  
Hello, i am having an Automation Error (-2147418107) when using a FlowChartControl in a Visual Basic class module. My problem is that i can't exactly figure out where the problem is. The error happens when i try to select some items with the mouse by drawing an rectangle around the items. The first time(sometimes more) it seems to be working without any errors, but then the Automation error will pop up. Thanks in advance
Sunny
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #1 - Aug 21st, 2006 at 5:39am
Print Post  
Hi,

Do you handle any events related to changing the selection?

Stoyan
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #2 - Aug 21st, 2006 at 9:04am
Print Post  
Hi, yes in deed we do. Are there any we should be careful with? We use following event:
DragDrop
DragOver
MouseDown
MouseMove
MouseUp. But what i suspect is the FLOWCHARTLibCtl.table, because everytime you draw a frame across it, starting outside of the table the problem occurs.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #3 - Aug 21st, 2006 at 9:55am
Print Post  
Could you email me your compiled .exe file - we'll step through the flowchart code to see what might go wrong.
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #4 - Aug 23rd, 2006 at 8:18am
Print Post  
Hi,
i guess this would be a problem since our application has a lot of references to other own build .dll's. Would a crash dump be helpful?
Sunny
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #5 - Aug 23rd, 2006 at 8:50am
Print Post  
Please send me the dlls too, or even better an MSI installer package.
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #6 - Aug 23rd, 2006 at 9:43am
Print Post  
hi, sorry i can't. But here a part of the WinDgb which might be helpful:
(f50.97c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=052c3119 ecx=052c8290 edx=0565cf38 esi=052c2ac8 edi=052c4e30
eip=051704a0 esp=0012eb7c ebp=052c8498 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206
FlowChartPro!DllUnregisterServer+0x141f0:
051704a0 ff504c          call    dword ptr [eax+4Ch]  ds:0023:0000004c=????????
0:000> g
(f50.97c): Access violation - code c0000005 (!!! second chance !!!)
eax=00000000 ebx=052c3119 ecx=052c8290 edx=0565cf38 esi=052c2ac8 edi=052c4e30
eip=051704a0 esp=0012eb7c ebp=052c8498 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
FlowChartPro!DllUnregisterServer+0x141f0:
051704a0 ff504c          call    dword ptr [eax+4Ch]  ds:0023:0000004c=????????
0:000> g
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #7 - Aug 23rd, 2006 at 12:01pm
Print Post  
I don't have any idea what to do with that trace. What programming language are you using for this application? If it's C++, make sure you don't Release() the reference count of some diagram item more times than you AddRef() it. That would free the item memory, even if the flowchart still holds a reference to the item, which could result in an AccessViolation.
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #8 - Aug 23rd, 2006 at 12:25pm
Print Post  
ok sorry...i did a sample and just sent it to you...and i am using Visual Basic....
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #9 - Aug 23rd, 2006 at 1:10pm
Print Post  
I think the problem comes from the DoEvents call in SelectionChanged event handler, but I cannot build the project to verify that.

The problem is that the flowchart does not expect to handle any Windows WM_* messages before the WM_BUTTONUP handler exits. Calling DoEvents from the SelectionChanged event makes Windows call the message processing methods for a bunch of WM_PAINT and other messages, and that causes a problem when the WM_BUTTONUP handler hasn't returned yet.

So try running that without the DoEvents call.
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #10 - Aug 23rd, 2006 at 1:18pm
Print Post  
Hi,
you are right with the DoEvents, but this problem also occurs if you need to do something in the SelectionChange Event which takes a little bit more time like getting the selected Items and then setting the toolbar and then setting the Properties in a Properties Window.
Sunny
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #11 - Aug 23rd, 2006 at 1:33pm
Print Post  
Probably your methods that set the toolbar or the properties in the Properties Windows call DoEvents too?
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #12 - Aug 23rd, 2006 at 1:55pm
Print Post  
i checked it, no the functions don't use DoEvents. The only thing that could be a problem is that  we try to set the active table on top (ZTop).
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Automation error (-2147418107)
Reply #13 - Aug 23rd, 2006 at 4:08pm
Print Post  
This works fine in my test project:

Private Sub fcx_SelectionChanged()
    If Not fcx.ActiveTable Is Nothing Then
       fcx.ActiveTable.ZTop
    End If
End Sub

Maybe the property list control that you use calls DoEvents?
  
Back to top
 
IP Logged
 
SunnyT.
YaBB Newbies
*
Offline



Posts: 10
Joined: Aug 19th, 2006
Re: Automation error (-2147418107)
Reply #14 - Aug 24th, 2006 at 5:55am
Print Post  
Hi, this is out of my control, but if there are any RaiseEvents the application would surely crash on the first run, right? But most of the time it takes more than one time to crash the app.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint