Bug#847651: doomsday: Segfaults at startup

Bernhard Übelacker bernhardu at mailbox.org
Tue May 23 11:00:05 UTC 2017


Hello,
tried to reproduce the issue.

I think the problem is that in de::File::parent the method maybeAs()
is called on a NULL pointer.

With the attached patch the crash does not happen.

Kind regards,
Bernhard



# apt install doomsday doomsday-dbgsym doomsday-common-dbgsym
$ gdb -q --args doomsday
Reading symbols from doomsday...Reading symbols from /usr/lib/debug/.build-id/41/6978915c5c4686da064c7ff3a539ef4336958c.debug...done.
done.
(gdb) run
Starting program: /usr/games/doomsday 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
                                                                                                                                                                                  
Program received signal SIGSEGV, Segmentation fault.                                                                                                                              
0x00007ffff476092d in __dynamic_cast () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6                                                                                             
(gdb) bt                                                                                                                                                                          
#0  0x00007ffff476092d in __dynamic_cast () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6                                                                                           
#1  0x00007ffff7574d95 in de::filesys::Node::maybeAs<de::Folder>() (this=<optimized out>) at include/de/filesys/../filesys/node.h:88                                              
#2  0x00007ffff7574d95 in de::File::parent() const (this=<optimized out>) at src/filesys/file.cpp:114                                                                             
#3  0x00007ffff757572b in de::File::description() const (this=this at entry=0x5555560e5850) at src/filesys/file.cpp:146
#4  0x00007ffff757a40e in de::FileSystem::interpret(de::File*) (this=<optimized out>, sourceData=sourceData at entry=0x5555560e5850) at src/filesys/filesystem.cpp:147
#5  0x00007ffff7573415 in de::DirectoryFeed::populateFile(de::Folder&, de::String const&) (this=this at entry=0x55555605e410, folder=..., entryName=...) at src/filesys/directoryfeed.cpp:120
#6  0x00007ffff7573849 in de::DirectoryFeed::populate(de::Folder&) (this=0x55555605e410, folder=...) at src/filesys/directoryfeed.cpp:77
#7  0x00007ffff757f011 in de::Folder::populate(de::Folder::PopulationBehavior) (this=0x5555560dcc80, behavior=de::Folder::PopulateFullTree) at src/filesys/folder.cpp:193
#8  0x00007ffff757f069 in de::Folder::populate(de::Folder::PopulationBehavior) (this=0x555556145070, behavior=behavior at entry=de::Folder::PopulateFullTree) at src/filesys/folder.cpp:203
#9  0x00007ffff757c24d in de::FileSystem::refresh() (this=this at entry=0x5555560b2a50) at src/filesys/filesystem.cpp:66
#10 0x00007ffff75e9be9 in de::App::Instance::initFileSystem(bool) (this=0x5555560b2910, allowPlugins=<optimized out>) at src/core/app.cpp:242
#11 0x00007ffff75e5faa in de::App::initSubsystems(QFlags<de::App::SubsystemInitFlag>) (this=this at entry=0x7fffffffdd80, flags=...) at src/core/app.cpp:592
#12 0x00007ffff6a43115 in de::BaseGuiApp::initSubsystems(QFlags<de::App::SubsystemInitFlag>) (this=0x7fffffffdd70, flags=...) at src/baseguiapp.cpp:106
#13 0x00005555555e48a5 in ClientApp::initialize() (this=0x7fffffffdd70) at src/clientapp.cpp:350
#14 0x00005555555c8605 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at src/main_client.cpp:75
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Avoid-crash-after-parent-returning-NULL-pointer.patch
Type: text/x-patch
Size: 2973 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20170523/0abc390a/attachment.bin>


More information about the Pkg-games-devel mailing list