LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: mudlee on January 23, 2021, 14:57:00

Title: Interpreting Crash Logs
Post by: mudlee on January 23, 2021, 14:57:00
Hi Guys!

In my spare time when my health issues give me free brain, I'm experiencing with a Vulkan & OpenGL basic renderer. OpenGL is "easy", but I'm a beginner at Vulkan. I think I now know how to use LWJGL, its memory management, but looks like I just cannot find, where I freed up something that shouldn't be freed up.

I attach the crash log here: https://gist.github.com/mudlee/3c4ca97eb28bc4e8315b39d4c490dff7 (https://gist.github.com/mudlee/3c4ca97eb28bc4e8315b39d4c490dff7). My question is not just which object is freed up it ain't not be, but also how can I interpret such a crash log to understand similar problems in the future? :)

The log, clearly says that vkCreateImageView fails, but I can't harvest out the info, which object it depends on which is not available anymore.

The project is btw available here: https://github.com/mudlee/spck-framework

Thanks for help!
Title: Re: Interpreting Crash Logs
Post by: spasi on January 23, 2021, 20:46:10
When crashing in the graphics driver (like this example), your best bet is an OpenGL debug context or Vulkan's validation layers. You should be able to get some helpful output before the crash happens.
Title: Re: Interpreting Crash Logs
Post by: mudlee on January 24, 2021, 16:21:34
Found the problem. Looks like if I malloc it instead of calloc, somewhy it generates this error. I'm not sure why cleaning up the allocated memory works though.