Upbge: LibFree makes BGE crash in some cases

Created on 1 Feb 2017  路  7Comments  路  Source: UPBGE/upbge

Hello! Just googled to see if I was doing something wrong, but it seems an slippery problem, according to various sources. The more relevant ones:

https://developer.blender.org/T40555
https://developer.blender.org/D1004
https://developer.blender.org/T32775

Basically, I have a function that loads and/or frees map chunks according to the current map chunk (for an easy open world like system). On a simple game it works well, but the BGE is crashing on a more complex setup, specifically when it needs to LibFree the chunks (LibLoaded as "Scene"), or it simply crashes when exiting the BGE, in both cases printing "Error: EXCEPTION_ACCESS_VIOLATION" in the console.

See the simple project (working): https://github.com/joelgomes1994/bge_openworld
See the complex project (crashing): https://github.com/joelgomes1994/bge_dw

Both projects are loading scenes through LibLoad in "Scene" mode, and each map chunk is assembled through linked libraries. In "bge_dw", the "load_chunks" function is inside of "//scripts/player/spatial.py". I don't know if it's relevant.

Oh yes, the system is Windows 7 64 bit, and tested on UPBGE 0.1.2, 0.1.3 and 0.1.4.

bug

All 7 comments

Just deactivated animations from "//libs/vegetation/bushes.blend", now it stopped crashing when exiting BGE, and most of the times it LibFree map chunks, but still crashes sometimes. As I read somewhere, LibLoading an "Scene" where animations play leads to crashes and unexpected behavior.

@joelgomes1994 : Could you test with the recent master ?

Sorry for the late response, @panzergame .
Is there any minimal build available? I can't build by myself.

@youle31 or @AkiraSan1 ? :P

Working very well now, with no crashes or error messages, both in the embedded player and standalone player. Nice job with the fix, and thanks a lot! :smile:

Thanks for feedback! I close the report then :) Thanks panzergame!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marechal-p picture marechal-p  路  6Comments

EndSSgamesStudio picture EndSSgamesStudio  路  4Comments

UnidayStudio picture UnidayStudio  路  4Comments

EndSSgamesStudio picture EndSSgamesStudio  路  7Comments

joelgomes1994 picture joelgomes1994  路  4Comments