Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fireballs can crash the game #26

Closed
predator8bit opened this issue Mar 1, 2019 · 11 comments
Closed

Fireballs can crash the game #26

predator8bit opened this issue Mar 1, 2019 · 11 comments
Labels
bug Something isn't working

Comments

@predator8bit
Copy link

I saved just before a crash here, and the save loads nicely. The previous one only worked if I created a new game with the character and then loaded into the game.

Something fishy is going on with the firemage projectiles, the sound effect repeats when going through walls and in some cases they damage through walls ( I can't remember if this is vanilla behaviour or not).

crash2.zip

Originally posted by @predator8bit in #24 (comment)

@AJenbo
Copy link
Member

AJenbo commented Mar 1, 2019

The game didn't crash for me, but the monsters also never attacked. I'm guessing this is because of #22 . Basically the playback never reports the end of the audio so the monsters don't know when it is time to attack. Garbad is a bit differen't I think because you can interrupt his scrolling text dialog.

@predator8bit
Copy link
Author

Interesting, I deleted the original save file and extracted this one into my saves folder. The crash still happens seconds after loading into the game with that character.

@predator8bit
Copy link
Author

Terminal output of the game after the crash:

DUMMY: exception_install_filter @ /home/ajenbo/devilutionX/SourceX/fault.cpp:12
DUMMY: j_exception_init_filter @ /home/ajenbo/devilutionX/SourceX/fault.cpp:17
DUMMY: GetSystemInfo @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:412
DUMMY: CreateFileMappingA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:488
DUMMY: RestrictedTest @ /home/ajenbo/devilutionX/SourceX/restrict.cpp:5
DUMMY: ReadOnlyTest @ /home/ajenbo/devilutionX/SourceX/restrict.cpp:11
DUMMY: exception_get_filter @ /home/ajenbo/devilutionX/SourceX/fault.cpp:5
DUMMY: FindWindowA : class: DIABLO window: (null)
DUMMY: LoadIconA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:335
DUMMY: LoadCursorA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:350
DUMMY: LoadImageA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:344
DUMMY: RegisterClassExA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:303
DUMMY: UpdateWindow @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:286
DUMMY: dx_init @ /home/ajenbo/devilutionX/SourceX/dx.cpp:361
DUMMY: UiAppActivate @ /home/ajenbo/devilutionX/SourceX/DiabloUI/diabloui.cpp:431
DUMMY: GetWindowLongA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:592
DUMMY: SetWindowLongA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:598
DUMMY: SDrawRealizePalette @ /home/ajenbo/devilutionX/SourceX/storm.cpp:457
DUMMY: DefWindowProcA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:586
DUMMY: CreatePalette @ /home/ajenbo/devilutionX/SourceX/dx.cpp:274
DUMMY: SetPalette @ /home/ajenbo/devilutionX/SourceX/dx.cpp:195
DUMMY: WaitForVerticalBlank @ /home/ajenbo/devilutionX/SourceX/dx.cpp:346
DUMMY: snd_init @ /home/ajenbo/devilutionX/SourceX/sound.cpp:90

SND INIT
Opened 8 sound channels

DUMMY: GetFileVersionInfoSizeA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:125
DUMMY: GetFileVersionInfoA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:133
DUMMY: VerQueryValueA @ /home/ajenbo/devilutionX/SourceX/miniwin.cpp:141
DUMMY: SFileSetBasePath @ /home/ajenbo/devilutionX/SourceX/storm.cpp:451
DUMMY: SFileSetBasePath @ /home/ajenbo/devilutionX/SourceX/storm.cpp:451
DUMMY: play_movie : gendata\logo.smk
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: snd_playing @ /home/ajenbo/devilutionX/SourceX/sound.cpp:49
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: sound_create_primary_buffer @ /home/ajenbo/devilutionX/SourceX/sound.cpp:128
DUMMY: snd_playing @ /home/ajenbo/devilutionX/SourceX/sound.cpp:49
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: SDrawGetFrameWindow @ /home/ajenbo/devilutionX/SourceX/storm.cpp:239
DUMMY: UiProfileGetString @ /home/ajenbo/devilutionX/SourceX/DiabloUI/diabloui.cpp:395
DUMMY: snd_playing @ /home/ajenbo/devilutionX/SourceX/sound.cpp:49
DUMMY: snd_playing @ /home/ajenbo/devilutionX/SourceX/sound.cpp:49
DUMMY: UiSetupPlayerInfo @ /home/ajenbo/devilutionX/SourceX/DiabloUI/diabloui.cpp:403
DUMMY: SNetGetGameInfo @ /home/ajenbo/devilutionX/SourceX/storm_net.cpp:64
DUMMY: SNetGetGameInfo @ /home/ajenbo/devilutionX/SourceX/storm_net.cpp:64
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: IsLost @ /home/ajenbo/devilutionX/SourceX/dx.cpp:162
DUMMY: BltFast @ /home/ajenbo/devilutionX/SourceX/dx.cpp:72
DUMMY: DispatchMessageA @ /home/ajenbo/devilutionX/SourceX/miniwin_msg_sdl.cpp:272
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: GetFileAttributesA : file: /home/predator8bit/.local/share/diasurgical/devilution\single_1.sv (/home/predator8bit/.local/share/diasurgical/devilution/single_1.sv)
DUMMY: SetFileAttributesA : file: /home/predator8bit/.local/share/diasurgical/devilution\single_1.sv
DUMMY: CreateFileA : file: /home/predator8bit/.local/share/diasurgical/devilution\single_1.sv (/home/predator8bit/.local/share/diasurgical/devilution/single_1.sv)
DUMMY: GetFileSize @ /home/ajenbo/devilutionX/SourceX/miniwin_io.cpp:53
DUMMY: ReadFile @ /home/ajenbo/devilutionX/SourceX/miniwin_io.cpp:42
DUMMY: SetFilePointer @ /home/ajenbo/devilutionX/SourceX/miniwin_io.cpp:79
DUMMY: CloseHandle @ /home/ajenbo/devilutionX/SourceX/miniwin_io.cpp:131
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: music_stop @ /home/ajenbo/devilutionX/SourceX/sound.cpp:160
DUMMY: sound_create_primary_buffer @ /home/ajenbo/devilutionX/SourceX/sound.cpp:128
DUMMY: SDrawRealizePalette @ /home/ajenbo/devilutionX/SourceX/storm.cpp:457
DUMMY: SDrawRealizePalette @ /home/ajenbo/devilutionX/SourceX/storm.cpp:457
DUMMY: snd_update @ /home/ajenbo/devilutionX/SourceX/sound.cpp:38
Segmentation fault (core dumped)

@AJenbo
Copy link
Member

AJenbo commented Mar 1, 2019

Unfortunately that doesn't give much more information then that it's an illegal memory access issue. I have attached a Debug build, could you test using it and see if that gives some more information.

devilutionx.zip

@AJenbo
Copy link
Member

AJenbo commented Mar 1, 2019

Finally got the issue to replicate, if i go threw the exit twice the monsters awake and after a bit of fighting i to an error when the fireball checks if it's path is blocked:

0x56af841c is located 28 bytes to the right of global variable 'dPiece' defined in '/home/ajenbo/code/devilutionX/Source/gendung.cpp:21:5' (0x56aec000) of size 50176
0x56af841c is located 4 bytes to the left of global variable 'dTransVal' defined in '/home/ajenbo/code/devilutionX/Source/gendung.cpp:22:6' (0x56af8420) of size 12544
....

=31592==The signal is caused by a READ memory access.
    #0 0x5676ad73 in CheckBlock(int, int, int, int) /home/ajenbo/code/devilutionX/Source/missiles.cpp:431
    #1 0x56791491 in MI_Fireball(int) /home/ajenbo/code/devilutionX/Source/missiles.cpp:4477
    #2 0x567aa66a in ProcessMissiles() /home/ajenbo/code/devilutionX/Source/missiles.cpp:6342
    #3 0x566bcde2 in game_logic() /home/ajenbo/code/devilutionX/Source/diablo.cpp:1923
    #4 0x566bcc28 in game_loop(int) /home/ajenbo/code/devilutionX/Source/diablo.cpp:1898
    #5 0x566b1d30 in run_game_loop(unsigned int) /home/ajenbo/code/devilutionX/Source/diablo.cpp:181
    #6 0x566b1a14 in StartGame(int, int) /home/ajenbo/code/devilutionX/Source/diablo.cpp:125
    #7 0x56766dca in mainmenu_init_menu(int) /home/ajenbo/code/devilutionX/Source/mainmenu.cpp:140
    #8 0x56766d7e in mainmenu_single_player() /home/ajenbo/code/devilutionX/Source/mainmenu.cpp:127
    #9 0x56766c1a in mainmenu_loop() /home/ajenbo/code/devilutionX/Source/mainmenu.cpp:99
    #10 0x566b2375 in WinMain(void*, void*, char*, int) /home/ajenbo/code/devilutionX/Source/diablo.cpp:315
    #11 0x566aee3b in main /home/ajenbo/code/devilutionX/SourceX/main.cpp:23
    #12 0xf735cb40 in __libc_start_main (/lib/i386-linux-gnu/libc.so.6+0x1ab40)
    #13 0x565fc450  (/home/ajenbo/code/devilutionX/build32/devilutionx+0x37450)

@AJenbo
Copy link
Member

AJenbo commented Mar 1, 2019

Managed to track it down to this coordinate being checked:
x: 112, y: 36

112 is the edge of the map so possibly the values here haven't been properly initialized in nSolidTable :/

@AJenbo
Copy link
Member

AJenbo commented Mar 1, 2019

Although I wasn't able to replicate the crash in upstream it did actually exhibit some of the same issues:

  • Lazerous doesn't start the dialog and doesn't wake properly.
  • Fireballs continue flying after hitting a solid object (this is probably what leads to the crash devolutionX as they continue flying to the end of the map).
    image

@AJenbo
Copy link
Member

AJenbo commented Mar 2, 2019

@predator8bit the issue now has a fix, just so that you don't have to wait with testing until the next release here is a special build with the fix in it:
--removed--
(you will have to set it to executable your self since GitHub only allows zip in comments)

@predator8bit
Copy link
Author

predator8bit commented Mar 2, 2019

Yes, the fireballs no longer damage through walls with this version.

Just checked: the game is beatable now for sure.

@mewmew
Copy link
Contributor

mewmew commented Mar 2, 2019

Thanks for the bug reports @predator8bit, they definitely help identify and fix the remaining issues in Devilution (the backend of DevilutionX, so to speak).

@AJenbo
Copy link
Member

AJenbo commented Mar 2, 2019

The issue with Lazurus not triggering when entering his room has also been fixed now: diasurgical/devilution#595

The issues will thereby be fixed in devilutionX the next time we do a syn so going to close this issue.

@AJenbo AJenbo closed this as completed Mar 2, 2019
@AJenbo AJenbo added the bug Something isn't working label Mar 23, 2019
@AJenbo AJenbo changed the title Game crashes when dealing with fire mages. Fireballs can crash the game Mar 23, 2019
kphoenix137 added a commit to kphoenix137/devilutionX that referenced this issue Mar 29, 2024
kphoenix137 added a commit to kphoenix137/devilutionX that referenced this issue Mar 31, 2024
kphoenix137 added a commit to kphoenix137/devilutionX that referenced this issue Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants