alekmaul/pvsneslib

gfx2snes Segmentation fault

jeffythedragonslayer opened this issue · 7 comments

$ gfx2snes -fbmp -pc16 -m SOM_Chocolate.bmp

gfx2snes: 'Opening graphics file: [SOM_Chocolate.bmp]'
gfx2snes: (2.5.0) version 20221120
gfx2snes: ****** O P T I O N S ***************'
gfx2snes: border=OFF
gfx2snes: highpriority=OFF
gfx2snes: blanktile=OFF
gfx2snes: collisionmap=OFF
gfx2snes: tile map pages of 32x32=OFF
gfx2snes: tile map mode 512=OFF
gfx2snes: Optimize tilemap=ON
gfx2snes: LZSS compression=OFF
gfx2snes: pixel format=bit-plane
gfx2snes: BMP file: 32x28 pixels
gfx2snes: Screen mode selected: 4x3 tile map
gfx2snes: Palette rearrange: OFF
gfx2snes: Total colors = 16
gfx2snes: Palette section to convert: Color #0 to 255
gfx2snes: ************************************
gfx2snes: 'ArrangeBlocks width=32, height=28, size=8, *xsize=4, *ysize=4, new_width=8, border=0'
gfx2snes: 'rows=16'
gfx2snes: 'MakeMap *num_tiles=16, xsize=4, ysize=4, tile_x=4, tile_y=3, colors=16, rearrange=0'
gfx2snes: 'Reduced screen to 14 tiles'
gfx2snes: 'Saving graphics file: [SOM_Chocolate.pic]'
gfx2snes: 'decode for 14 tiles and 4 bitplanes'
Segmentation fault

Github doesn't support uploading BMP files. I created SOM_Chocolate from this PNG in mspaint by doing File->Save As->256 Color Bitmap

SOM_Chocolate

image

This crash happens at the free(tilemap) call near gfx2snes.c:763

commenting out this free allows gfx2snes to exit, but the produced .pic file appears to be corrupted.

ok, is it possible to have your source bmp file to try to debug gfx2snes ?

Are you afraid your mspaint is different from mine? I'll send you the BMP over discord.

I'm afraid that github will not preserved the color palette :P ;)

Or just using a zip here ? :)

no it's ok , I have the bitmap and I can reproduce the issue