NOV
5
2015
|
QRegExp + QStringLiteral = crash at exitIf you're seeing crashes lately, and they look like: it's most probably due to QStringLiteral usage, which in some rare cases can introduce crashes, and one of those cases is with QRegExp. When you do: QRegExp will cache the string in a Q_GLOBAL_STATIC variable, and remember that because it's a QStringLiteral, it has it's data in .rodata of your KDE library (or wherever you defined it). When you exit the application, your KDE library gets unloaded then QtCore get unloaded. If you want to know for sure which library the dissipated .rodata belonged to: run valgrind, and you'll get a message like: Then run valgrind with gdb support: then when your app is running, run "info target" in gdb and search for the respective address interval and you get the library you should fix. Ofc, all this becomes a moot point if you just port your code to use QRegularExpression instead of QRegExp :) |
![]() |
Comments
is this going to be fixed?
is this going to be fixed? is there a qt jira issue for that?
looks like QTBUG-46880
will be fixed for 5.6: https:
will be fixed for 5.6: https://codereview.qt-project.org/#/c/140750/
idiotic
So idiotic? Qt should fix this already.