r12663 Linux - build broken

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

r12663 Linux - build broken

Post by Mets »

I was updating my build from a version from a few months ago to the latest revision, 12663, and I seem to have broke my build. I get the following when I try to launch ./vegaserver

Code: Select all

Vegastrike Server version 0.2
Written by Stephane Vaxelaire


OS:..............Linux
CPU:.............Intel 386+
endian:..........little
ptr size:........32-bits
64-bit ints......yes
floating point...enabled

Loading server config...Found data in /home/cfw/vegastrike/data/
Using /home/cfw/vegastrike/data as data directory
Using .vegastrike as the home directory
Found MODDIR = /home/cfw/vegastrike/data/mods
USING HOMEDIR : /home/cfw/.vegastrike As the home directory
CONFIGFILE - Found a config file in home directory, using : /home/cfw/.vegastrike/vegastrike.config
DATADIR - No datadir specified in config file, using ; /home/cfw/vegastrike/data
SIMULATION_ATOM: 0.05
Attempt to call ReadFull on a bad file units.csv
Segmentation fault
Any ideas?
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: r12663 Linux - build broken

Post by pheonixstorm »

sounds like what i get on a win32 build from 12613... hope theres a connection I can use to track down the win bug of that file.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

pheonixstorm wrote:sounds like what i get on a win32 build from 12613... hope theres a connection I can use to track down the win bug of that file.
I bet there is a connection - this built perfectly around late December (I put the server up on Christmas Eve). Not sure what's been changed since that revision, looks like it was r12574, and the current one and how it affected that file. I'll try and see what the last revision I can compile on is.
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

According to the Wiki page on compiling, you don't need to recompile if the data dir has changed, but you do if the /vegastrike directory has changed. I rolled back my /vegastrike dir to 12612, right before the one you're having trouble with, and I'm getting an error on the same file.

EDIT
I tried it with r12574, my last working revision, despite the data directory being at r12663, and it is now compiling :?
Last edited by Mets on Sun Feb 28, 2010 9:06 am, edited 1 time in total.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: r12663 Linux - build broken

Post by chuck_starchaser »

Hold on; something's broken in code, it seems. I was building and running vegaserver just the other day; and now it segfaults on me.
I'll have to use dbg and find out.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: r12663 Linux - build broken

Post by chuck_starchaser »

Solved.
The problem arises with -O3. With optimizations at -O2 it works fine.
I will change the default back to -O2; or you can manually,

make clean
./bootstrap-sh
./configure --enable-release=2 --disable-debug --enable-cubemap
make

Fixed configure.ac on svn. r12665
Thanks for the heads up.
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

Thank you Chuck, I will try compiling it again tomorrow. I left the multiplayer server on r12574 for now - don't think anybody will notice any compatibility problems.

pheonixstorm, do you think this fix helps us over in windows land (thanks for your efforts on this btw)?

Mets
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

Chuck, what is the O3/O2 setting you're talking about - something with graphics? I thought I told it not to build any of that since this is server only.. :?
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: r12663 Linux - build broken

Post by chuck_starchaser »

It's the Optimization level. O3 is really agressive, and it takes a few chances for the sake of speeding up the code; like "assuming no aliasing" is downright gambling. I set the default to O3 last week for the sake of the game; not of the server; but there seems to be no elegant way of having one optimization level for vegastrike, and another for vegaserver; so now it's back to 2.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: r12663 Linux - build broken

Post by pheonixstorm »

no, not a fix for win32. The build I had that problem with was r12613 I started when 12614 or 15 was the latest and at the time I started it no one was sure how to get cubemaps into the win32 build.. and now head is way way ahead of 12613 and I got cubemaps into the win32 build so i'm just hoping I dont have that problem when I compile the head revision.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: r12663 Linux - build broken

Post by chuck_starchaser »

Well, this is unrelated to the windows build; I didn't change anything for windows, so I don't need to change anything back.
Just make sure you don't set "assume no aliasing" in VCC.
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

Mets wrote:I was updating my build from a version from a few months ago to the latest revision, 12663, and I seem to have broke my build. I get the following when I try to launch ./vegaserver

Code: Select all

Vegastrike Server version 0.2
Written by Stephane Vaxelaire


OS:..............Linux
CPU:.............Intel 386+
endian:..........little
ptr size:........32-bits
64-bit ints......yes
floating point...enabled

Loading server config...Found data in /home/cfw/vegastrike/data/
Using /home/cfw/vegastrike/data as data directory
Using .vegastrike as the home directory
Found MODDIR = /home/cfw/vegastrike/data/mods
USING HOMEDIR : /home/cfw/.vegastrike As the home directory
CONFIGFILE - Found a config file in home directory, using : /home/cfw/.vegastrike/vegastrike.config
DATADIR - No datadir specified in config file, using ; /home/cfw/vegastrike/data
SIMULATION_ATOM: 0.05
Attempt to call ReadFull on a bad file units.csv
Segmentation fault
Any ideas?
chuck_starchaser wrote:Solved.
The problem arises with -O3. With optimizations at -O2 it works fine.
I will change the default back to -O2; or you can manually,

make clean
./bootstrap-sh
./configure --enable-release=2 --disable-debug --enable-cubemap
make

Fixed configure.ac on svn. r12665
Thanks for the heads up.
I'm actually still getting this error, despite trying this, on anything past r12574...any ideas on how to fix it?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: r12663 Linux - build broken

Post by klauss »

What about a stacktrace?

$ gdb vegastrike
...
(gdb) run
...
segmentation fault
(gdb) bt
<copypaste what shows here>
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

Code: Select all

(gdb) bt
#0  0xb7b57556 in raise () from /lib/libc.so.6
#1  0xb7b58d78 in abort () from /lib/libc.so.6
#2  0xb7d71988 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/libstdc++.so.6
#3  0xb7d6f865 in ?? () from /usr/lib/libstdc++.so.6
#4  0xb7d6f8a2 in std::terminate () from /usr/lib/libstdc++.so.6
#5  0xb7d6f9da in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0xb7d0794f in std::__throw_logic_error () from /usr/lib/libstdc++.so.6
#7  0xb7d4b8da in ?? () from /usr/lib/libstdc++.so.6
#8  0xb7d4b9d6 in std::basic_string<char, std::char_traits<char>, std::allocator
<char> >::basic_string () from /usr/lib/libstdc++.so.6
#9  0x083f3564 in Unit::LoadRow ()
#10 0x08457633 in Unit::Init ()
#11 0x08458a65 in Unit::Unit ()
#12 0x086e4a58 in UnitFactory::createUnit ()
#13 0x08719bba in NetServer::loadFromNewGame ()
#14 0x0871b9de in NetServer::chooseShip ()
#15 0x0871ea57 in NetServer::processPacket ()
#16 0x0871d0d8 in NetServer::recvMsg_tcp ()
#17 0x0872413d in NetServer::checkMsg ()
#18 0x0872889a in NetServer::start ()
#19 0x087383d2 in main ()
It compiled under a fresh checkout of head (r12793), but it doesn't seem to read the account server anymore. You get prompted for a ship, and when you try to login you get that.

Wish I could be more helpful on fixing bugs, but I'm afraid my C knowledge isn't so super. I know NetServer has been modified quite a bit since 0.5, perhaps something has changed that's causing this.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: r12663 Linux - build broken

Post by klauss »

It's probable that the units.csv you're using isn't compatible with the latest version?
(missing columns?)

Obviously it crashes attempting to load a unit. I'll see about logging errors of that kind, instead of just dying. Might be useful.

In the meanwhile, you could try enabling debugging symbols (it would add line numbers to the backtrace, which would be helpful).

You'd have to rebuild with ./configure --enable-debug
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

Sure, here's what it said in debug mode

Code: Select all

(gdb) bt
#0  0xb7b78556 in raise () from /lib/libc.so.6
#1  0xb7b79d78 in abort () from /lib/libc.so.6
#2  0xb7d92988 in __gnu_cxx::__verbose_terminate_handler ()
   from /usr/lib/libstdc++.so.6
#3  0xb7d90865 in ?? () from /usr/lib/libstdc++.so.6
#4  0xb7d908a2 in std::terminate () from /usr/lib/libstdc++.so.6
#5  0xb7d909da in __cxa_throw () from /usr/lib/libstdc++.so.6
#6  0xb7d2894f in std::__throw_logic_error () from /usr/lib/libstdc++.so.6
#7  0xb7d6c8da in ?? () from /usr/lib/libstdc++.so.6
#8  0xb7d6c9d6 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
#9  0x083f3564 in Unit::LoadRow ()
#10 0x08457633 in Unit::Init (this=0xa06a968,
    filename=0xa073f5c "Lancelot.stock", SubU=false, faction=0,
    unitModifications=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xbf9b157c "\224\006Ü·\b"}}, flightgrp=0xa069578, fg_subnumber=0, netxml=0x0)
    at src/cmd/unit_generic.cpp:1334
#11 0x08458a65 in Unit (this=0xa06a968, filename=0xa073f5c "Lancelot.stock",
    SubU=false, faction=0, unitModifications=
        {static npos = 4294967295, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xb---Type <return> to continue, or q <return> to quit---
f9b15d8 "\224\006Ü·"}}, flightgrp=0xa069578, fg_subnumber=0, netxml=0x0)
    at src/cmd/unit_generic.cpp:811
#12 0x086e4a58 in UnitFactory::createUnit ()
#13 0x08719bba in NetServer::loadFromNewGame ()
#14 0x0871b9de in NetServer::chooseShip ()
#15 0x0871ea57 in NetServer::processPacket (this=0x9764d90, clt=
        {px = 0xbf9b1e70, pn = {pi_ = 0x2f}}, cmd=47 '/', ipadr=@0xbf9b1e50,
    p=@0xbf9b1e2c) at src/networking/netserver.cpp:752
#16 0x0871d0d8 in NetServer::recvMsg_tcp ()
#17 0x0872413d in NetServer::checkMsg (this=0x9764d90, sets=@0x9764d90)
    at src/networking/netserver.cpp:589
#18 0x0872889a in NetServer::start (this=0x9764d90, argc=1, argv=0xbf9b2444)
    at src/networking/netserver.cpp:396
#19 0x087383d2 in main ()
looks like netserver.cpp and unit_generic.cpp were the cultprits
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: r12663 Linux - build broken

Post by klauss »

From what I can see, it's possible "Lancelot.stock" isn't on the server's (or client's) units.csv.

Can you check that?
(note: it IS case sensitive)

(if that happens to be the case, let me know, and I'll add a ticket to add proper validation so that it doesn't segfault)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Mets
Mercenary
Mercenary
Posts: 115
Joined: Tue Jun 10, 2008 12:52 am

Re: r12663 Linux - build broken

Post by Mets »

Sorry for taking so long to get back to you.

It's in units.csv I'm afraid. I did some testing, and I think there is a bigger issue. Regardless of what you put in when you register in the cgi-accountserver, when you go to logon, it isn't able to find your ship, so it brings up the selection prompt for you to choose one. When you do and then try to login, it segfaults.

I'm not sure if the issue is with registration, or with the networking code.
Post Reply