-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Fix PDB loading for valid stacktraces #18456
Fix PDB loading for valid stacktraces #18456
Conversation
Could you clarify what's the problem did you find? |
@glassez @xavier2k6 let's continue here for the stacktrace talk. From #18452 (comment)
What I have discovered so far: @xavier2k6 I don't know how you started the official build in your tests. Was it via the start menu/desktop shortcut? If so, they were setting CWD wrongly before this PR. @xavier2k6 for official builds: Test by right clicking the shortcuts-> |
glassez wrote (#18452 (comment)):
It still finds the pdb. |
I would consider it as bug. Would you mind to report it to Boost? |
Sure but I would wait for some confirmation on these: Can you and @xavier2k6 do a test in case I am wrong? |
Just a quick test with official 4.5.0 installed on windows 11, right clicked shortcut & indeed the start-in path was incorrect, it was starting in the I corrected it & it now produces valid stack traces.......should have initially tested in portable mode on my first investigation.....would've probably had shed light on where issue was sooner. Will test other options you asked about in the morning. |
Windows deployment and symbol files So storing a relative pdb path in executable looks like the recommended way. It is hardly assumed that such unreliable behavior when it is searched in the working directory, which is unpredictable, is what is actually intended. |
Unfortunately this patch will not solve the problem in all the cases (i.e. when qBittorrent started in another way than via shortcut). |
To clarify. This patch stands on its own. Now the CWD of the shortcut is set to
We could. But this solution feels like a kludge. |
Pushed an additional commit and changed PR title. (A different PR would have split the discussion yet again). |
👍 |
SymInitialize function (dbghelp.h) It seems that this is still the usual behavior of Windows debugging tools, that it does not look for symbols in the executable file folder. To achieve this, we need to add executable folder to symbol search path. This can be done by calling the appropriate functions. Earlier, when we used a different implementation of stack trace support, I happened to make the changes to specify the application folder for symbol search. But now we don't use Windows debugging functions directly (their use is hidden inside Boost.Stacktrace), so we are left with another suggested way - to use environment variables (I don't see anything wrong with that). |
d0f591d
to
b61c7b7
Compare
I don't know if it closes that bug. |
Has this been broken for some time? Ref: #17949 (comment) |
Seems the issue is here since 5c3c6b6. |
This was discovered by investigating #18339 (comment)