BUG in vega-vc9 ( trunk )

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).

BUG in vega-vc9 ( trunk )

Postby ezee » Thu Feb 27, 2014 9:55 am

Hi .
That is not a problem of compilation and link , but of execution :
The .exe is bugged .

I used breakpoint to find out where is the bug , that seem to be Python :
( in base.xml.cpp , " void BaseInterface::Load( const char *filename, const char *time_of_day_hint, const char *faction " )
)
//now that we have a FILE * named inFile and a std::string named newfile we can finally begin the python
string compilefile = string( filename )+time_of_day_hint+string( faction )+BASE_EXTENSION;
Python::reseterrors();
PyRun_SimpleFile( inFile, compilefile.c_str() );
Python::reseterrors();
VSFileSystem::vs_close( inFile );



The last fonction call before the crash seem to be :
Code: Select all
void Mission::DirectorInitgame()
{
    this->player_num = _Universe->CurrentCockpit();
    if (nextpythonmission) {
        //CAUSES AN UNRESOLVED EXTERNAL SYMBOL FOR PythonClass::last_instance ?!?!
#ifndef _WIN32
        char *tmp = nextpythonmission;
        while (*tmp) {
            if (tmp[0] == '\r') tmp[0] = '\n';
            tmp++;
        }
#endif


And yeah , the game crash when the loading line tells " loading cockpit etc ... "
Here is the capture of my debug screen :
Image

I hope that will help .

EDIT : ******************************************************

I commented out the block that throw an exeption and the game launch directly
in the hangar , with the missile as vessel .
So this is a python problem , located at the end of this function :
Code: Select all
void BaseInterface::Load( const char *filename, const char *time_of_day_hint, const char *faction )
{
#if 0
    std::string full_filename     = string( "bases/" )+filename;
    std::string daynight_filename = full_filename+"_"+string( time_of_day_hint );
    full_filename     += BASE_EXTENSION;
    daynight_filename += BASE_EXTENSION;
    std::string newfile = daynight_filename;
    cout<<"BaseInterface::LoadXML "<<full_filename<<endl;
    FILE *inFile = VSFileSystem::vs_open( daynight_filename.c_str(), "r" );
    if (!inFile) {
        newfile = full_filename;
        inFile  = VSFileSystem::vs_open( full_filename.c_str(), "r" );
    }
    if (!inFile) {
        Unit *baseun = this->baseun.GetUnit();
        if (baseun) {
            if (baseun->isUnit() == PLANETPTR) {
                daynight_filename = string( "bases/planet_" )+time_of_day_hint+string( BASE_EXTENSION );
                inFile  = VSFileSystem::vs_open( daynight_filename.c_str(), "r" );
                newfile = daynight_filename;
                if (!inFile) {
                    newfile = "bases/planet" BASE_EXTENSION;
                    inFile  = VSFileSystem::vs_open( newfile.c_str(), "r" );
                }
            } else {
                daynight_filename = string( "bases/unit_" )+time_of_day_hint+string( BASE_EXTENSION );
                inFile  = VSFileSystem::vs_open( daynight_filename.c_str(), "r" );
                newfile = daynight_filename;
                if (!inFile) {
                    newfile = "bases/unit" BASE_EXTENSION;
                    inFile  = VSFileSystem::vs_open( newfile.c_str(), "r" );
                }
            }
        }
        if (!inFile)
            return;
    }
#else
    FILE *inFile = getFullFile( string( "bases/" )+filename, time_of_day_hint, faction );
    if (!inFile) {
        bool   planet = false;
        Unit  *baseun = this->baseun.GetUnit();
        if (baseun)
            planet = (baseun->isUnit() == PLANETPTR);
        string basestring( "bases/unit" );
        if (planet)
            basestring = "bases/planet";
        inFile = getFullFile( basestring, time_of_day_hint, faction );
        if (!inFile)
            return;
    }
#endif
/* BUG is here !!

    //now that we have a FILE * named inFile and a std::string named newfile we can finally begin the python
    string compilefile = string( filename )+time_of_day_hint+string( faction )+BASE_EXTENSION;
    Python::reseterrors();
    PyRun_SimpleFile( inFile, compilefile.c_str() );
    Python::reseterrors();
    */
    VSFileSystem::vs_close( inFile );
}


bug is here :
PyRun_SimpleFile( inFile, compilefile.c_str() );
I will try to fix but your help will be greatly received !
:wink:

I wonder if it is not a BOOST Python problem .
The vc9 solution uses Boost 1.45 but trunk/vegastrike has only Boost 1.53
I have taken then the boost 1.45 from a branch , that compile and run , but
may cause this bug ??
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Mon Feb 10, 2014 5:47 pm
Location: FRANCE

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: BUG in vega-vc9 ( trunk )

Postby klauss » Thu Feb 27, 2014 12:14 pm

It seems you forgot to describe the bug itself. Or did I miss it?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: BUG in vega-vc9 ( trunk )

Postby ezee » Thu Feb 27, 2014 12:44 pm

I said " bug " perhaps you will have an other definition .

When i launch the .exe that the solution builds , the loading screen appear for 15 seconds , then
the game crash . I call that a bug .

The .exe provided with the solution is working good .
So i try to understand what is going wrong , and so the debug info show that the error is caused
by a function :

PyRun_SimpleFile( inFile, compilefile.c_str() );


I try now to compile and link with boost 1.53 , and see ...

Edit : Nah , same error with Boost 1.53

I have info also with the audio thread , that is locked by the error at this point ( see bold text ) :
(music.cpp line 255 )
Music *me = (Music*) input;
me->threadalive = 1;
while (!me->killthread) {
#ifdef _WIN32
WaitForSingleObject( me->musicinfo_mutex, INFINITE );
#else
checkerr( pthread_mutex_lock( &me->musicinfo_mutex ) );
#endif
if (me->killthread) break;


I would like to know if someone is able to test the VC9 solution , to know if it's my
problem only or everyone's problem .
Last edited by ezee on Thu Feb 27, 2014 12:58 pm, edited 1 time in total.
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Mon Feb 10, 2014 5:47 pm
Location: FRANCE

Re: BUG in vega-vc9 ( trunk )

Postby klauss » Thu Feb 27, 2014 12:57 pm

ezee wrote:I said " bug " perhaps you will have an other definition .

When i launch the .exe that the solution builds , the loading screen appear for 15 seconds , then
the game crash . I call that a bug .


A bug is far more general than that, it could be anything. What you describe is usually called a CTD (Crash to desktop).

ezee wrote:The .exe provided with the solution is working good .

No it's not. A CTD can happen due to build inconsistencies. I'd venture a guess that the python lib you're using isn't built the same way (ie: with the same runtime) as the exe.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: BUG in vega-vc9 ( trunk )

Postby ezee » Thu Feb 27, 2014 1:03 pm

No it's not.

:?:

I say that the .exe that is in http://svn.code.sf.net/p/vegastrike/code/trunk/win32/bin
is working good .

wait ... ah , you are right , it is not a .exe from the VC9 solution .
Ok , i don't know what to do now .
Any suggestions ?
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Mon Feb 10, 2014 5:47 pm
Location: FRANCE

Re: BUG in vega-vc9 ( trunk )

Postby klauss » Thu Feb 27, 2014 1:09 pm

When you're building, you have to build everything. I remember that from the time I made the vc8 solution (I think it was vc8 - or maybe vc7).

You have to set up the solution to build zlib, python, expat and whatever other dependencies we have included in the source code, and, this is the important part, make sure you use them. To that end, set up a post-build job that copies them to their final location in win32/bin.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: BUG in vega-vc9 ( trunk )

Postby ezee » Thu Feb 27, 2014 1:28 pm

oooh...
STICK THAT SOMEWHERE !
:lol:

ok klauss , thank you for this tip .
:)
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Mon Feb 10, 2014 5:47 pm
Location: FRANCE

Re: BUG in vega-vc9 ( trunk )

Postby ezee » Mon Mar 17, 2014 3:44 pm

Today i've found the solution to my problems under windowsXP :

The solution that is working is in the SVN Tags branch , under 0.5.1 rc1 release :
http://sourceforge.net/p/vegastrike/cod ... _0_5_1_r1/

I made the checkout for base, vega-vc9 , vegastrike and win32 .
Compiled , linked , start of the new campaign ok !
Happy day today .
Very cool things may happen now .
:D
Code: Select all
 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }

Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
ezee
Intrepid Venturer
Intrepid Venturer
 
Posts: 703
Topics: 65
Joined: Mon Feb 10, 2014 5:47 pm
Location: FRANCE



Return to Compiling Problems [paste config.log]

Who is online

Users browsing this forum: No registered users and 2 guests

cron