Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.9.0, 5.9.1, 5.10.1, 5.11.0 Alpha
Description
This started happening after upgrading from Qt 5.8 to Qt 5.9.0 on Arch Linux.
I have tons of JavaScript objects which are "stripped" before I pass them to a C++ JSON generator. Stripped means that some properties are not wanted in the json produced (Why do I even use JavaScript to strip the object and don't do it in C++ ? Because manipulating stupid const QJsonObjects on C++ side is madness.)
My code looks like this:
stripList.forEach(function(item) { var object = item.entity; var property = item.property; // Some additional filter logic... // It happens here. Without it everything is good. delete object[item.property] // <- Crash here, after hundreds of calls, randomly });
I couldn't find any pattern behind the crash, it's a different property each time (I printed them) and I also measured with a counter and it crashes at 300+ or 400+ iterations, etc.
This is a really big deal for me... The only workaround is to have inflated json files. The stacktrace is probably totally useless, because I don't have debug symbols. But it's the same with each crash. It does not happen with previous versions of Qt.
1 ?? 0x7ffff63a309f 2 QV4::MemoryManager::mark() 0x7ffff6282fe3 3 ?? 0x7ffff628362c 4 QV4::MemoryManager::allocString(unsigned long) 0x7ffff62850d8 5 QV4::ExecutionEngine::newString(QString const&) 0x7ffff636301a 6 ?? 0x7ffff63ac0ed 7 QV4::Runtime::method_callProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff6401b0e 8 ?? 0x7ffff63f8e3d 9 ?? 0x7ffff63f98b5 10 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 11 ?? 0x7ffff6397635 12 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 13 ?? 0x7ffff63f8cf9 14 ?? 0x7ffff63f98b5 15 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 16 ?? 0x7ffff6397635 17 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 18 ?? 0x7ffff63f8cf9 19 ?? 0x7ffff63f98b5 20 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 21 ?? 0x7ffff6397635 22 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 23 ?? 0x7ffff63f8cf9 24 ?? 0x7ffff63f98b5 25 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 26 ?? 0x7ffff6397635 27 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 28 ?? 0x7ffff63f8cf9 29 ?? 0x7ffff63f98b5 30 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 31 ?? 0x7ffff6397635 32 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 33 ?? 0x7ffff63f8cf9 34 ?? 0x7ffff63f98b5 35 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 36 ?? 0x7ffff6397635 37 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 38 ?? 0x7ffff63f8cf9 39 ?? 0x7ffff63f98b5 40 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 41 ?? 0x7ffff6397635 42 QV4::Runtime::method_callProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff6401b0e 43 ?? 0x7ffff63f8e3d 44 ?? 0x7ffff63f98b5 45 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 46 ?? 0x7ffff6397635 47 QV4::Runtime::method_callProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff6401b0e 48 ?? 0x7ffff63f8e3d 49 ?? 0x7ffff63f98b5 50 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 51 ?? 0x7ffff6397635 52 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 53 ?? 0x7ffff63f8cf9 54 ?? 0x7ffff63f98b5 55 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 56 ?? 0x7ffff6397635 57 QV4::Runtime::method_callProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff6401b0e 58 ?? 0x7ffff63f8e3d 59 ?? 0x7ffff63f98b5 60 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 61 ?? 0x7ffff6397635 62 QV4::Runtime::method_callActivationProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff63fe10f 63 ?? 0x7ffff63f8cf9 64 ?? 0x7ffff63f98b5 65 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 66 QQmlJavaScriptExpression::evaluate(QV4::CallData *, bool *, QV4::Scope&) 0x7ffff6494fce 67 QQmlBoundSignalExpression::evaluate(void * *) 0x7ffff642e79e 68 ?? 0x7ffff642fdfb 69 QQmlNotifier::emitNotify(QQmlNotifierEndpoint *, void * *) 0x7ffff6472a83 70 QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *, int, void * *) 0x7ffff6411499 71 QMetaObject::activate(QObject *, int, int, void * *) 0x7ffff55a2c9f 72 QQmlVMEMetaObject::metaCall(QObject *, QMetaObject::Call, int, void * *) 0x7ffff640d9a1 73 QQmlVMEMetaObject::metaCall(QObject *, QMetaObject::Call, int, void * *) 0x7ffff640c9f9 74 ?? 0x7ffff6468a39 75 ?? 0x7ffff63e704b 76 ?? 0x7ffff63e88b2 77 QV4::QObjectMethod::callInternal(QV4::CallData *, QV4::Scope&) const 0x7ffff63e95d9 78 QV4::Runtime::method_callProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff6401b0e 79 ?? 0x7ffff63f8e3d 80 ?? 0x7ffff63f98b5 81 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 82 QQmlJavaScriptExpression::evaluate(QV4::CallData *, bool *, QV4::Scope&) 0x7ffff6494fce 83 QQmlBoundSignalExpression::evaluate(void * *) 0x7ffff642e79e 84 ?? 0x7ffff642fdfb 85 QQmlNotifier::emitNotify(QQmlNotifierEndpoint *, void * *) 0x7ffff6472a83 86 QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *, int, void * *) 0x7ffff6411499 87 QMetaObject::activate(QObject *, int, int, void * *) 0x7ffff55a2c9f 88 ?? 0x7fffd59703af 89 ?? 0x7fffd597099c 90 ?? 0x7fffd5970e05 91 ?? 0x7ffff6468a39 92 ?? 0x7ffff63e6b29 93 ?? 0x7ffff63e88ee 94 QV4::QObjectMethod::callInternal(QV4::CallData *, QV4::Scope&) const 0x7ffff63e9961 95 QV4::Runtime::method_callProperty(QV4::ExecutionEngine *, int, QV4::CallData *) 0x7ffff6401b0e 96 ?? 0x7ffff63f8e3d 97 ?? 0x7ffff63f98b5 98 QV4::ExecutionContext::call(QV4::Scope&, QV4::CallData *, QV4::Function *, QV4::FunctionObject const *) 0x7ffff637230c 99 QQmlJavaScriptExpression::evaluate(QV4::CallData *, bool *, QV4::Scope&) 0x7ffff6494fce 100 QQmlBoundSignalExpression::evaluate(void * *) 0x7ffff642e79e 101 ?? 0x7ffff642fdfb 102 QQmlNotifier::emitNotify(QQmlNotifierEndpoint *, void * *) 0x7ffff6472a83 103 QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *, int, void * *) 0x7ffff6411499 104 QMetaObject::activate(QObject *, int, int, void * *) 0x7ffff55a2c9f 105 QQuickMouseArea::released(QQuickMouseEvent *) 0x7ffff79fc482 106 QQuickMouseArea::setPressed(Qt::MouseButton, bool, Qt::MouseEventSource) 0x7ffff79fdc4c 107 QQuickMouseArea::mouseReleaseEvent(QMouseEvent *) 0x7ffff79fedba 108 QQuickItem::event(QEvent *) 0x7ffff7975018 109 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x7ffff709546c 110 QApplication::notify(QObject *, QEvent *) 0x7ffff709ccf4 111 QCoreApplication::notifyInternal2(QObject *, QEvent *) 0x7ffff5574b98 112 QQuickWindow::sendEvent(QQuickItem *, QEvent *) 0x7ffff79864f0 113 QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent *) 0x7ffff798af38 114 QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent *) 0x7ffff798b895 115 QQuickWindowPrivate::handleMouseEvent(QMouseEvent *) 0x7ffff798c0b6 116 QWindow::event(QEvent *) 0x7ffff68df985 117 QQuickWindow::event(QEvent *) 0x7ffff798da75 118 QApplicationPrivate::notify_helper(QObject *, QEvent *) 0x7ffff709546c 119 QApplication::notify(QObject *, QEvent *) 0x7ffff709ccf4 120 QCoreApplication::notifyInternal2(QObject *, QEvent *) 0x7ffff5574b98 121 QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *) 0x7ffff68d3a93 122 QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *) 0x7ffff68d5575 123 QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff68adc0b 124 ?? 0x7fffed5e01b0 125 g_main_context_dispatch 0x7ffff20a87b7 126 ?? 0x7ffff20a8a20 127 g_main_context_iteration 0x7ffff20a8acc 128 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff55cce7f 129 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x7ffff557321a 130 QCoreApplication::exec() 0x7ffff557ba74 131 main main.cpp 93 0x4052f1