Back to the Vavoom Forum Archives


Forum

Freeze up in Vavoom and PrBoom

Tue, 22 May 2007 02:04:00

Nicholas

(I didn't put this in Bug Reports because I'm not sure it's a bug in Vavoom, due to the same thing happening in PrBoom, and as far as I know, Vavoom is not based on PrBoom.) I compiled Vavoom from SVN because of the bug with version 1.23 that prevented 64-bit users from running it (this topic). I am running Ubuntu 7.04 64 bit and have an NVIDIA GeForce 7600 GT with version 1.0-9755 of NVIDIA's proprietary Linux 64-bit drivers. I experience a freeze up in Vavoom and PrBoom when trying to play Doom. I can get into the game and move and everything seems to work fine, but after a few seconds (or right when I shoot my gun) Vavoom (also PrBoom) will freeze/lock up and the only way I can get out is to push Ctrl Alt Backspace. debug.txt:
Init: Adding ./basev/common/basepak.pk3 Init: adding ./doom.wad Init: adding /home/nicholas/.vavoom/doom.gwa Init: Adding ./basev/doom/basepak.pk3 Init: Adding ./basev/doom1/basepak.pk3 Init: Host name: nicholas-desktop Init: My IP address: 127.0.1.1 Init: UDP Initialised DevNet: TCP/IP address 127.0.1.1 Init: Selected SDL sound device Init: Configured audio device Init: Driver: alsa Init: Freqency: 44100 Init: Channels: 2 Init: Format: 8010 Init: Selected SDL midi device Init: Selected Linux CD audio device Init: CD_Init: open of "/dev/cdrom" failed (123) Init: Using 16 voices Init: Selected SDL software rasteriser Log: Executing startup.vs Log: Executing default.cfg Log: Can't find config.cfg Log: Can't find autoexec.cfg Log: Invalid bpp, using 8 Init: 1312k surface cache Log: 640x480x8. Log: timidity.cfg: No such file or directory Log: Timidity init failed Log: Playing demo from demos/demo1.dem. Log: ERROR: couldn't open. Log: Playing demo from demos/demo2.dem. Log: ERROR: couldn't open. Log: Playing demo from demos/demo3.dem. Log: ERROR: couldn't open. Log: Playing demo from demos/demo4.dem. Log: ERROR: couldn't open. Log: timidity.cfg: No such file or directory Log: Timidity init failed Dev: Spawning server e1m1 Dev: Server spawned Dev: CL_EstablishConnection: connected to local Dev: Client LOCAL connected Log: --------------------------------------- Log: E1M1: Hangar Log: Dev: Client level loaded Dev: 186 subdivides Dev: 86 seg subdivides Dev: 16k light mem Log: timidity.cfg: No such file or directory Log: Timidity init failed Log: Picked up an armor bonus.
The only reason I ever found Vavoom is because PrBoom had this issue and I couldn't get any other Doom source ports to compile. I played Doom with PrBoom when I used a 32-bit version of Ubuntu so this seems to be a 64-bit-related issue. There are two bug reports for PrBoom describing freezes/lock ups: <!-- m --><a class="postlink" href="https://launchpad.net/ubuntu/+source/prboom/+bugs">https://launchpad.net/ubuntu/+source/prboom/+bugs</a><!-- m --> Perhaps those can help you somehow. I hope I can play Doom soon. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Wed, 23 May 2007 10:10:57

scen

Please give us further details: [list=1:12xgkebi] [*:12xgkebi]version of GCC used[/*:m:12xgkebi] [*:12xgkebi]version of GLIBC used[/*:m:12xgkebi] [*:12xgkebi]version of libSDL used[/*:m:12xgkebi] [*:12xgkebi]with option have you used to compile Vavoom? (./configure <...> )[/*:m:12xgkebi] [*:12xgkebi]have you tried to use the Allegro backend (--with-allegro? Do you get the same behaviour?[/*:m:12xgkebi] [*:12xgkebi]Are you using the "software" renderer or the "opengl" rendere?[/*:m:12xgkebi] [*:12xgkebi]the games freezes randomly or when some sound is played? If you run the game with -nosound option, does it still freeze?[/*:m:12xgkebi][/list:o:12xgkebi] I also suggest you to try the 1.22.1 version, it works fine on AMD64. Tell us if the freeze happens also with this version. FYI: i'm running Vavoom 1.23 with success on Gentoo AMD64, using an nVidia Geforce 6800+1.0.9755 proprietary drivers.
Wed, 23 May 2007 10:24:41

scen

[quote="Nicholas":x4ncl2un]I compiled Vavoom from SVN because of the bug with version 1.23 that prevented 64-bit users from running it (this topic). To fix the trouble, just apply the following patch to 1.23 sources:
--- source/vclass.h	2007/04/17 21:35:04	2156
+++ source/vclass.h	2007/05/07 16:48:35	2237
@@ -375,6 +375,7 @@
 	VClass*			ParentClass;
 
 	vint32			ClassSize;
+	vint32			ClassUnalignedSize;
 	vuint32			ClassFlags;
 	VMethod**		ClassVTable;
 	void			(*ClassConstructor)();
--- source/vclass.cpp	2007/04/27 18:01:49	2191
+++ source/vclass.cpp	2007/05/18 16:27:42	2241
@@ -27,6 +27,20 @@
 #include "progdefs.h"
 #include "network.h"
 
+class DummyClass1 : public VVirtualObjectBase
+{
+public:
+	void*		Pointer;
+	vuint8		Byte1;
+	virtual void Dummy() = 0;
+};
+
+class DummyClass2 : public DummyClass1
+{
+public:
+	vuint8		Byte2;
+};
+
 bool					VMemberBase::GObjInitialised;
 VClass*					VMemberBase::GClasses;
 TArray<VMemberBase*>	VMemberBase::GMembers;
@@ -2353,6 +2367,7 @@
 , LinkNext(0)
 , ParentClass(0)
 , ClassSize(0)
+, ClassUnalignedSize(0)
 , ClassFlags(0)
 , ClassVTable(0)
 , ClassConstructor(0)
@@ -2388,6 +2403,7 @@
 , LinkNext(0)
 , ParentClass(AParent)
 , ClassSize(ASize)
+, ClassUnalignedSize(ASize)
 , ClassFlags(AClassFlags)
 , ClassVTable(0)
 , ClassConstructor(ACtor)
@@ -2477,6 +2493,8 @@
 		delete[] Defaults;
 		Defaults = NULL;
 	}
+	StatesLookup.Clear();
+	RepInfos.Clear();
 	unguard;
 }
 
@@ -2849,10 +2867,7 @@
 		return;
 	}
 
-	int PrevSize = ClassSize;
-	int size = ParentClass ? ParentClass->ClassSize : 0;
 	int numMethods = ParentClass ? ParentClass->ClassNumMethods : 0;
-	VField* PrevField = NULL;
 	for (int i = 0; i < GMembers.Num(); i++)
 	{
 		if (GMembers->MemberType != MEMBER_Method ||
@@ -2877,6 +2892,21 @@
 		}
 		M->VTableIndex = MOfs;
 	}
+
+	VField* PrevField = NULL;
+	int PrevSize = ClassSize;
+	int size = 0;
+	if (ParentClass)
+	{
+		//	GCC has a strange behavior of starting to add fields in subclasses
+		// in a class that has virtual methods on unaligned parent size offset.
+		// In other cases and in other compilers it starts on aligned parent
+		// class size offset.
+		if (sizeof(DummyClass1) == sizeof(DummyClass2))
+			size = ParentClass->ClassUnalignedSize;
+		else
+			size = ParentClass->ClassSize;
+	}
 	for (VField* fi = Fields; fi; fi = fi->Next)
 	{
 		if (fi->Type.Type == ev_bool && PrevField &&
@@ -2904,6 +2934,7 @@
 		}
 		PrevField = fi;
 	}
+	ClassUnalignedSize = size;
 	size = (size + sizeof(void*) - 1) & ~(sizeof(void*) - 1);
 	ClassSize = size;
 	ClassNumMethods = numMethods;

Back to the Vavoom Forum Archives