This is very frustrating for me and my clients.
We are experiencing random crashes with built apps in Windows 10.
Happens in 32 as well as 64 bit apps - currently building with Xojo2019r1.1.
No crash dialog - app just disappears.
Often happens after app or window closes - but randomly.
Any ideas?
Use WinDbg to launch your realbasic app:
File/Open Executable… then choose your realbasic app’s EXE.
Run your app normally until it crashes
Note that winDbg may stop at a few places – just hit F5 key (“Debug/Go” menu) to keep going. Watch the log and you’ll see the crash. WinDbg may complain about “missing symbols” which you can ignore typically. (you can download more symbols which lets you debug crashes inside Win32 API itself, but that’s usually not necessary).
For more debugging goodness, insert calls to
System.DebugLog currentMethodName
in your realbasic code
These debug statements will be included in the WinDbg log, which can help you figure out what’s going wrong.
WOOOOO! I think I finally found a solution for these random Windows 10 crashes on my MDI app:
At the end of my document window’s close event I put:
prevent crash on Windows when closing
dim u as integer = ControlCount-1
for x as integer = u downto 0
if control(x)<>nil then control(x).Close
next
I’ve been running the app on Windows 10 for hours now - no crashes! Maybe it’s a timing issue where Xojo and the OS are fighting over unwinding controls in the closing window. The solution is to beat them to it.
Nice workaround. My guess is that one of your controls is causing trouble. A common mistake is using a circular reference which breaks reference counting, e.g. the control has a pointer to the Window and the Window has a pointer to the Control, so when the window tries to close it can’t.
Another common mistake is accessing properties of a control or window during the window.close operation - you may be accessing a control which is already gone.