From ced3b0fd6f4740a5fa9eba3f78b490a4a5467168 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 26 Nov 2006 12:23:21 +0000 Subject: SculptMode fix: DNA definition of Sculpt structs in Scene were not properly aligned, causing memory errors on quit ("Memoryblock reconstruct: end corrupt"). More testing reveiled padding errors in two other DNA_ includes, for sound and gamelogic. Both potentially crashers... and caused by commenting out struct members with a C++ comment, that seems to not work... I've revived the DNA padding test method, which saves out a simple C file you can compile to see where padding issues are. This now works as follows: - change line 991 in makesdna.c to become (1) (true). - recompile makesdna.c - you now have a padding.c in the same dir as makesdna.c - compile it, command line: "gcc -o padding padding.c" - now run it (./padding), and it will print out errors, if there are. For me, the DNA files are now 100% padding free. Might be interesting to check it in 64 bits though! --- source/blender/makesdna/DNA_sound_types.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender/makesdna/DNA_sound_types.h') diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index 1ec788976df..27b9c373484 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -103,8 +103,6 @@ typedef struct bSound { float distance; int flags; int streamlen; -// unsigned int loopstart; -// unsigned int loopend; char channels; char highprio; char pad[10]; -- cgit v1.2.3