[Marble-devel] Review Request 119069: Marble (routing): fix crash when entering guidance mode
Jonathan Marten
jjm at keelhaul.me.uk
Tue Jul 1 16:33:41 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119069/
-----------------------------------------------------------
Review request for Marble.
Bugs: 336771
http://bugs.kde.org/show_bug.cgi?id=336771
Repository: marble
Description
-------
The reference bug describes a crash when displaying the "Caution: Driving instructions may be..." message box when guidance is started.
The problem is that a QCheckBox is created on the stack and added to the message box, which adopts it as a child. This is dangerous according to the QObject::~QObject documentation:
Warning: All child objects are deleted. If any of these objects are on the stack or global, sooner or later your program will crash.
This change creates the check box on the heap instead; as a child of the message box, it will be deleted when the message box is deleted.
Diffs
-----
src/lib/marble/routing/RoutingManager.cpp ac49db7
Diff: https://git.reviewboard.kde.org/r/119069/diff/
Testing
-------
Built Marble with this change, ran crashing test case as in bug report - no crash.
Thanks,
Jonathan Marten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140701/b4fdc80a/attachment.html>
More information about the Marble-devel
mailing list