wxMaxima-developers / wxmaxima

A gui for the computer algebra system Maxima built with wxWidgets
https://wxMaxima-developers.github.io/wxmaxima/
Other
469 stars 98 forks source link

Strange wxMaxima crash with 2 errors (0x80000003 and 0xc000041d) #1607

Open Stargate38 opened 2 years ago

Stargate38 commented 2 years ago

If I leave wxMaxima open for a few minutes (with or without input), it crashes with these errors in Event Viewer:

Faulting application name: wxmaxima.exe, version: 0.0.0.0, time stamp: 0x60a2c980
Faulting module name: wxmaxima.exe, version: 0.0.0.0, time stamp: 0x60a2c980
Exception code: 0x80000003
Fault offset: 0x00000000007f98d8
Faulting process id: 0xfb0
Faulting application start time: 0x01d7d4b7251cc695
Faulting application path: C:\Programs\wxMaxima-21.05.1\bin\wxmaxima.exe
Faulting module path: C:\Programs\wxMaxima-21.05.1\bin\wxmaxima.exe
Report Id: eb824ae0-973e-4675-b028-6865e9226137
Faulting package full name: 
Faulting package-relative application ID: 

Faulting application name: wxmaxima.exe, version: 0.0.0.0, time stamp: 0x60a2c980
Faulting module name: wxmaxima.exe, version: 0.0.0.0, time stamp: 0x60a2c980
Exception code: 0xc000041d
Fault offset: 0x00000000007f98d8
Faulting process id: 0xfb0
Faulting application start time: 0x01d7d4b7251cc695
Faulting application path: C:\Programs\wxMaxima-21.05.1\bin\wxmaxima.exe
Faulting module path: C:\Programs\wxMaxima-21.05.1\bin\wxmaxima.exe
Report Id: d2668614-bd28-4b15-a26c-37632bf569e8
Faulting package full name: 
Faulting package-relative application ID: 

I couldn't get the formatting buttons to work at first (nothing would happen when I clicked them in Basilisk, but they work fine in Firefox). Not sure why they only work in certain browsers.

Is there ANY way to get it to stop crashing, or is this some unknown bug? In the most recent case, I walked away from my PC for a few minutes, and it happened before I returned, so I didn't see anything that lead up to the crash. Here's the build info (it crashed again just after I copied it, and it hadn't even been a minute since I started it):

build_info(version="branch_5_44_base_251_g8ee96a27d",timestamp="2021-02-08 00:00:04",host="x86_64-w64-mingw32",lisp_name="SBCL",lisp_version="2.0.0",maxima_userdir="C:/Users/user/maxima",maxima_tempdir="C:/Users/user/AppData/Local/Temp",maxima_objdir="C:/Users/user/maxima/binary/branch_5_44_base_251_g8ee96a27d/sbcl/2_0_0",maxima_frontend="wxMaxima",maxima_frontend_version="21.05.1_MSW")

Attached is a file that I had open at the time of said crash (rename from x_c.zip to x_c.wxmx). x_c.zip

gunterkoenigsmann commented 2 years ago

You don't happen to have a gdb64 debugger like the one from mingw64 installed? The debugger would automatically tell us in which line of the code the error resides instead of an address. Additionally it would tell us how you got there, which most of the times is more important than knowing the point the computer detected the error and finally gave up.

Currently no crashes are known to me. But with much luck your files allow to trigger it on my computer.

gunterkoenigsmann commented 2 years ago

You don't happen to have a gdb64 debugger like the one from mingw64 installed? The debugger would automatically tell us in which line of the code the error resides instead of an address. Additionally it would tell us how you got there, which most of the times is more important than knowing the point the computer detected the error and finally gave up.

Currently no crashes are known to me. But with much luck your files allow to trigger it on my computer.

Stargate38 commented 2 years ago

Here's a debug output: wxMaxima error debug.txt

gunterkoenigsmann commented 2 years ago

Wow... ...you are the kind of person one always hopes to encounter when in need of debug data.

And the crash is indeed strange: wxWidgets gets a power event from MS Windows and since wxMaxima didn't claim to be interested in this kind of event that event is never forwarded to its code( I now wonder if we should autosave the worksheet on this occasion). Then something in wxWidgets somehow causes a crash - and before all that wxWidgets encounters an invalid format string. But it doesn't tell me where. Let's hope I find a way of finding out what caused this message.

For the original error: Will tomorrow try to tell wxWidgets that I want to handle the power event. Witch much luck that is enough to avoid the crashing path of wxWidgets code.

gunterkoenigsmann commented 2 years ago

I've looked into power events. Seems like wxWidgets gets informed, when

I have now only told wxWidgets that I am interested about the auto-save part, since for the others I have no ideas how to use them for anything that makes sense.

PBfordev commented 2 years ago

Which wxWidgets version was wxMaxima 21.05.1 using?

This looks similar to issue fixed in wxWidgets 3.1.5 (merged on Feb 24, 2021), caused by an invalid printf format specifier used in a debug message during an unknown power event: https://github.com/wxWidgets/wxWidgets/issues/19080

Stargate38 commented 1 year ago

It appears that the crash doesn't happen in 23.05.1. I've been running it for the past few minutes, and it hasn't shown any signs of crashing.