[1.33] Segfault when compiling engine.dat

Report bugs you found in any Vavoom version

[1.33] Segfault when compiling engine.dat

Postby BondEar » 06 May 2011 21:41

So I'm trying to compile the 1.33 source on Debian amd64 with GCC 4.5. It compiles fine all the way up to vavoom-dedicated.bin. And then once it gets to "Generating ../../basev/common/progs/engine.dat", then it has problems. Here's the output af
BondEar
 
Posts: 28
Joined: 04 Mar 2011 07:26

Re: [1.33] Segfault when compiling engine.dat

Postby BondEar » 18 Aug 2011 04:42

OK so I think I found out where the problem is. It's somewhere inside vcc. Valgrind shows this trace at the first error message:

[code]==17454== Command: ../../utils/vcc/../bin/vcc -P/home/jb/games/vavoom-1.33/bas
BondEar
 
Posts: 28
Joined: 04 Mar 2011 07:26

Re: [1.33] Segfault when compiling engine.dat

Postby BondEar » 12 Jan 2012 04:40

So I tried building r4431 with make -d. Here's what I got for engine.dat:

Code: Select all
       Finished prerequisites of target file `basev/common/progs/engine.dat'.
      Must remake target `basev/common/progs/engine.dat'.
make[2]: Entering directory `/home/jb/games/vavoom-svn'
[ 94%] Putting child 0x00654970 (basev/common/progs/engine.dat) PID 12113 on the
 chain.
Live child 0x00654970 (basev/common/progs/engine.dat) PID 12113
Reaping winning child 0x00654970 PID 12113
Live child 0x00654970 (basev/common/progs/engine.dat) PID 12114
Generating ../../basev/common/progs/engine.dat
Reaping winning child 0x00654970 PID 12114
Live child 0x00654970 (basev/common/progs/engine.dat) PID 12116
Reaping winning child 0x00654970 PID 12116
Live child 0x00654970 (basev/common/progs/engine.dat) PID 12118
(external):0 Segmentation Violation
Segmentation fault
Reaping losing child 0x00654970 PID 12118
make[2]: *** [basev/common/progs/engine.dat] Error 139
Removing child 0x00654970 PID 12118 from chain.
make[2]: Leaving directory `/home/jb/games/vavoom-svn'
Reaping losing child 0x01f0e9d0 PID 12112
make[1]: *** [progs/common/CMakeFiles/engine.dir/all] Error 2
Removing child 0x01f0e9d0 PID 12112 from chain.
make[1]: Leaving directory `/home/jb/games/vavoom-svn'
Reaping losing child 0x021e5950 PID 12010
make: *** [all] Error 2
Removing child 0x021e5950 PID 12010 from chain.
make: Leaving directory `/home/jb/games/vavoom-svn'


Sure would be nice to know what program these PIDs correspond to...
BondEar
 
Posts: 28
Joined: 04 Mar 2011 07:26

Re: [1.33] Segfault when compiling engine.dat

Postby BondEar » 14 Jan 2012 04:27

The error is in this line in build.make:

Code: Select all
cd /home/BondEar/games/vavoom-svn/progs/common && ../../utils/vcc/../bin/vcc -P/home/BondEar/games/vavoom-svn/basev/common/progs /home/BondEar/games/vavoom-svn/progs/common/engine/classes.vc /home/BondEar/games/vavoom-svn/basev/common/progs/engine.dat


The cd works. The problem is with vcc. Also why does vcc have this line in its main method?

Code: Select all
int main(int argc, char **argv)
{
   try
   {
      GLog.AddListener(&VccLog);

      int starttime;
      int endtime;

      M_InitByteOrder();

      signal(SIGSEGV, SignalHandler); //why?


I did try commenting it out, but it still segfaults.

Alright, so I built vcc, and used it to run the command given in build.make (where vcc compiles engine.dat). Valgrind gives this:

Code: Select all
==22967== Invalid read of size 8
==22967==    at 0x452B04: VParser::ParseStatement() (vc_parser.cpp:1126)
==22967==    by 0x453031: VParser::ParseCompoundStatement() (vc_parser.cpp:1170)
==22967==    by 0x453EA1: VParser::ParseMethodDef(VExpression*, VName, TLocation, VClass*, int, bool) (vc_parser.cpp:1375)
==22967==    by 0x457F59: VParser::ParseClass() (vc_parser.cpp:2441)
==22967==    by 0x458773: VParser::Parse() (vc_parser.cpp:2553)
==22967==    by 0x46191E: main (vcc.cpp:105)
==22967==  Address 0x8 is not stack'd, malloc'd or (recently) free'd
==22967==
/home/jb/games/vavoom-svn/progs/common/engine/LevelInfo.vc:342 Segmentation Violation


EDIT: Success, sort of. Commenting out vc_parser.cpp:1126 allowed make to finish. However when I run Vavoom it gives me "Sys_Error: Bad class size".
BondEar
 
Posts: 28
Joined: 04 Mar 2011 07:26


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 2 guests

cron