[Interest] QApplication fails to start on release mode when using Qt as a backend of a plugin (Windows)
Nuno Santos
nunosantos at imaginando.pt
Thu Sep 17 14:42:41 CEST 2015
Hi,
I have seen this bug report. The funny thing is that it says it is resolved on Qt 5.5.0
I'm using Qt 5.5.0
What am I missing?
Regards,
--
Nuno Santos
No dia 17/09/2015, às 13:06, Tim Blechmann <tim at klingt.org> escreveu:
>> Im having a really awkward situation when trying to start QApplication
>> inside a plugin. Everything works in debug mode. I have struggled a bit
>> on debug mode to get rid of an ASSERTION warning:
>> Q_ASSERT(allArguments.size() == origArgc);
>> When I sucessfully managed to inject the very same argc and argv into
>> QApplication constructor everything started fine on debug build. This is
>> the code I'm using to fetch the command line args and start QApplication:
>>
>> // defined as global variables
>> static int argc;
>> static char **argv;
>>
>> LPWSTR *argvv = CommandLineToArgvW(GetCommandLineW(), &argc);
>> argv = new char*[argc];
>> argv[0] =
>> qstrdup(QString::fromStdWString(argvv[0]).toLocal8Bit().constData());
>>
>> qDebug("Before QApplication constructor: %s",argv[0]);
>> app = new QApplication(argc, argv);
>> qDebug("After QApplication constructor)";
>>
>> The problem is that on Release build, the plugin crashes as soon as it
>> is initiliazed and I can't understand why. The only thing I have is the
>> vague output:
>>
>> Before QApplication constructor: C:\ProgramData\Ableton\Live 9
>> Standard\Program\Ableton Live 9 Standard.exe
>> First-chance exception at 0x148AC104 (drc.dll) in Ableton Live 9
>> Standard.exe: 0xC0000005: Access violation reading location 0x00000000.
>>
>> It seems that it is trying to access a null pointer.
>>
>> Any ideas of what might be happening here?
>
> https://bugreports.qt.io/browse/QTBUG-30330
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
More information about the Interest
mailing list