Details
-
Bug
-
Resolution: Done
-
P5: Not important
-
5.10.1, 5.11
-
None
-
-
3e4f8aa8f434d791b3dfe9450bad85b82406d4b3 (qt/qtbase/5.12)
Description
I do not know if this is a missing in the doc, or a problem in QProcess.
In short if the QProcess is destroyed BEFORE the end of the process the QMessageLogContext is populated with NULLPTR for file and function
context @0x55593eaf7ba8 QMessageLogContext &
category "default" char*
file 0x0 char*
function 0x0 char*
line 0 int
version 2 int
And this will trigger an error when calling the fprintf function.
I fixed adding a
auto file = context.file; if (context.file == nullptr) { file = "NO FILE FOUND"; }