[GUI] Do not use Qt's debugging information in the log handler.#774
Merged
CaveSpectre11 merged 1 commit intoVeil-Project:masterfrom Jun 20, 2020
Merged
Conversation
* This information is not always available and caused crashes
in some builds.
mimirmim
approved these changes
Apr 29, 2020
Contributor
mimirmim
left a comment
There was a problem hiding this comment.
Obviously can't build it right now but clear enough to get moving forward on this.
ACK (but fails build).
Contributor
|
ack |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Commit cherry picked from #766 for fast tracking)
Problem
CaveSpectre and mimir (others?) have reported a crash on recent macOS builds.
The crash is a segmentation fault in a debug handler named DebugMessageHandler(),
at runtime, before the slash screen, or main window, is shown.
Root Cause
The issue has been tracked down to incorrect usage of the debug.log message handler override.
This is a part of Qt that allows us to log to debug.log, using a bypassed message handler
in the form of a callback function.
The issue is that we should not access some of the “context” information, passed in the form of
a QmessageLogContext.
If we peruse the Qt documentation:
Note: By default, this information is recorded only in debug builds. You can overwrite this explicitly by defining QT_MESSAGELOGCONTEXT or QT_NO_MESSAGELOGCONTEXT.
Solution
The correct way to fix this is to not make use of any of the potentially unavailable debugging information.
Unit Testing Results
Build on a relatively recent version of macOS, and see if: