On Monday 21. April 2014 10.41.52 Christoph Feck wrote: > On Monday 21 April 2014 05:27:33 Joshua Kolden wrote: > > I’m curious why you are not interested in QML. > > [...] > > I see no reason to stay with Qt Widgets at all other than legacy > > application support. So what is your concern? > > [...] > > Not speaking for Michael, but let me add that C++ is much easier to > debug compared to QML, if you get a crash. We have nearly hundred > backtraces in the Plasma bug tracker that point back to crashes in > QtDeclarative, without a single clue where the crash comes from. For > examples see bugs 328234, 332131, 331060, 333621, 333532, 333334, > 332995, or 332646 to cite only some fairly recent ones. > > I am not blaming QML here, all those bugs are possibly caused by > errors in Plasma itself, but the fact that you cannot see from the > backtrace what caused the crash is a major concern for me.
Let's turn this from a blame game into something more productive. The nature of the beast is that we do have two language environments here and they do (and can't) share the same stack, so stack traces will always be separate. However there are ways of determining the "current" JavaScript stack trace in parallel. Note that this isn't possible with Qt 5.1 or older, but starting with Qt 5.2 it is possible. Friedemann was kind enough to lay the infrastructure for that in QtQml and used it on the Qt Creator side, in a way that could also be used by KDE's drkonqi: It will require a little bit of analysis and interaction with gdb, but I think it's doable. It will require looking at the frames gdb reports, and if you see functions that take a QV4::ExecutionContext * as a parameter, then you can extract the "address" from the gdb output and then call the qt_v4StackTrace function in QtQml from within gdb. It will print out a JavaScript stack trace. This works rather well and Qt Creator 3.1 provides it through the context menu in the debugger, if you'd like to try it out yourself. This way bug reports in KDE that somehow involve Qt JavaScript execution can - in parallel - include a C++ backtrace and a JS stack trace. Simon _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development