I tried to port my app on Windows but got random crashes with no information provided by the IDE.
In the event log of Windows, I just have an information that the issue comes from XojoGUIFramework64.dll
I tried to download WinDbg Preview and attach the process to find the issue but I don’t have any clue.
I have a login window that open when the app start and there is no crash on this window, but when I access other windows, it start to crash randomly. Sometimes on the first window and sometimes after X min of use.
I have Windows 10 fully updated
I use plugins from einhugur (treeview, picturebuttons, datecontrol), the MBS plugins and the DataView from pidogSoftware
Here is the trace I get from WinDbg Preview. it’s just a sample but you can find the full trace here https://pastebin.com/qhYR5E7Q
(329c.2b48): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00007fff`0e523170 cc int 3
0:009> g
ModLoad: 00007ffe`f5880000 00007ffe`f5a25000 C:\\Windows\\WinSxS\\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.17763.1217_none_0f5935e9ade084a1\\Gdiplus.DLL
ModLoad: 00007ffe`ef1c0000 00007ffe`ef1c7000 C:\\Windows\\SYSTEM32\\RICHED32.DLL
ModLoad: 00007ffe`e9ef0000 00007ffe`e9f89000 C:\\Windows\\SYSTEM32\\RICHED20.dll
ModLoad: 00007ffe`c21c0000 00007ffe`c21d9000 C:\\Windows\\SYSTEM32\\USP10.dll
ModLoad: 00007ffe`f7980000 00007ffe`f79b9000 C:\\Windows\\SYSTEM32\\msls31.dll
ModLoad: 00007ffe`d2fa0000 00007ffe`d32d4000 C:\\Windows\\SYSTEM32\\msftedit.DLL
ModLoad: 00007ffe`e0320000 00007ffe`e049b000 C:\\Windows\\System32\\Windows.Globalization.dll
ModLoad: 00007ffe`de9b0000 00007ffe`dea0c000 C:\\Windows\\System32\\Bcp47Langs.dll
ModLoad: 00007ffe`e0740000 00007ffe`e076a000 C:\\Windows\\System32\\bcp47mrm.dll
ModLoad: 00007ffe`d2f70000 00007ffe`d2f99000 C:\\Windows\\SYSTEM32\\globinputhost.dll
ModLoad: 00007ffe`d6370000 00007ffe`d6386000 C:\\Windows\\system32\\OnDemandConnRouteHelper.dll
ModLoad: 00007fff`02290000 00007fff`0229b000 C:\\Windows\\SYSTEM32\\WINNSI.DLL
ModLoad: 00007fff`0b920000 00007fff`0b928000 C:\\Windows\\System32\SI.dll
ModLoad: 00007ffe`fa0a0000 00007ffe`fa0b6000 C:\\Windows\\SYSTEM32\\dhcpcsvc6.DLL
ModLoad: 00007ffe`fd110000 00007ffe`fd12c000 C:\\Windows\\SYSTEM32\\dhcpcsvc.DLL
ModLoad: 00007ffe`ef7c0000 00007ffe`ef857000 C:\\Windows\\SYSTEM32\\webio.dll
ModLoad: 00007fff`09a40000 00007fff`09b07000 C:\\Windows\\SYSTEM32\\DNSAPI.dll
ModLoad: 00007ffe`fd100000 00007ffe`fd10a000 C:\\Windows\\System32\\rasadhlp.dll
ModLoad: 00007ffe`f93c0000 00007ffe`f9439000 C:\\Windows\\System32\\fwpuclnt.dll
ModLoad: 00007fff`09790000 00007fff`09814000 C:\\Windows\\system32\\schannel.DLL
ModLoad: 00007ffe`cef90000 00007ffe`cefa5000 C:\\Windows\\SYSTEM32\\mskeyprotect.dll
ModLoad: 00007ffe`cf760000 00007ffe`cf784000 C:\\Windows\\system32\
cryptsslp.dll
ModLoad: 00007fff`098a0000 00007fff`098aa000 C:\\Windows\\SYSTEM32\\DPAPI.DLL
ModLoad: 00007ffe`d6370000 00007ffe`d6386000 C:\\Windows\\system32\\OnDemandConnRouteHelper.dll
(329c.266c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
XojoGUIFramework64!enableMenuItems+0xb26:
00007ffe`988ff0d6 ff5018 call qword ptr [rax+18h] ds:00000000`00000018=????????????????
0:000> g
(329c.266c): Access violation - code c0000005 (!!! second chance !!!)
XojoGUIFramework64!enableMenuItems+0xb26:
00007ffe`988ff0d6 ff5018 call qword ptr [rax+18h] ds:00000000`00000018=????????????????
0:000> g
(329c.266c): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
XojoGUIFramework64!enableMenuItems+0xb26:
00007ffe`988ff0d6 ff5018 call qword ptr [rax+18h] ds:00000000`00000018=????????????????
0:000> g
(329c.266c): Access violation - code c0000005 (!!! second chance !!!)
XojoGUIFramework64!enableMenuItems+0xb26:
00007ffe`988ff0d6 ff5018 call qword ptr [rax+18h] ds:00000000`00000018=????????????????
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\atlmfc.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\concurrency.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\cpp_rest.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\stl.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\Windows.Data.Json.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\Windows.Devices.Geolocation.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\Windows.Devices.Sensors.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\Windows.Media.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\windows.natvis'
NatVis script unloaded from 'C:\\Program Files\\WindowsApps\\Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe\\amd64\\Visualizers\\winrt.natvis'
Here are the stack I have on breakpoints in the WinDbg Preview
I searched the forum and tried to figure out what was the issue by disabling code regarding MacOS but can not find the issue.
It’s a very strange behaviour
At some point the windows app crash without any alert and even not catched by the system itself, where macOS app is full stable.
Pattern not found but seems to appear more frequently on a dev environment with less server resources
We use URL connection to fetch data
Just in case of you may have experienced same kind of issue !
For these types of crashes I would recommend creating a Feedback case and send us a link to where we can download the executable with steps to reproduce, and/or attach a minidump. Make note of what version of Xojo the executable was compiled with. The more recent the better of course.
This looks like a memory corruption in the heap.
It may not be related to what you just did before, but to something run earlier, where some code overwrote memory of something else.
Running with some tool to detect memory corruption may show what code writes behind the end of an allocated block.
Are you using 64 bit? Can you try compiling to a Win 32 bit version target? I gave up Xojo Win 64 targets waiting for stabilization, since it appeared.