Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in DLL doesn't get decoded #11

Open
pedjaman opened this issue Mar 5, 2020 · 3 comments
Open

Crash in DLL doesn't get decoded #11

pedjaman opened this issue Mar 5, 2020 · 3 comments

Comments

@pedjaman
Copy link

pedjaman commented Mar 5, 2020

It works quite well when a crash happen in exe.
But, if a crash is in DLL or plugin loaded with QPluginLoader it doesn't get decoded well.
Any suggestion how to catch from DLL or plugin?

Platform: Windows Mingw 64

Here it comes an example:

RTSuite v1.7.0
02 Mar 2020 @ 20:55:02

EXCEPTION_INT_DIVIDE_BY_ZERO

[0] 0x000000006f10501d ?? ??:0
[1] 0x0000000068aa2720 ?? ??:0
[2] 0x0000000068aadb7a ?? ??:0
[3] 0x0000000068aa334b ?? ??:0
[4] 0x00000000013c7c8c ?? ??:0
[5] 0x00000000013ced23 ?? ??:0
[6] 0x0000000068a758c8 ?? ??:0
[7] 0x0000000068ad1344 ?? ??:0
[8] 0x0000000068ad15a2 ?? ??:0
[9] 0x00007ff98f3f5b6d ?? ??:0
[10] 0x00007ff98f3f5562 ?? ??:0
[11] 0x0000000068ad0dcb ?? ??:0
[12] 0x000000006a8fb565 ?? ??:0
[13] 0x0000000068a7395e ?? ??:0
[14] 0x000000000158e109 ?? ??:0
[15] 0x000000006f10b2f1 ?? ??:0
[16] 0x000000006f110202 ?? ??:0
[17] 0x000000006f110343 ?? ??:0
[18] 0x0000000068aa26d3 ?? ??:0
[19] 0x000000000163056f ?? ??:0
[20] 0x0000000001635cff ?? ??:0
[21] 0x0000000068aa2600 ?? ??:0
[22] 0x00000000015df9dd ?? ??:0
[23] 0x0000000001405378 ?? ??:0
[24] 0x000000000149c6ae ?? ??:0
[25] 0x00000000015e862e ?? ??:0
[26] 0x0000000068a74430 ?? ??:0
[27] 0x00000000013c7c65 ?? ??:0
[28] 0x00000000013cfd1a ?? ??:0
[29] 0x0000000068a75a88 ?? ??:0
[30] 0x00000000013ce118 ?? ??:0
[31] 0x0000000001419edd ?? ??:0
[32] 0x000000000141caa3 ?? ??:0
[33] 0x00000000013c7c8c ?? ??:0
[34] 0x00000000013ced23 ?? ??:0
[35] 0x0000000068a75a88 ?? ??:0
[36] 0x0000000061977824 ?? ??:0
[37] 0x00000000619789b5 ?? ??:0
[38] 0x0000000061950f2c ?? ??:0
[39] 0x0000000068ad187a ?? ??:0
[40] 0x00007ff98f3f5b6d ?? ??:0
[41] 0x00007ff98f3f5562 ?? ??:0
[42] 0x0000000068ad0dcb ?? ??:0
[43] 0x000000006a8fb565 ?? ??:0
[44] 0x0000000068a7395e ?? ??:0
[45] 0x0000000068a7cd87 ?? ??:0
[46] 0x0000000000409108 qMain(int, char**) at main.cpp:123
[47] 0x0000000000412610 /tools/addr2line: Dwarf Error: Could not find abbrev number 69.
?? at qtmain_win.cpp:?
[48] 0x00000000004013c7 /tools/addr2line: Dwarf Error: Could not find abbrev number 69.
?? at crtexe.c:?
[49] 0x00000000004014cb /tools/addr2line: Dwarf Error: Could not find abbrev number 69.
?? at crtexe.c:?
[50] 0x00007ff9909b7bd4 ?? ??:0
[51] 0x00007ff990c0ced1 ?? ??:0

@asmaloney
Copy link
Owner

I didn't need this for my use-case, so I never looked into it. From looking at the code you will need to:

  1. Determine what code object (DLL, executable) a given frame is in
  2. Change the calls to _addressToLine() to specify the correct object

You might look at the references I have in my original blog post - maybe one of them has suggestions about how to do this?

@pedjaman
Copy link
Author

pedjaman commented Mar 6, 2020

Thanks for the quick response.

The steps recommended above are the ones I wanted to do but reached many obstacles.
For example, addr2line doesn't work well with DLLs. I have tried, with calculating base address and subtracting from the exception address. Additionally, I have tried with -j command-line switch. Still no luck of getting it working.

As I had no time to play around about, was hoping that you already implemented this in new version :)

Anyways, thanks for suggestions.

@asmaloney
Copy link
Owner

If you are looking for something Windows-only, you might take a look at StackWalker.

He understands more about this than I ever will.

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

No branches or pull requests

2 participants