Crashing at ":gobj: Loading texture"

My game uses ~ 2GB of image textures for 3D and UI elements. The packaged application sometimes crashes mysteriously where the last line logged is always “:gobj: Loading texture /path/to/texture/xxxxx.jpg”

I’ve tried wrapping the load texture call in a try-except but it does not help. What do you recommend I do to resolve this problem?

Can you show me the code?

I think you might have made done some mistake in the loader.loadModel() method. Maybe ‘path/to/texture/xxxxxxxx.jpg’ is wrong?

The reason for this is because try-except only solves errors. What you are telling is a warning. So it won’t be parsed with the try-except block

Actually, crashes can’t be caught by try…except because they are crashes in the C++ code, and do not generate a Python exception.

Can you reliably reproduce the crash? Perhaps you could send me a texture so that I can reproduce it?

Are you using a 32-bit version of Python/Panda3D or a 64-bit version?

Thanks. I will also take a note of that myself

Unfortunately I cannot reliably reproduce the crash, but I noticed that crashes happen less often when fewer textures are loaded into the GUI.

I also noticed that the game often crashes when memory usage exceeds 1.2G (from task manager), regardless if the testing machine has 4 or 16G of RAM. However it does not happen 100% of the time.

I’m using Panda 1.9 and pdeploy for packaging, which is 32-bit.

Can’t wrap my head around what could possibly be the problem :confused:

Panda3D 1.9 is an outdated, no longer supported version of Panda3D. There are known crashes when dealing with large textures which have been fixed in Panda3D 1.10. I recommend updating.

Note that there is a 64-bit version of Panda3D 1.9.