[Marble-devel] Review Request 119069: Marble (routing): fix crash when entering guidance mode

Jonathan Marten jjm at keelhaul.me.uk
Wed Jul 2 07:08:41 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119069/
-----------------------------------------------------------

(Updated July 2, 2014, 7:08 a.m.)


Status
------

This change has been marked as submitted.


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/20140702/037f012b/attachment.html>


More information about the Marble-devel mailing list