Skip to content

Improve crashlog with minidump#205

Merged
atsju merged 3 commits into
githubdoe:masterfrom
atsju:JST/minidump
Aug 4, 2025
Merged

Improve crashlog with minidump#205
atsju merged 3 commits into
githubdoe:masterfrom
atsju:JST/minidump

Conversation

@atsju

@atsju atsju commented Jul 16, 2025

Copy link
Copy Markdown
Collaborator

Close #203

This adds a minidump to all crashes.
Crashes from unhandled exception catched with std::set_terminate will have stacktrace and minidump.
Harsher crashes catched with SetUnhandledExceptionFilter with only show minidump as spdlog doesn't work during these crashes. To reproduce : open DFTFringe, load no wave front and click on tools -> wave front inspector

  • use SetUnhandledExceptionFilter to catch crashes that are not handled today
  • document how to use the minidump to exploit information
  • try exporting registry keys in case of crash

This PR should help us debug unexplained crashes.

Comment thread main.cpp
@atsju atsju marked this pull request as ready for review July 18, 2025 05:35
@atsju

atsju commented Jul 18, 2025

Copy link
Copy Markdown
Collaborator Author

This PR should probably be integrated in next release.

Hopefully I can test that the minidump contains good information before the release is published.

@gr5

gr5 commented Jul 18, 2025

Copy link
Copy Markdown
Collaborator

I plan to make sure this builds fine the way Dale and I build. today or tomorrow.

@atsju

atsju commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator Author

UPDATE: I tried to analyse my minidump with windbg tool. It gives some information about the exception but because we build with mingw and not MSVC, the .debug file cannot be used by windbg to fully unveil it's potential. However the minidump contains a stacktrace that we could possibly analyse with addr2line (for the "wave front inspector" crash there was no meaningful info so I'm really not sure)

I see 2 path of action:

  • integrate this PR and keep minidump as it doesn't harm.
  • remove the minidump thing. But keep SetUnhandledExceptionFilter to at least try to log something in a text file and not have silent crash (spdlog doesn't work in this context)

I would lean for the first. What do you think ?

@gr5

gr5 commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

I don't have an opinion so I'll trust you to choose.

@gr5

gr5 commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator

@atsju did you see my comment above?

@atsju

atsju commented Jul 20, 2025

Copy link
Copy Markdown
Collaborator Author

@atsju did you see my comment above?

I did see. I did not decide.
On one side it doesn't harm. On the other side, it's one more rarely used (and thus untested) feature.

Let's keep it and see if it brings something on futur crashes

@gr5

gr5 commented Jul 24, 2025

Copy link
Copy Markdown
Collaborator

Maybe I wasn't clear in the comments above. This won't compile for me because you added something to the "normal" .pro file but forgot to add it to the dale .pro file. That's why I haven't approved this PR yet.

@atsju

atsju commented Jul 24, 2025

Copy link
Copy Markdown
Collaborator Author

Maybe I wasn't clear in the comments above. This won't compile for me because you added something to the "normal" .pro file but forgot to add it to the dale .pro file. That's why I haven't approved this PR yet.

I get it now. I will fix it.

Comment thread DFTFringe.pro
LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_highgui460
LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgcodecs460
LIBS += -L..\build_openCV\install\x64\mingw\bin -llibopencv_imgproc460
LIBS += -ldbghelp # for SetUnhandledExceptionFilter

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this line to DFTFringe_Dale.pro

After doing that this PR builds just fine in qtcreator.

@gr5

gr5 commented Jul 25, 2025

Copy link
Copy Markdown
Collaborator

Okay so I made the same mistake dale did. I did an inline comment among the code changes and wondered why Julien ignored it. Anyway he took care of it so this is ready to merge.

@atsju atsju merged commit e93c358 into githubdoe:master Aug 4, 2025
8 checks passed
@atsju atsju deleted the JST/minidump branch August 4, 2025 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve crashlog

2 participants