Skip to content

Conversation

rkitover
Copy link
Contributor

@rkitover rkitover commented Sep 13, 2019

add breakpad crash handler for Windows

Integrate and modify code from this demo:

https://github.com/KandaoVR/qt-breakpad

Use the latest version of breakpad with the cmake file from the vcpkg
port.

To enable the crash handler, pass the cmake option to generate.py,
e.g.:

python ./generate.py -cmake-flags '-DENABLE_CRASH_HANDLER=ON' release

It will then be activated for both the terminal and the signer.

When OFF breakpad will still be in effect to launch the systray
cleanup code, but the crash handler will not display.

TODO:

  • find or write submit URL handler

  • see if mac and linux can work

Signed-off-by: Rafael Kitover rkitover@gmail.com

@Ation Ation self-assigned this Sep 13, 2019
@Ation
Copy link
Contributor

Ation commented Sep 13, 2019

This is for windows only?

@Ation
Copy link
Contributor

Ation commented Sep 13, 2019

Where will report go?

@rkitover
Copy link
Contributor Author

The breakpad sources are a git submodule, they are not included.

This is for Windows only yes.

The report is form data posted to a URL, the receiving app has not been set up yet.

@Ation
Copy link
Contributor

Ation commented Sep 16, 2019

  • Is it working for signer?
  • how it was tested? Can you attach screenshot of dialog?
  • there is crashpad and breakpad versions provided with Qt sources, can't we use them?

@rkitover
Copy link
Contributor Author

Yes I tested it for signer, I can't give you a screenshot now but I'll give you a screenshot for terminal:

terminal crash handler

terminal crash handler detail

You can test it by just making it crash, e.g. like this:

QTimer::singleShot(10000, []{ int *a = (int*)0x42; printf("%d", *a); }) // or anything that will crash

By qt sources, you mean what's in qt creator? That's what the qt-breakpad demo is based on, and I got the code from the demo. I haven't looked at what's in qt creator currently.

I'm going to do a bit more work on this to wrap some things up.

@rkitover
Copy link
Contributor Author

I made a change to always enable the systray cleanup code even when the crash handler is not in effect, Scott wanted this.

@rkitover rkitover force-pushed the qt-breakpad branch 2 times, most recently from 4138c8a to 85a82b0 Compare September 24, 2019 15:43
Integrate and modify code from this demo:

https://github.com/KandaoVR/qt-breakpad

Use the latest version of breakpad with the cmake file from the vcpkg
port.

To enable the crash handler, pass the cmake option to `generate.py`,
e.g.:

```bash
python ./generate.py -cmake-flags '-DENABLE_CRASH_HANDLER=ON' release
```

It will then be activated for both the terminal and the signer.

When `OFF` breakpad will still be in effect to launch the systray
cleanup code, but the crash handler will not display.

I am working on the report receiver web app here:

https://github.com/rkitover/qt-breakpad-web

TODO:

- see if mac and linux can work

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
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.

2 participants