Trying to Compile Engine Changes(TAIK) using Linux

Expanding and utilizing the engine via C++.
33 posts Page 2 of 4
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Mon Mar 13, 2017 1:21 pm
I'm wrong about where that error is stemming from. Is there a way to remove the Fatal crash interupt if I was just doing singleplayer?

edit: there isn't a memory leak or anything, just that -1 Bitstream
JeffR
Steering Committee
Steering Committee
Posts: 757
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Mon Mar 13, 2017 3:12 pm
So the only time it's happening at this point is when you get melee'd while zooming? Not just simply getting melee'd?
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Mon Mar 13, 2017 4:48 pm
It appears to happen when an AI melee's another AI from the front. It's attack3 and it may stem from an animation call that returns a negarive.
JeffR
Steering Committee
Steering Committee
Posts: 757
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Tue Mar 14, 2017 6:36 am
Hm, I think I'd run into something similar a few weeks back, where it had an issue with playing a bad animation, or a stopped animation or something. I'll poke around on my side and see if I can replicate it again.
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Tue Mar 14, 2017 7:17 am
Dude, you probably have enough on your plate. Heh.

I decided to try and eliminate all other errors in the console first and don't why I didn't notice this. Since it seemed to always occur during "fight3" I bypassed it for a bit and it became the next AI Melee TakeDown, in this case attack2. All sounds seem to work but this is clearly a problem.

SFXProfile((null))::onAdd: The preload failed!
SFXSound::_create() - Could not create device buffer!
SFXSystem::createSource() - Failed to create sound!
Profile: (null)
Filename:
Loading SFX: art/sound/TAIKTakedowns/fight2 (1 channels, 44 kHz, 3.83 sec, 330 kb)


Could it be that simple as a Null in SFX? If so I don't get where to hunt this down.

This is the Takedown audio code but from the echos and also that it loads the right sound, it seems to work.

function playFightAudio(%person,%description,%filename,%pos)
{
%person.fightSoundSource = sfxPlayOnce(%description,"art/sound/TAIKTakedowns/" @ %filename,getWord(%pos,0),getWord(%pos,1),getWord(%pos,2));
echo("person" @ %person.fightSoundSource);
echo(%filename);
echo(%pos);

// Make AIPlayers turn their heads if this happens close to them
// The idea is that if we're going to stab someone standing next to their friend...
// ...their friend should probably notice the scuffle.
AlertAIPlayers(%person.getPosition(),8,0,"Annoyance",1,%person,0,0,%person.team);
}



edit: Found this and it looks complicated enough...


function attack3(%win,%lose)
{
%prefix = "FT3_"; // Animation name is this + "loser" or "winner", e.g. FT1_Winner, or FT1_Loser
%winOffsetFromLose = "0 1 0"; // Winner should perform this takedown 1m in front of loser
%loseOffsetFromWin = ""; // Loser of this takedown should stay put
%initPadTime = 100; // 10ms before playing animations, enough time to get everyone to stop what they're doing
%lookCode = 1; // 1 = Winner looks toward loser, 2= loser looks toward winner
%winFightTime = 2200 + %initPadTime; // Time in ms until the winner is done with the fight, and control is re-acquired.
%loseFightTime = 3500 + %initPadTime; // How long until the loser is given their control binds back (though they're dead, they may want to respawn)
%noReturnTime = 1340; // Time (ms) until victim is officially dead. %lose can escape the fight if %win dies before this time has elapsed.
%disarmTime = 3300; // Time (ms) until victim drops their gun

%p = %win.prepActor(%lose,%winOffsetFromLose,%loseOffsetFromWin,%lookCode);
if (%p == -1)
return;
%lose.prepActor(%win,"","",0);
%lose.fightKiller = %win;
%win.fightVictim = %lose;
%win.ensureLookingAtVictim(%lose,%winFightTime);

schedule(%initPadTime,0,attack3_action,%win,%lose,%prefix);
%lose.schedule(%noReturnTime,takedownDeath,%win);

%win.weaponSched[0] = %win.schedule(500,mountImage,TAIKKnifeImage,0);

%win.schedule(%winFightTime,leaveFight);
%lose.schedule(%loseFightTime,leaveFight);
%lose.schedule(%disarmTime,holsterWeapon);
%win.holsterWeapon();
}

function attack3_action(%win,%lose,%prefix)
{
if (%win.getState() $= "Dead" || %lose.getState() $= "Dead") return;
%win.destroyThread(0);
%lose.destroyThread(0);
%win.setActionThread(%prefix @ "Winner");
%lose.setActionThread(%prefix @ "Loser");

playFightAudio(%win,AudioClosest3D,"fight3",%lose.getWorldBoxCenter());
}
Azaezel
Posts: 384
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Mar 14, 2017 8:52 am
well... I can say quite a few script-exposed variables default to -1... If it's a case of the sucker getting referenced before it's set to a new value, that'd give you you that kind of output... Can't think of any 6-bit values used though with that...
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Tue Mar 14, 2017 12:52 pm
I can't figure out gdb debugger very well but I got a backtrace to show me shapebase.cpp or player.cpp is where the writeInt occurs.

For a while I thought it was this.
stream->writeInt(image.imageMountNode,6);

It mounts attachments to weapons but a made it zero right before the writeInt so it always returned zero and it didn't do a thing.

I just did a trace(1);

And perhaps it's this. These lines are the last bunch. Must be in player or aiplayer.

Entering AIPlayer::onCollision(23384, 23123)
Leaving AIPlayer::onCollision() - return
Leaving SpecOpsRifleman::onCollision() - return
Entering SpecOpsRifleman::onCollision(699, 23123, 23384)
Entering AIPlayer::onCollision(23123, 23384)
Leaving AIPlayer::onCollision() - return
Leaving SpecOpsRifleman::onCollision() - return
Entering SpecOpsRifleman::onCollision(699, 23799, 21842)
Entering AIPlayer::onCollision(23799, 21842)
Leaving AIPlayer::onCollision() - return
Leaving SpecOpsRifleman::onCollision() - return
Entering SpecOpsRifleman::onCollision(699, 23799, 21514)
Entering AIPlayer::onCollision(23799, 21514)
Leaving AIPlayer::onCollision() - return
Leaving SpecOpsRifleman::onCollision() - return
Entering OpforRifleman::onCollision(700, 21514, 23799)
Entering AIPlayer::onCollision(21514, 23799)
Leaving AIPlayer::onCollision() - return
Leaving OpforRifleman::onCollision() - return
Entering OpforRifleman::onCollision(700, 21524, 21842)
Entering AIPlayer::onCollision(21524, 21842)
Leaving AIPlayer::onCollision() - return
Leaving OpforRifleman::onCollision() - return
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Wed Mar 15, 2017 7:04 am
Hey guys, the animation was screwed up for takedowns, Case sensitivity of Linux has made it tough to squash all the bugs. Anyway, I really thought that had done the trick but then the 7bit Fatal started again that I thought I had fixed.

So I disabled the Fatal breakpoint in bitstream.cpp and played the example mission again and again. My memory usage was high but steady. Same usage as before (900MB with 16 AI) just seems quite a bit higher then the Windows version, which is Torque 3,5(460MB). I checked to see if it was a Linux thing and the Example FPS level from 3,10 is around 640MB when I added a NavMesh and some stock AI.

Anyway, question is, what kind of trouble will I most likely run into by disabling the Fatal interrupt?

Thanks
Azaezel
Posts: 384
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Wed Mar 15, 2017 12:42 pm
You won't be catching uninitialized variables, out of range values, and subtle bugs of that nature. Certain extensions of the engine go particularly fatal there in incredibly non-obvious ways, beyond just 'well, lets go ahead and use the wrong value anyway'..
Jason Campbell
Posts: 182
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Wed Mar 15, 2017 7:13 pm
Okay, thanks. I will continue to attempt finding them.
33 posts Page 2 of 4

Who is online

Users browsing this forum: No registered users and 1 guest