curioustorvald / Terrarum

Modular game engine for a side-scrolling tilemap platformer, and a game that runs on top of it
Other
13 stars 0 forks source link

Certain combination of screen size produces segfault and more random memory-related errors #36

Closed curioustorvald closed 3 years ago

curioustorvald commented 3 years ago

Step to reproduce: just launch the game with a screen size of 1280x720

My experiment reveals that the problem lies within the UnsafePtr, as disabling any write/read from that class "solves" the issue

curioustorvald commented 3 years ago

The culprit was the Out-of-Bounds accessing of UnsafeCvecArray caused by the lightmap renderer. Fixed it by making UnsafeCvecArray have extra room on its internal memory