Client Crash [message #484515] |
Wed, 20 November 2013 16:18 |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Crash type:
Internal error, nothing else specified.
Set-Up:
I have the latest version of scripts on both my client and server, I am running a single custom plugin. This plugin does something that makes the client crash under these conditions:
- The player is already in the game
- The server loads the next map
- On the OnLoadLevel SSGM event there is a chain of events and it eventually leeds to this code:
GameObject *TimerObj = Commands->Create_Object("Invisible_Object", Vector3(0,0,0));
this->_TimerObject = TimerObj->Get_ID();
TimerObj->Add_Observer(this);
- There no longer is any crash when the Add_Observer line is removed.
Layout of the class 'this' points to:
Toggle Spoiler
class NTCPowerupSpawner : public ScriptImpClass
{
friend class NTCPowerupControl;
friend class NTC_Powerup;
public:
NTCPowerupSpawner(int SpawnerID, bool Enabled, const char *Preset, Vector3 &Position, int MaxSpawnCount, float SpawnDelay);
virtual void Timer_Expired(GameObject *obj, int number);
int Get_Spawner_ID();
void Toggle_Spawner(bool Enable);
void Spawn_Powerup(bool Decrease);
protected:
void OnThink();
void Remove_Powerup();
bool Can_Spawn();
void Force_Spawn_Powerup(bool Decrease);
GameObject *Create_Timer_Object();
void Start_Timer(float Delay = 0);
GameObject *Get_Object(int &ID);
void Remote_Spawn_Powerup(bool Decrease);
private:
int _SpawnerID;
bool _Enabled;
StringClass _Preset;
Vector3 _Position;
int _SpawnsRemaining;
int _Item;
bool _SpawnPending;
float _SpawnDelay;
int _TimerObject;
};
I was unable to reproduce it with an empty class that called the same pieces of code on the constructor of the class at the same time.
CrashDump attached.
|
|
|
Re: Client Crash [message #484516 is a reply to message #484515] |
Wed, 20 November 2013 17:00 |
|
Try this code instead for NTCPowerupSpawner.
class NTCPowerupSpawner : public GameObjObserverClass
{
friend class NTCPowerupControl;
friend class NTC_Powerup;
public:
NTCPowerupSpawner(int SpawnerID, bool Enabled, const char *Preset, Vector3 &Position, int MaxSpawnCount, float SpawnDelay);
virtual void Timer_Expired(GameObject *obj, int number);
int Get_Spawner_ID();
void Toggle_Spawner(bool Enable);
void Spawn_Powerup(bool Decrease);
void Entered( GameObject* pObj, GameObject* pEnterer ) {}
void Exited( GameObject* pObj, GameObject* pExiter ) {}
void Attach ( GameObject* pObj ) {};
void Detach ( GameObject* pObj ) {};
void Animation_Complete ( GameObject *pObj, const char *animation_name ) {};
void Created(GameObject* pObj) {};
void Destroyed(GameObject* pObj) {};
void Killed(GameObject* pObj,GameObject* pKiller) {};
void Damaged(GameObject* pObj,GameObject* pDamager,float amount) {};
void Custom(GameObject* pObj,int type,int param,GameObject* pSender) {};
void Sound_Heard(GameObject* pObj,const CombatSound & sound) {};
void Enemy_Seen(GameObject* pObj,GameObject* pEnemy) {};
void Action_Complete(GameObject* pObj,int action_id,ActionCompleteReason complete_reason) {};
void Poked(GameObject* pObj,GameObject* pPoker) {};
const char* Get_Name() { return "NTCPowerupSpawner"; }
protected:
void OnThink();
void Remove_Powerup();
bool Can_Spawn();
void Force_Spawn_Powerup(bool Decrease);
GameObject *Create_Timer_Object();
void Start_Timer(float Delay = 0);
GameObject *Get_Object(int &ID);
void Remote_Spawn_Powerup(bool Decrease);
private:
int _SpawnerID;
bool _Enabled;
StringClass _Preset;
Vector3 _Position;
int _SpawnsRemaining;
int _Item;
bool _SpawnPending;
float _SpawnDelay;
int _TimerObject;
};
Since NTCPowerupSpawner isn't a script (it doesn't have a ScriptFactory and it isn't created via Create_Script), it should not derive from ScriptImpClass but instead from GameObjObserverClass.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
|
|
Re: Client Crash [message #484533 is a reply to message #484515] |
Thu, 21 November 2013 18:15 |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Didn't elaborate my second message well enough. I am not attaching the script trough Add_Observer anymore, but trough Commands->Attach_Script.
I'm still experiencing client crashes.
|
|
|
|
Re: Client Crash [message #484538 is a reply to message #484515] |
Fri, 22 November 2013 03:20 |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Quote: | Try doing it with Add_Observer() now as you changed your class to derive from GameObserverClass
|
That will not suit my needs, that class doesn't support Commands->Start_Timer.
The point is that it still crashes, even when I now have a seperate class that is a valid ScriptImpClass registered at the Scriptfactory.
This indicates that the problem lays elsewhere.
|
|
|
|
Re: Client Crash [message #484551 is a reply to message #484515] |
Sat, 23 November 2013 12:09 |
Neijwiert
Messages: 124 Registered: October 2009
Karma: 0
|
Recruit |
|
|
Well something is going wrong externally, but I have no way of knowing what I'm doing wrong that's causing it. I'm missing source code...
|
|
|
|
Re: Client Crash [message #484566 is a reply to message #484515] |
Sat, 23 November 2013 17:35 |
|
I can confirm that yes its crashing somewhere in the tt code.
However, our debug symbol server is down right now so we cant debug the crash at this point.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
|
|
|
Re: Client Crash [message #484596 is a reply to message #484515] |
Tue, 26 November 2013 22:37 |
|
Our debug symbol server is back and I have examined this dump. Not sure why its crashing, all I can say is that it seems to be crashing in the netcode somewhere.
If its still failing once 4.1 is out, we will debug further.
Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
[Updated on: Tue, 26 November 2013 22:37] Report message to a moderator
|
|
|