protrekkr
protrekkr copied to clipboard
Crash on startup
Building on Manjaro Linux went smoothly but the program struggles to run -- I tried on two machines and was briefly able to see the user interface on one, but the crashes soon followed; on the other, crashes were immediate. The crashes are inconsistent, which hints at a threading & pointers issue:
[user@system distrib]$ ./ptk_linux ptk_linux: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Aborted (core dumped) [user@system distrib]$ ./ptk_linux Segmentation fault (core dumped) [user@system distrib]$ ./ptk_linux free(): invalid pointer Aborted (core dumped)
Indeed there's an assertion in linux 64 bit (debian) and a seg fault in 32 bit flavour, i'll investigate.
It should now work on Linux 64 bit (it least it does in VirtualBox) but it refuses to work on Linux 32 bit (where it segfault in SDL_SetPalette()).
Pulled and rebuilt, tried again on Linux 64-bit (Manjaro). Same issues, different errors on different attempts to run:
free(): invalid pointer
Aborted (core dumped)
ptk_linux: malloc.c:2617: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted (core dumped)
On the last run, I was able to see the interface for about 4 seconds before it crashed out with just "Segmentation fault (core dumped)".
There are several errors and they all are occurring inside SDL, i don't know why (the tracker works perfectly in Windows & FreeBSD), it could also be some GCC quirks. I guess they'll hopefully be fixed when i'll switch it to SDL2 and true colors.
Try it again, it should work now...
It does work now, thanks!
On this system, I guess it was crashing about when the splash screen was going to disappear. Now it disappears with no crash, and the program can load modules and play them. The pattern editor area is still totally black, but I guess that's some incompatibility between my system and the graphics rendering.
Check if you're using sdl12-compat.
Yes, I am using that. Is it known to break the graphics, or it's required?
@voidshine It seems to break SDL_Draw because it only has a compatibility layer for SDL_GFX instead. See #11 for details.
I see, yes #11 is exactly my new problem, but this old crashing problem is indeed fixed so I'll close the issue. Thanks for your work on this, I'm looking forward to getting into this when I can get a chance to hack & track!