Page 1 of 1
Segmentation fault on Rüdiger Schäfer Level 89
Posted: Wed Jan 18, 2023 8:57 am
by BryanFRitt
I've gotten this segmentation fault 3 times on this level. Earlier in this level I did the technique to continue from middle of a bad tape. No other level so far/since has given me this issue. I'm thinking every time it was along the wall in roughly this position. (not sure of the 1st time). After each segmentation fault I was able to restart R'n'D and then able to beat this level, and haven't seen this message since.
Rüdiger Schäfer,
https://api.artsoft.org/levelsets/view/314
level 89: Quicksand,
https://api.artsoft.org/levels/view/22999
Same exact message
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
BryanFRitt wrote: ↑Tue Dec 20, 2022 12:32 pmIf you find a tape that has this problem, a potential workaround seems to be when stationary making sure the tape full []|>playback and quick save/restore go to the same stationary point. [best to continue from a spot before the tape gets messed up]
- SegmentationFaultWhilePlaying1stScreenshot.png (661.87 KiB) Viewed 15082 times
- SegmentationFaultWhilePlaying2ndScreenshot.png (645.17 KiB) Viewed 15082 times
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Wed Jan 18, 2023 10:01 am
by BryanFRitt
Don't know if this is related or not, but after exiting all Rocks'n'Diamonds windows, I found this in ksysguard.
- ExtraRocksNDiamonds.png (57.9 KiB) Viewed 15067 times
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Sun Jan 29, 2023 8:07 pm
by Holger
Thank you for this crash bug report! I still have to check if I will be able to reproduce this, but this should really be fixed!
It is really great that you were able to run the game in the debugger, and get the line of the code where it happened! That's really more that I could ask for!
Unfortunately, I have no idea so far what might have caused the crash, so I hope I will be able to reproduce it on my Linux box!
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Sun Jan 29, 2023 8:18 pm
by Holger
OK, simply replaying the tape does not give me a crash. (You already wrote something like that, but I thought I might give it a try at least.) :-/
Regarding the four instances of R'n'D in your task manager, it might be possible that the process did not correctly terminate after the crash (maybe the process is still active in the debugger; in gdb, I also have to finally terminate the process in a similar way).
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Mon Jan 30, 2023 8:28 pm
by BryanFRitt
I've rebooted my computer since last time. Tried again continuing from middle like before, and the Segmentation fault came up again. At roughly the same spot too. At 14:29(869) according to the screenshot.
Note: For MAIN MENU > SETUP > CUSTOM ARTWORK > CUSTOM GRAPHICS > using WIDESCREEN MODE [1920x1080] WITH LEVEL PREVIEW
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
- SegmentationFaultWhilePlayingEvenAfterRestart.png (139.35 KiB) Viewed 14934 times
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Mon Jan 30, 2023 8:51 pm
by BryanFRitt
In trying again, the quick restore, if not re quick saved, goes to were where during playback the level was continued from instead of where you'd think quick restore would go to, the end of the tape. In this case, the end of the level playback finishing the level. I suppose this can be considered a feature, and can be helpful, but it's unexpected. (perhaps there could be a menu option for this)
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Mon Jan 30, 2023 9:55 pm
by Holger
I've rebooted my computer since last time. Tried again continuing from middle like before, and the Segmentation fault came up again. At roughly the same spot too. At 14:29(869) according to the screenshot.
Cound you describe what you did to produce the SegFault? Was it something like this?:
- Load the mentioned widescreen graphics set
- Select level 089 with the attached tape loaded
- Replay tape until 14:29(869)
- Press "pause"
- Press "record"
- Game crashes
Or did you do something different?
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Mon Jan 30, 2023 9:56 pm
by Holger
In trying again, the quick restore, if not re quick saved, goes to were where during playback the level was continued from instead of where you'd think quick restore would go to, the end of the tape. In this case, the end of the level playback finishing the level. I suppose this can be considered a feature, and can be helpful, but it's unexpected. (perhaps there could be a menu option for this)
I think I did not understand what you did and what happened, and what was the expected behavior instead?!
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Wed Feb 01, 2023 4:10 am
by BryanFRitt
Holger wrote: ↑Mon Jan 30, 2023 9:55 pm
I've rebooted my computer since last time. Tried again continuing from middle like before, and the Segmentation fault came up again. At roughly the same spot too. At 14:29(869) according to the screenshot.
Cound you describe what you did to produce the SegFault? Was it something like this?:
- Load the mentioned widescreen graphics set
- Select level 089 with the attached tape loaded
- Replay tape until 14:29(869)
- Press "pause"
- Press "record"
- Game crashes
Or did you do something different?
- Load the mentioned widescreen graphics set
- Select level 089 with the attached tape loaded
then
exit and restart R'n'D
quick restore replay the tape to some point before 14:29(869), ? does it also have to be after a specific spot ?
continue playing from that point, ||pause ()record
play the game in a way that goes along that wall, note: it might not crash for quite a while after starting to play.
Don't remember if a did a 2nd+ quick restore or not, guessing I did?
Holger wrote: ↑Mon Jan 30, 2023 9:56 pm
In trying again, the quick restore, if not re quick saved, goes to were where during playback the level was continued from instead of where you'd think quick restore would go to, the end of the tape. In this case, the end of the level playback finishing the level. I suppose this can be considered a feature, and can be helpful, but it's unexpected. (perhaps there could be a menu option for this)
I think I did not understand what you did and what happened, and what was the expected behavior instead?!
[wow... this is really hard to say right... might be hard to follow. This below is a different bug than the theme of this thread]
A 2nd+ quick restore if there hasn't been another quick save, currently goes to the point where in the level the 1st quick restore was stopped off at to continue from middle of tape, instead of going to end of tape like it would do had a previous quick restore not been interrupted to be continued from. aka, If one has just restarted R'n'D and then continued playing from the middle of a 1st quick restore playback, future quick restores no longer goes to the end of the tape, instead it goes to the point in the tape where the playback was interrupted to continue playing. One would assume that the quick restore would still try to go to the end of the tape.
lol... just striked through the text because at the time I wrote it, I thought it may be hard to follow, not because it's wrong.
Edit: Trying to write things to be easier to follow.
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Wed Feb 08, 2023 3:18 am
by BryanFRitt
Code: Select all
/usr/bin/gdb --args "/media/Environ/Compile/rocksndiamonds-4.3.4.0/rocksndiamonds" "--debug"
then 'r' and 'enter' to start R'n'D, ...
[DEBUG] [event
debug] frame delay == 8 ms (max. 125 fps / 250 %)
[DEBUG] [event
debug] frame delay == 20 ms (max. 50 fps / 100 %)
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
This time I noticed that I didn't press ()record to get out tape playback to start playing, just ||pause was enough to get me started playing.
- SegmentationFaultWhilePlayingEvenAfterRestart2.png (662.09 KiB) Viewed 14552 times
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Wed Feb 08, 2023 3:32 am
by BryanFRitt
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
This time I used 'CLASSIC GRAPHICS' to play the game full screen, so far every time given me a Segmentation fault (at least that I've payed attention to), the character has been along the left wall.
Code: Select all
(gdb) bt
#0 0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
#1 0x0000555555664b6a in DrawAllPlayers () at tools.c:4404
#2 0x00005555556bc8a3 in GameActions_RND () at game.c:12628
#3 0x00005555556baa4c in GameActions_RND_Main () at game.c:12050
#4 0x00005555556ba7e4 in GameActionsExt () at game.c:11958
#5 0x00005555556ba907 in GameActions () at game.c:12006
#6 0x000055555568dad2 in HandleGameActions () at screens.c:9516
#7 0x00005555556539b4 in EventLoop () at events.c:378
#8 0x000055555564625b in main (argc=2, argv=0x7fffffffd8d8) at main.c:7874
Code: Select all
(gdb) list
4374
4375 // do not redraw accessible elements if the player is just pushing them
4376 if (!player_is_moving || !player->is_pushing)
4377 {
4378 // ... and the field the player is entering
4379 if (IS_ACCESSIBLE_INSIDE(element))
4380 DrawLevelField(jx, jy);
4381 else if (IS_ACCESSIBLE_UNDER(element))
4382 DrawLevelFieldThruMask(jx, jy);
- SegmentationFaultWhilePlayingEvenAfterRestart3.png (1.94 MiB) Viewed 14550 times
- SegmentationFaultWhilePlayingEvenAfterRestart4-CPU_And_RAM_Info.png (52.39 KiB) Viewed 14548 times
EDITED: Don't know if it'll help but added in commands found for gdb such as backtrace, list; and memory / CPU usage info
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Wed Feb 08, 2023 5:38 pm
by Holger
Yes, very good -- thanks a lot for all the information. I will try again, and also have a look at the code reported by gdb!
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Fri Feb 10, 2023 6:35 pm
by BryanFRitt
From a default ~/.rocksndiamonds and R'n'D debug complied on Debian Stable.
Code: Select all
/usr/bin/gdb --args "/media/Environ/Compile/rocksndiamonds-4.3.4.0/rocksndiamonds" "--debug"
Installed this levelset(dragged Contributions-1.2.0.zip over R'n'D), and copied the tapes for this levelset. (~/.rocksndiamonds/levels/Contributions_1995_-_2006/Contributions_2002/rnd_ruediger_schaefer/rnd_ruediger_schaefer)
(The tape for this level in these tapes should be the same one that was already posted here, 089.tape)
Changed were some of the keyboard shortcuts/controls, audio volume levels, and enabled skipping of levels
(exited and restarted R'n'D at some point(s?) during/right after the above)
|>Playedback the tape to this area of playing, not it's end. Roughly 9m40s?
Started playing regularly after a ||pause ()record
R'n'D froze at 14:06(846) with the character on the left side
Took screenshot, etc...
Code: Select all
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
Code: Select all
(gdb) bt
#0 0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
#1 0x0000555555664b6a in DrawAllPlayers () at tools.c:4404
#2 0x00005555556bc8a3 in GameActions_RND () at game.c:12628
#3 0x00005555556baa4c in GameActions_RND_Main () at game.c:12050
#4 0x00005555556ba7e4 in GameActionsExt () at game.c:11958
#5 0x00005555556ba907 in GameActions () at game.c:12006
#6 0x000055555568dad2 in HandleGameActions () at screens.c:9516
#7 0x00005555556539b4 in EventLoop () at events.c:378
#8 0x000055555564625b in main (argc=2, argv=0x7fffffffd8d8) at main.c:7874
Code: Select all
(gdb) list
4364 // ------------------------------------------------------------------------
4365
4366 if (player_is_moving)
4367 {
4368 // handle the field the player is leaving ...
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
4370 DrawLevelField(last_jx, last_jy);
4371 else if (IS_ACCESSIBLE_UNDER(last_element))
4372 DrawLevelFieldThruMask(last_jx, last_jy);
4373 }
- SegmentationFaultWhilePlayingEvenAfterRestart5.png (70.54 KiB) Viewed 14482 times
- SegmentationFaultWhilePlayingEvenAfterRestart5-CPU_And_RAM_Info.png (54.07 KiB) Viewed 14482 times
Re: Segmentation fault on Rüdiger Schäfer Level 89
Posted: Sat Feb 11, 2023 8:18 pm
by BryanFRitt
Tried again, this time from scratch, no using the tape prior posted, this was a new one. Same Segmentation fault message, bt, and list as before. Also the character was a roughly the same spot as all the other times, on the left part of the screen. 12:46(766) Cropped the sides of the full screen image this time.
Code: Select all
Thread 1 "rocksndiamonds" received signal SIGSEGV, Segmentation fault.
0x0000555555664a0a in DrawPlayerExt (player=0x555555a1d420 <stored_player>,
drawing_stage=6) at tools.c:4369
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
Code: Select all
(gdb) bt
#0 0x0000555555664a0a in DrawPlayerExt
(player=0x555555a1d420 <stored_player>, drawing_stage=6) at tools.c:4369
#1 0x0000555555664b6a in DrawAllPlayers () at tools.c:4404
#2 0x00005555556bc8a3 in GameActions_RND () at game.c:12628
#3 0x00005555556baa4c in GameActions_RND_Main () at game.c:12050
#4 0x00005555556ba7e4 in GameActionsExt () at game.c:11958
#5 0x00005555556ba907 in GameActions () at game.c:12006
#6 0x000055555568dad2 in HandleGameActions () at screens.c:9516
#7 0x00005555556539b4 in EventLoop () at events.c:378
#8 0x000055555564625b in main (argc=2, argv=0x7fffffffd8f8) at main.c:7874
Code: Select all
(gdb) list
4364 // ------------------------------------------------------------------------
4365
4366 if (player_is_moving)
4367 {
4368 // handle the field the player is leaving ...
4369 if (IS_ACCESSIBLE_INSIDE(last_element))
4370 DrawLevelField(last_jx, last_jy);
4371 else if (IS_ACCESSIBLE_UNDER(last_element))
4372 DrawLevelFieldThruMask(last_jx, last_jy);
4373 }
- SegmentationFault6.png (1.96 MiB) Viewed 14382 times