### Trying to Compile Engine Changes(TAIK) using Linux

Expanding and utilizing the engine via C++.

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Jason Campbell
Posts: 161
Joined: Fri Feb 13, 2015 2:51 am

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

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

JeffR
Steering Committee
Posts: 729
Joined: Tue Feb 03, 2015 9:49 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?

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Jason Campbell
Posts: 161
Joined: Fri Feb 13, 2015 2:51 am

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.

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

JeffR
Steering Committee
Posts: 729
Joined: Tue Feb 03, 2015 9:49 pm

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.

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Jason Campbell
Posts: 161
Joined: Fri Feb 13, 2015 2:51 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()); }

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Azaezel
Posts: 379
Joined: Tue Feb 03, 2015 9:50 pm

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

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Jason Campbell
Posts: 161
Joined: Fri Feb 13, 2015 2:51 am

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.

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

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Jason Campbell
Posts: 161
Joined: Fri Feb 13, 2015 2:51 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

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Azaezel
Posts: 379
Joined: Tue Feb 03, 2015 9:50 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'..

#### Re: Trying to Compile Engine Changes(TAIK) using Linux

Jason Campbell
Posts: 161
Joined: Fri Feb 13, 2015 2:51 am

Okay, thanks. I will continue to attempt finding them.

#### Who is online

Users browsing this forum: No registered users and 2 guests