Skip to content

Using 8bpp within SDL 1.2 will freeze or crash OS upon exit #261

@gameblabla

Description

@gameblabla

I noticed this for a while when linking to the new lcd_blit API with SDL 1.2.
When you use the 8bpp mode then quit, it will just crash.

One game where i noticed this was Worship Vector. I also noticed it in other games at the time but forgot whom.
I also debugged the game on PC and found that there was no leaks sooo yeah.

https://github.com/gameblabla/worship-vector

worship.tns.zip

Thought using a newer ndless would have fixed this but sadly, it doesn't.

EDIT: Oh and yeah, it didn't have the SDL_FreeSurface for its main screen surface, which i added later.
Despite this, and the fact that the game never attempts to allocate memory in the heap, it still crashes.

EDIT2:
Vogtinator/nSDL@22fddb3

It seems to me that buffer2 is never being freed. In fact, it seems that even buffer is also seemingly not freed from memory.
However i did just that (made a small patch against it) and it still crashes and reboots the calc unfortunately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions