2405447 core dump at jump

Find any bugs in Vega Strike? See if someone has already found it, or report them here!
Post Reply
kraehe
Merchant
Merchant
Posts: 34
Joined: Thu Dec 04, 2008 4:26 am

2405447 core dump at jump

Post by kraehe »

Moin Gurus,

I had several seg11 at jump, so I looked what going on there:
- collideTrees::colTree could return NULL causing src/cmd/unit_collide.cpp at line 197 to call csOPCODECollider::Collide with this==NULL, and to dump core at line 135: ColCache.Model0 = this->m_pCollisionModel;

my patch:

Code: Select all

bakunin:~/vega/svn/vegastrike $ diff -p src/cmd/unit_collide.cpp~ src/cmd/unit_collide.cpp
*** src/cmd/unit_collide.cpp~   Mon Dec  8 06:18:58 2008
--- src/cmd/unit_collide.cpp    Mon Dec  8 06:22:36 2008
*************** bool Unit::InsideCollideTree (Unit * sma
*** 194,202 ****
        smalltransform.SetO2TTranslation(csVector3(smaller->cumulative_transformation_matrix.p-bigger->cumulative_transformation_matrix.p));
        bigtransform.SetO2TTranslation(csVector3(0,0,0));
        //we're only gonna lerp the positions for speed here... gahh!
!       if (smaller->colTrees->colTree(smaller,bigger->GetWarpVelocity())->Collide (*bigger->colTrees->colTree(bigger,smaller->GetWarpVelocity()),
!               &smalltransform,
!       &bigtransform)) {
                //static int crashcount=0;
                //      VSFileSystem::vs_fprintf (stderr,"%s Crashez to %s %d\n", bigger->name.c_str(), smaller->name.c_str(),crashcount++);
                csCollisionPair *mycollide = csOPCODECollider::GetCollisions();
--- 194,202 ----
        smalltransform.SetO2TTranslation(csVector3(smaller->cumulative_transformation_matrix.p-bigger->cumulative_transformation_matrix.p));
        bigtransform.SetO2TTranslation(csVector3(0,0,0));
        //we're only gonna lerp the positions for speed here... gahh!
!       csOPCODECollider *tmpCol = smaller->colTrees->colTree(smaller,bigger->GetWarpVelocity());
!       if (tmpCol &&
!           (tmpCol->Collide (*bigger->colTrees->colTree(bigger,smaller->GetWarpVelocity()), &smalltransform, &bigtransform))) {
                //static int crashcount=0;
                //      VSFileSystem::vs_fprintf (stderr,"%s Crashez to %s %d\n", bigger->name.c_str(), smaller->name.c_str(),crashcount++);
                csCollisionPair *mycollide = csOPCODECollider::GetCollisions();
will likely also fix [ 2396991 ] Segmentation Fault. There might be other places, where return value of colTree is not checked, but so far I did not had new core dumps at jump.

ciao,Kraehe
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Re: 2405447 core dump at jump

Post by loki1950 »

And an other one :( Thx kraehe

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
pyramid
Expert Mercenary
Expert Mercenary
Posts: 988
Joined: Thu Jun 15, 2006 1:02 am
Location: Somewhere in the vastness of space
Contact:

[SOLVED] 2405447 core dump at jump

Post by pyramid »

Great! Patch was applied and committed. :D
Post Reply