External library kills UI when closing script editor

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
3 posts • Page 1 of 1
weirdal
Posts: 23
Joined: Thu Mar 12, 2015 10:37 am

External library kills UI when closing script editor

Post by weirdal » Wed Sep 16, 2020 1:55 pm

Hi again

As described in this other post of mine, I am implementing a CTRL extension project. The resulting DLL is loaded into GEDI UI-Manager at start-up.
Every time when I close the script editor of a panel that uses the DLL, the whole UI manager (GEDI) crashes.

Output as follows:

Code: Select all

WCCILevent   (0), 2020.09.16 15:53:30.260, SYS,  WARNING,    39, Connection lost, MAN: (SYS: 5 Ui -num 10 CONN: 1), Connection reset by peer (10054)
WCCILdata    (0), 2020.09.16 15:53:30.260, SYS,  WARNING,    39, Connection lost, MAN: (SYS: 5 Ui -num 10 CONN: 1), Connection reset by peer (10054)
Visual Studio output:

Code: Select all

Critical error detected c0000374
WCCOAui.exe hat einen Haltepunkt ausgelöst.

Ausnahme ausgelöst bei 0x00007FF93844ED79 (ntdll.dll) in WCCOAui.exe: 0xC0000374: A heap has been corrupted (Parameter: 0x00007FF9384B77F0).
Ausnahmefehler bei 0x00007FF93844ED79 (ntdll.dll) in WCCOAui.exe: 0xC0000374: A heap has been corrupted (Parameter: 0x00007FF9384B77F0)
Callstack:

Code: Select all

>	ntdll.dll!RtlReportFatalFailure()	Unbekannt
 	ntdll.dll!RtlReportCriticalFailure()	Unbekannt
 	ntdll.dll!RtlpHeapHandleError()	Unbekannt
 	ntdll.dll!RtlpHpHeapHandleError()	Unbekannt
 	ntdll.dll!RtlpLogHeapFailure()	Unbekannt
 	ntdll.dll!RtlpFreeHeapInternal()	Unbekannt
 	ntdll.dll!RtlFreeHeap()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef86a424()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef824ae3()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef824e67()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef824a69()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef839836()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef839479()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef837657()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef82b43c()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef8373d6()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef83c21d()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef83c0c2()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef83c527()	Unbekannt
 	Qt5WebKitWidgets.dll!00007ff8ef83a5cc()	Unbekannt
 	WCCOAui.exe!00007ff6b2f64d35()	Unbekannt
 	Qt5Core.dll!000000005d21764d()	Unbekannt
 	Qt5Widgets.dll!000000005d75591d()	Unbekannt
 	WCCOAui.exe!00007ff6b2ead005()	Unbekannt
 	Qt5Core.dll!000000005d21764d()	Unbekannt
 	Qt5Widgets.dll!000000005d75591d()	Unbekannt
 	WCCOAui.exe!00007ff6b2ead1c4()	Unbekannt
 	Qt5Core.dll!000000005d21a365()	Unbekannt
 	Qt5Widgets.dll!000000005d75b8ba()	Unbekannt
 	Qt5Widgets.dll!000000005d8796cb()	Unbekannt
 	Qt5Widgets.dll!000000005d738490()	Unbekannt
 	Qt5Widgets.dll!000000005d737377()	Unbekannt
 	Qt5Core.dll!000000005d1f5f69()	Unbekannt
 	Qt5Core.dll!000000005d1f7dd2()	Unbekannt
 	qwindows.dll!00007ff8ea96fbcf()	Unbekannt
 	Qt5Core.dll!000000005d23eca5()	Unbekannt
 	[Externer Code]	
 	Qt5Core.dll!000000005d23e346()	Unbekannt
 	qwindows.dll!00007ff8ea96fba9()	Unbekannt
 	Qt5Core.dll!000000005d1f2103()	Unbekannt
 	Qt5Core.dll!000000005d1f4ca4()	Unbekannt
 	WCCOAui.exe!00007ff6b2e56108()	Unbekannt
 	WCCOAui.exe!00007ff6b323df94()	Unbekannt
 	WCCOAui.exe!00007ff6b3239fd7()	Unbekannt
 	[Externer Code]
It does not happen when I run the script, only when closing the script editor window.
Any suggestions?

gschijndel
Posts: 174
Joined: Tue Jan 15, 2019 2:12 pm

Re: External library kills UI when closing script editor

Post by gschijndel » Tue Sep 22, 2020 11:25 am

Looks like some internal pointer is stored in the control extension, which content is deleted on closing the script editor.

weirdal
Posts: 23
Joined: Thu Mar 12, 2015 10:37 am

Re: External library kills UI when closing script editor

Post by weirdal » Wed Sep 23, 2020 11:42 am

The external library runs fine without errors when used by a separate visual studio console project.
As soon as the library is loaded as a dependency by the control extension dll, the heap error occurs when closing the script editor, resulting in the UI manager crashing.

The external library uses a number of boost::intrusive_ptr<T> instances, which should be automatically deleted on termination of the program.
The control extension dll itself has no internal pointer variables, just a regular private member instance of an external library's class.

What happens in the background when the script editor is closed, anyway?

I might add, that the UI even crashes when I close the script editor of a script that has nothing to do with and does not use the control extension (I am including the ctrl externsion with a #uses statement at the script start, not in the config). As far as my understanding goes, the UI process (GEDI, in this case) loads the control extension dll at startup. At this time, also the constructor of the external library's class is called.
I would assume that closing a script editor triggers the UI process to unload and reload external components.

Is there a way to prevent the UI process from reloading on closing a script editor?

Post Reply
3 posts • Page 1 of 1