Upbge: Youle said: `libload bug` (Fixed by panzergame). Other crash in this file

Created on 18 Nov 2018  路  6Comments  路  Source: UPBGE/upbge

When running the attached game demo with UPBGE 0.2.4, a crash happens in different ways depending on the OS: BGEz_LandGen.zip

Ubuntu: Crash when hitting the ground, or roughly ~10 seconds in.
Windows (youle): Crash after ~10 seconds.

Fred/K.S. is using 0.2.0 and he seems to have no issues (windows).

@youle31 said this was a libload bug. I believe him.

bug

All 6 comments

I said, if it is a libload bug, we shouldn't use libload :P

LibLoad is a very important feature that allows the developers to efficiently manage what is needed and what is not. We should use LibLoad!

This bug has been fixed by panzergame in last master, however, this file still crashes. This is possibly related to: https://github.com/UPBGE/blender/commit/fb1f17288108154a7c1eeed950d9de41cd9c6bf8 but i didn't test to revert yet.

Just wanted to add something here because I am not clear whether it is addressed by the commit. Unlike what happens in Blender I can't get UPBGE 0.24 to free a library that is added with libLoad (rather than libNew).

Compare results in Blender with UPBGE of this code:

from bge import logic, events

def loadTest(cont):     
    freeWarmUp()
    logic.LibLoad("//Test.blend","Scene")
    print("libraries 5:",logic.LibList()) 
def loadWarmUp(cont):
    print("libraries 1:",logic.LibList())       
    logic.LibLoad("//WarmUp.blend","Scene")
    print("libraries 2:",logic.LibList())  
def freeWarmUp():   
    print("libraries 3:",logic.LibList())
    path = logic.expandPath("//WarmUp.blend")     
    logic.LibFree(path)
    print("should free Warm Up",path)
    print("libraries 4:",logic.LibList())

--
IN BLENDER 2.79 - it works giving:
Blender Game Engine Started

libraries 1: []
libraries 2: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
libraries 3: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
should free Warm Up C:\Users\michPC2\Documents\WarmUp.blend
libraries 4: []
libraries 5: ['C:\\Users\\michPC2\\Documents\\Test.blend']
Blender Game Engine Finished

IN UPBGE 0.24 - the WarmUp Library persists even though all the objects are released in runtime:

Blender Game Engine Started
libraries 1: []
libraries 2: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
libraries 3: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
should free Warm Up C:\Users\michPC2\Documents\WarmUp.blend
libraries 4: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend']
libraries 5: ['C:\\Users\\michPC2\\Documents\\WarmUp.blend', 'C:\\Users\\michPC2\\Documents\\Test.blend']

Blender Game Engine Finished

This file works OK in current 0.2.5 in windows.
Thanks for reporting. Closing now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RomStef picture RomStef  路  4Comments

EndSSgamesStudio picture EndSSgamesStudio  路  4Comments

maconbot picture maconbot  路  5Comments

vlad0337187 picture vlad0337187  路  7Comments

cederom picture cederom  路  7Comments