Description of problem: Start a game. Allow the first pair of orbs to reach the bottom. As soon as the orbs touch the bottom the game crashes. Version-Release number of selected component: flobopuyo-0.20-18.fc24 Additional info: reporter: libreport-2.7.2 backtrace_rating: 4 cmdline: flobopuyo crash_function: PuyoGame::notifyReductions executable: /usr/bin/flobopuyo global_pid: 13111 kernel: 4.7.4-200.fc24.x86_64 pkg_fingerprint: 73BD E983 81B4 6521 pkg_vendor: Fedora Project runlevel: N 5 type: CCpp uid: 1810 Truncated backtrace: Thread no. 1 (6 frames) #0 PuyoGame::notifyReductions at PuyoGame.cpp:640 #1 PuyoGame::cycle at PuyoGame.cpp:168 #2 PuyoView::cycleGame at PuyoView.cpp:233 #3 PuyoStarter::run at PuyoStarter.cpp:559 #4 PuyoCommander::startSingleGameLoop at PuyoCommander.cpp:1315 #5 PuyoCommander::run at PuyoCommander.cpp:722
Created attachment 1206041 [details] File: backtrace
Created attachment 1206042 [details] File: cgroup
Created attachment 1206043 [details] File: core_backtrace
Created attachment 1206044 [details] File: dso_list
Created attachment 1206045 [details] File: environ
Created attachment 1206046 [details] File: limits
Created attachment 1206047 [details] File: maps
Created attachment 1206048 [details] File: mountinfo
Created attachment 1206049 [details] File: namespaces
Created attachment 1206050 [details] File: open_fds
Created attachment 1206051 [details] File: proc_pid_status
Created attachment 1206052 [details] File: var_log_messages
Created attachment 1220031 [details] proposed fix
The problem is in this code: PuyoPuyo *markedPuyo = getPuyoAt(u, v); if (markedPuyo->getPuyoState() == PUYO_MARKED) { getPuyoAt() can return NULL which is dereferenced in the next line a fix is attached
Sebastian, thank you very much for the patch. It fixes this particular issue (when the first pair of puyos reach the bottom) but unluckily the game segfaults later when you form a group of four puyos of the same colour that will blow up :-( (gdb) bt #0 PuyoPuyo::getPuyoState (this=0x0) at PuyoGame.cpp:63 #1 0x0000000000415159 in PuyoGame::getFallingState (this=<optimized out>) at PuyoGame.h:113 #2 AnimatedPuyo::render (this=this@entry=0x1eda040) at AnimatedPuyo.cpp:99 #3 0x0000000000413ceb in PuyoView::render (this=0x1e81570) at PuyoView.cpp:294 #4 0x0000000000420f77 in PuyoStarter::draw (this=0x7ffd856e5b00) at PuyoStarter.cpp:86 #5 0x000000000040edaf in PuyoCommander::updateAll (this=0x7ffd856e5e20, starter=starter@entry=0x7ffd856e5b00, extra_surf=extra_surf@entry=0x0) at PuyoCommander.cpp:1390 #6 0x00000000004226a7 in PuyoStarter::run (this=this@entry=0x7ffd856e5b00, _score1=_score1@entry=0, _score2=_score2@entry=0, lives=lives@entry=3, point1=point1@entry=0, point2=point2@entry=0) at PuyoStarter.cpp:752 #7 0x0000000000410648 in PuyoCommander::startSingleGameLoop ( this=this@entry=0x7ffd856e5e20) at PuyoCommander.cpp:1315 #8 0x0000000000410a68 in PuyoCommander::run (this=this@entry=0x7ffd856e5e20) at PuyoCommander.cpp:722 #9 0x0000000000402f2a in main (argc=<optimized out>, argv=<optimized out>) at main.cpp:96
I can't reproduce these bugs in my own build from source. Could you post the compiler options you set in the rpmbuild so that I can reproduce this. I fear that scanning all of that code for even the most obvious bugs would be a huge effort. If I could reproduce these bugs in my own builds, I could fix one bug after an other. ..I'll look into this tomorrow.
(In reply to Sebastian Ott from comment #16) > I can't reproduce these bugs in my own build from source. Could you post the > compiler options you set in the rpmbuild so that I can reproduce this. On my system: $ rpm --eval %optflags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic > I fear that scanning all of that code for even the most obvious bugs would > be a huge effort. > > If I could reproduce these bugs in my own builds, I could fix one bug after > an other. > > ..I'll look into this tomorrow. Thanks!
(In reply to Andrea Musuruane from comment #17) > (In reply to Sebastian Ott from comment #16) > > I can't reproduce these bugs in my own build from source. Could you post the > > compiler options you set in the rpmbuild so that I can reproduce this. > $ rpm --eval %optflags > -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 > -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 > -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 > -mtune=generic > Thanks. With that I can reproduce the segfault with the self build binary..
Created attachment 1220153 [details] additional fix
Fixed another couple of bugs. With the attached fixes (you'll need both) that game no longer segfaults (it was tested for half an hour).
I also tested it for about half an hour and it seems fine to me too! Thanks!!! I'll try to release a new version in the next hours.
flobopuyo-0.20-19.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-536eb6a746
flobopuyo-0.20-19.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-4ef8b64c96
flobopuyo-0.20-19.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f843ac739e
flobopuyo-0.20-19.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-4ef8b64c96
flobopuyo-0.20-19.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-536eb6a746
flobopuyo-0.20-19.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f843ac739e
flobopuyo-0.20-19.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
flobopuyo-0.20-19.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
flobopuyo-0.20-19.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.