But It should have crashed :), every dynamic enum was accessing freed memory.
This is still precarious - any one of these enums stored for access after the iterator ends can crash on access. On Fri, Sep 30, 2011 at 5:51 PM, Dalai Felinto <[email protected]> wrote: > Using windows default python setting wasn't crashing either, just so you > know. (Built with Scons+msvc 32bits) > > -- > Dalai > > Campbell Barton <[email protected]> wrote: > >>Revision: 40709 >> >> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40709 >>Author: campbellbarton >>Date: 2011-09-30 07:47:45 +0000 (Fri, 30 Sep 2011) >>Log Message: >>----------- >>fix for crash generating messages.txt, I wasn't getting this crash because I >>had 'WITH_PYTHON_SAFETY' enabled which was using different iterators (which >>dont crash), now there on by default. >> >>made headless and no-python configurations work again and added >>--factory-startup to doc building command. >> >>Modified Paths: >>-------------- >> trunk/blender/GNUmakefile >> trunk/blender/po/README.txt >> trunk/blender/source/blender/editors/interface/interface_draw.c >> trunk/blender/source/blender/python/intern/bpy_rna.h >> trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c >> trunk/blender/source/blender/windowmanager/intern/wm_operators.c >> >>Modified: trunk/blender/GNUmakefile >>=================================================================== >>--- trunk/blender/GNUmakefile 2011-09-30 05:36:56 UTC (rev 40708) >>+++ trunk/blender/GNUmakefile 2011-09-30 07:47:45 UTC (rev 40709) >>@@ -164,7 +164,7 @@ >> # Other Targets >> # >> translations: >>- $(BUILD_DIR)/bin/blender --background --python po/update_msg.py >>+ $(BUILD_DIR)/bin/blender --background --factory-startup --python >>po/update_msg.py >> python3 po/update_pot.py >> python3 po/update_po.py >> python3 po/update_mo.py >> >>Modified: trunk/blender/po/README.txt >>=================================================================== >>--- trunk/blender/po/README.txt 2011-09-30 05:36:56 UTC (rev 40708) >>+++ trunk/blender/po/README.txt 2011-09-30 07:47:45 UTC (rev 40709) >>@@ -37,9 +37,10 @@ >> >> If there's no message in .po file you want to translate, probably .po file >> should be updated. >> Use the following steps for this: >>-- With newly compiled blender run `blender --background --python >>update_msg.py` to update >>- messages.txt file (this file contains strings collected automatically from >>RNA system and >>- python UI scripts) >>+- With newly compiled blender run: >>+ `blender --background --factory-startup --python update_msg.py` >>+ to update messages.txt file (this file contains strings collected >>+ automatically from RNA system and python UI scripts) >> - Run update_pot.py script which will update blender.pot file. This file >> contains all >> strings which should be transated. >> - Run update_po.py script to merge all .po files with blender.pot (so all >> .po files >> >>Modified: trunk/blender/source/blender/editors/interface/interface_draw.c >>=================================================================== >>--- trunk/blender/source/blender/editors/interface/interface_draw.c >>2011-09-30 05:36:56 UTC (rev 40708) >>+++ trunk/blender/source/blender/editors/interface/interface_draw.c >>2011-09-30 07:47:45 UTC (rev 40709) >>@@ -466,6 +466,7 @@ >> { >> #ifdef WITH_HEADLESS >> (void)rect; >>+ (void)but; >> #else >> ImBuf *ibuf= (ImBuf *)but->poin; >> //GLint scissor[4]; >> >>Modified: trunk/blender/source/blender/python/intern/bpy_rna.h >>=================================================================== >>--- trunk/blender/source/blender/python/intern/bpy_rna.h 2011-09-30 >>05:36:56 UTC (rev 40708) >>+++ trunk/blender/source/blender/python/intern/bpy_rna.h 2011-09-30 >>07:47:45 UTC (rev 40709) >>@@ -44,9 +44,6 @@ >> /* support for inter references, currently only needed for corner case */ >> #define USE_PYRNA_STRUCT_REFERENCE >> >>-/* use real collection iterators rather than faking with a list */ >>-#define USE_PYRNA_ITER >>- >> #else /* WITH_PYTHON_SAFETY */ >> >> /* default, no defines! */ >>@@ -67,6 +64,11 @@ >> * so prefer the leak to the memory bloat for now. */ >> // #define PYRNA_FREE_SUPPORT >> >>+/* use real collection iterators rather than faking with a list >>+ * this is needed so enums can be iterated over without crashing, >>+ * since finishing the iteration frees temp allocated enums */ >>+#define USE_PYRNA_ITER >>+ >> /* --- end bpy build options --- */ >> >> struct ID; >> >>Modified: trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c >>=================================================================== >>--- trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c >>2011-09-30 05:36:56 UTC (rev 40708) >>+++ trunk/blender/source/blender/windowmanager/intern/wm_init_exit.c >>2011-09-30 07:47:45 UTC (rev 40709) >>@@ -427,6 +427,8 @@ >> * the pyDriver bug can be fixed if it happens again we can >> deal with it then */ >> BPY_python_end(); >> } >>+#else >>+ (void)do_python; >> #endif >> >> GPU_global_buffer_pool_free(); >> >>Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c >>=================================================================== >>--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c >>2011-09-30 05:36:56 UTC (rev 40708) >>+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c >>2011-09-30 07:47:45 UTC (rev 40709) >>@@ -1208,9 +1208,6 @@ >> >> static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void >> *UNUSED(arg)) >> { >>- extern char datatoc_splash_png[]; >>- extern int datatoc_splash_png_size; >>- >> uiBlock *block; >> uiBut *but; >> uiLayout *layout, *split, *col; >>@@ -1219,9 +1216,17 @@ >> int i; >> MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE); >> char url[96]; >>- /* hardcoded to splash, loading and freeing every draw, eek! */ >>+ >>+#ifndef WITH_HEADLESS >>+ extern char datatoc_splash_png[]; >>+ extern int datatoc_splash_png_size; >>+ >> ImBuf *ibuf= IMB_ibImageFromMemory((unsigned char*)datatoc_splash_png, >> datatoc_splash_png_size, IB_rect); >>- >>+#else >>+ ImBuf *ibuf= NULL; >>+#endif >>+ >>+ >> #ifdef WITH_BUILDINFO >> int ver_width, rev_width; >> char *version_str = NULL; >> >>_______________________________________________ >>Bf-blender-cvs mailing list >>[email protected] >>http://lists.blender.org/mailman/listinfo/bf-blender-cvs > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > -- - Campbell _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
