BugSplat-Git / my-qt-crasher

😽🖥💥 Example MacOS, Windows, and Linux Qt application integrated with Crashpad.

Home Page:https://docs.bugsplat.com/introduction/getting-started/integrations/cross-platform/qt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No crashreport on windows 11

chilarai opened this issue · comments

I am trying to generate crash report logs on Windows 11 using qt 5.15.0 MSVC 2019 64bit. But it seems to crash without generating any log files and I cannot see any activity on app.bugsplat.com

Steps

  1. Cloned the repo on my desktop
  2. Build the application and run
  3. Clicked the button

I don't see any error on my Qt Creator console

Does it involve any more steps?

@chilarai are you using an ARM build of Windows 11? If so, x64 emulation is not an environment that Crashpad supports. We would have to look into adding support for ARM Windows. If you are using x64 I would expect you to see a crash report in our public "Fred" account.

@bobbyg603, I am pretty sure that I am using x64 version. Am I missing any more step?
Attaching screenshots for

  1. Configuration
    screenshot1

  2. Qt console after the application crash
    Screenshot2

@chilarai If you set a breakpoint on

return status;
what is the value of status?

If the value of status is 0, did crashpad_handler.exe get copied to the output directory successfully via the post build script?

Also, please note you can't generate crash reports while the debugger is attached (it intercepts signals), however you can do things like inspect values used to configure Crashpad.

The return value is true and yes the crashpad_handler.exe was copied with other relevant files

Screenshot

image

@chilarai what does the reports directory look like? are there any minidumps in the completed folder? what about other folders?

Nope. Nothing in the folders
Reports folder is empty and so is attachments

Is there any manual for crashpad_handler.exe by which I can test if its working properly on my system.. on my windows shell maybe?

@chilarai if you build crashpad on your local system it will output a bunch of tools at the root of the build output.

One of those tools that might help is called generate_dump. That might be a good place to start.

There is also a tool for testing [http uploads].(https://chromium.googlesource.com/crashpad/crashpad/+/refs/heads/main/tools/crashpad_http_upload.md).

I found the manual for these tools [here].(https://chromium.googlesource.com/crashpad/crashpad/+/refs/heads/main/doc/man.md)

Sorry that we haven't seen this before. You might also consider building a version of Crashpad that waits for the debugger in one of the signal handlers and seeing if you can attach to it with Visual Studio after generating a crash. I hope this helps - if you find a solution please report back!

Thanks. I will get back

@bobbyg603, it turns out that the crash files are generating but not in the path provided in the code. It is all being saved at the default path C:\Users\<username>\AppData\Local\CrashDumps.

Also, in line 125 of main.cpp if I change double backslashes to forward slash (wchar_t *lastBackslash = wcsrchr(path, '\\'); to wchar_t *lastBackslash = wcsrchr(path, '/');), it has no impact. It still saves to the default path.

Edit for above: Files are not copied properly. But still, the results are the same

If I raise a PR with the required changes, I don't know if it will work on the other windows systems

EDIT: My bad. They are generated by Windows memory dump and not related to the Crashpad.

How did you arrive at the files and folders inside Crashpad\Include\crashpad and Crashpad/Libraries/Windows? When I compile crashpad, mine is totally different

One of those tools that might help is called generate_dump. That might be a good place to start.

This works in my case and generates a dump

@chilarai we wrote a script that I run on my development system that copies all the .h files from the directory where the Crashpad library was cloned, and copies a few specific .a files from the build output. The .a file equivalents have a .lib extension on Windows and should be located in similar directories.

I could not replicate it again after reinstalling MSVC and Qt. So maybe some issue with the configurations.
So I don't think there was any issue with the template. I will close this issue now.

Thanks for your support though

@chilarai glad to hear you got it working! thanks for reporting back and closing the issue. cheers! 🍻