Page MenuHome

Loading next game file causes crash due to Python reinitialisation
Closed, ResolvedPublic


Category: Python

On a friend's GNU/Linux computer, my game fails to load a third game file. The sequence is:

1. Load startup file (cargo.blend) in blenderplayer. This file contains some embedded python scripts.
2. Load menu file (assets/Menu.blend) using Game actuator. This file uses external python scripts.
3. Load level file (assets/Outdoors.blend) using bge.logic.startGame(). The file uses the same python scripts as 2.

Steps 1 and 2 work well, but step 3 fails: some builtin Python modules can't be loaded. From the stack trace (attached), it seems that this is related to Python bug [py17408]. That issue has been fixed, but is the fix available in Blender?

Interestingly, the same build of the game works fine on my computer and that of another friend, both of which also run GNU/Linux (mine runs Ubuntu).

Blender 2.68 r60528, downloaded from buildbot


Event Timeline

As discussed with ideasman on IRC, a fix has apparently been released for Python and should be available in version 3.3.2 [1]. Currently, Blender uses 3.3.0. I will try to run the game using a build of py 3.3.2; if that works, we might ask platform maintainers to switch to the new version.


OK! I built blender with python 3.3.2, and tonight Ben tested it on his computer. I can confirm that it fixes this bug. Can we move to py >= 3.3.2 for official builds?

Alex Fraser (z0r) changed the task status from Unknown Status to Resolved.Feb 21 2014, 9:45 AM

Latest build that uses new Python has been verified to work. Thanks, all!