ReinhardPrix / FreedroidClassic

The original Freedroid, a free & open-source clone of the C64 classic 'Paradroid'.
GNU General Public License v2.0
35 stars 5 forks source link

crashes on big scaling ratio 4 (-r 4) #25

Closed matthiaskrgr closed 5 years ago

matthiaskrgr commented 6 years ago

UBSAN_OPTIONS=print_stacktrace=1 ./freedroid -r 4

found environment HOME = '/home/matthias'
Successfully opened config-file '/home/matthias/.freedroidClassic/config' for reading
Video info summary from SDL:
----------------------------------------------------------------------
Is it possible to create hardware surfaces: no
Is there a window manager available: yes
Are hardware to hardware blits accelerated: no
Are hardware to hardware colorkey blits accelerated: no
Are hardware to hardware alpha blits accelerated: no
Are software to hardware blits accelerated: no
Are software to hardware colorkey blits accelerated: no
Are software to hardware alpha blits accelerated: no
Are color fills accelerated: no
Total amount of video memory in Kilobytes: 0
Pixel format of the video device: bpp = 32, bytes/pixel = 4
Video Driver Name: x11
----------------------------------------------------------------------
Found new graphics-theme: para90
Found new graphics-theme: lanzz
Found new graphics-theme: classic
Found selected theme classic from GameConfig.
Game starts using theme: classic
Found highscore file '/home/matthias/.freedroidClassic/highscores'
ship.c:891:28: runtime error: member access within null pointer of type 'SDL_Surface' (aka 'struct SDL_Surface')
    #0 0x3b38b2 in show_droid_portrait /tmp/FreedroidClassic/src/ship.c:891:28
    #1 0x38eb15 in main /tmp/FreedroidClassic/src/main.c:103:7
    #2 0x7f46fee54222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
    #3 0x27002d in _start (/tmp/FreedroidClassic/src/freedroid+0x27002d)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ship.c:891:28 in
AddressSanitizer:DEADLYSIGNAL
=================================================================
==15499==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x0000003b34c9 bp 0x7ffddb7a02b0 sp 0x7ffddb7a01e0 T0)
==15499==The signal is caused by a READ memory access.
==15499==Hint: address points to the zero page.
    #0 0x3b34c8 in show_droid_portrait /tmp/FreedroidClassic/src/ship.c:891:28
    #1 0x38eb15 in main /tmp/FreedroidClassic/src/main.c:103:7
    #2 0x7f46fee54222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
    #3 0x27002d in _start (/tmp/FreedroidClassic/src/freedroid+0x27002d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /tmp/FreedroidClassic/src/ship.c:891:28 in show_droid_portrait
==15499==ABORTING
ReinhardPrix commented 5 years ago

thanks. yeh, not sure why 'zoomSurface()' fails in this case, but I can do here really is catch the error and terminate properly instead of crashing.