[umbrello] [Bug 445119] Issues with code ignoring and possibly dereferencing nullptr

Ralf Habacker bugzilla_noreply at kde.org
Mon Nov 15 15:39:41 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=445119

Ralf Habacker <ralf.habacker at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ralf.habacker at freenet.de

--- Comment #1 from Ralf Habacker <ralf.habacker at freenet.de> ---
Hi Robert,
 thanks for working on that issue.

> Which gives rise to the next question: Why are null pointers being stored in the "m_objects" collection? 
> Instead of an error or warning, this should be handled by an assert() or something similar, causing the
> program to exit, preferably in code which appends the pointers to the collection.

When I started working on Umbrello, there were many crashes because various
lists contained undefined pointers. This has been massively mitigated by using
QPointer, so that there are zero pointers left, which are checked and ignored
when accessing the lists. Why these null pointers are contained there has
already been investigated and fixed in some cases in the past, when the cause
was identifiable.  One reason for this is probably the lack of referential
integrity of the objects involved. Objects are destroyed although they are
still registered in any lists.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the umbrello-devel mailing list