Details
Description
Future releases of the android OS will have an upgraded, more standard version of libc. This bug addresses a particular call to putenv() in androidjnimain.cpp that, if it not fixed, will cause ALL Qt programs to die on startup without even a trace.
The offending line is here:
https://qt.gitorious.org/qt/qtbase/source/cfcbb957c7ee85decee3379d8876a7b4094ae501:src/plugins/platforms/android/androidjnimain.cpp#L471
The putenv() function puts the passed-in string into the environment. This string must by definition be static and only changed afterwards if you actually wish to change the environment. If you look here, though, you see that the variable's memory is reused:
https://qt.gitorious.org/qt/qtbase/source/cfcbb957c7ee85decee3379d8876a7b4094ae501:src/plugins/platforms/android/androidjnimain.cpp#L479
The way this manifests in yet-to-be-released versions of android is for the program to simply die, as mentioned above.
Probably the best solution for this would be to use setenv() instead and can the static memory (declared as m_applicationParams) completely.
Attachments
Issue Links
- is required for
-
QTBUG-39093 Issues to be fixed for Qt 5.3.1
- Closed