[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58440] trunk/blender/source/gameengine/ GamePlayer/ghost/GPG_ghost.cpp: Re fixing BGE bug [#36223] Strange page fault of "Game" actuator
Daniel Stokes
kupomail at gmail.com
Sat Jul 20 05:01:55 CEST 2013
Revision: 58440
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58440
Author: kupoman
Date: 2013-07-20 03:01:50 +0000 (Sat, 20 Jul 2013)
Log Message:
-----------
Re fixing BGE bug [#36223] Strange page fault of "Game" actuator
Thanks to Campbell for helping me get a better fix put together.
Modified Paths:
--------------
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2013-07-20 01:45:18 UTC (rev 58439)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2013-07-20 03:01:50 UTC (rev 58440)
@@ -1031,10 +1031,9 @@
* removal is needed else the system will free an already freed value */
system->removeEventConsumer(&app);
- /* nodesystem relies on blendfile data, free it first */
- free_nodesystem();
-
BLO_blendfiledata_free(bfd);
+ /* G.main == bfd->main, it gets referenced in free_nodesystem so we can't have a dangling pointer */
+ G.main = NULL;
if (python_main) MEM_freeN(python_main);
}
} while (exitcode == KX_EXIT_REQUEST_RESTART_GAME || exitcode == KX_EXIT_REQUEST_START_OTHER_GAME);
@@ -1052,6 +1051,13 @@
}
}
+ /* refer to WM_exit_ext() and free_blender(),
+ * these are not called in the player but we need to match some of there behavior here,
+ * if the order of function calls or blenders state isn't matching that of blender proper,
+ * we may get troubles later on */
+
+ free_nodesystem();
+
// Cleanup
RNA_exit();
BLF_exit();
More information about the Bf-blender-cvs
mailing list