Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Client Crash
Client Crash [message #484515] Wed, 20 November 2013 16:18 Go to next message
Neijwiert is currently offline  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


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 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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 #484522 is a reply to message #484515] Thu, 21 November 2013 06:44 Go to previous messageGo to next message
Neijwiert is currently offline  Neijwiert
Messages: 124
Registered: October 2009
Karma: 0
Recruit
Changed it.

It now is a seperate class that is registered to the scriptfactory.

I still experience a client crash.

[Updated on: Thu, 21 November 2013 06:45]

Report message to a moderator

Re: Client Crash [message #484523 is a reply to message #484515] Thu, 21 November 2013 09:52 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
And did you actually attach it as a script? You can't use Add_Observer with a ScriptImpClass, they're not designed for that. Use GameObjObserverClass as your base class if you want to use Add_Observer, as jonwil posted above.

http://steamsignature.com/card/1/76561197975867233.png
Re: Client Crash [message #484533 is a reply to message #484515] Thu, 21 November 2013 18:15 Go to previous messageGo to next message
Neijwiert is currently offline  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 #484537 is a reply to message #484515] Fri, 22 November 2013 01:03 Go to previous messageGo to next message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma: 0
General (4 Stars)
Try doing it with Add_Observer() now as you changed your class to derive from GameObserverClass

Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
Re: Client Crash [message #484538 is a reply to message #484515] Fri, 22 November 2013 03:20 Go to previous messageGo to next message
Neijwiert is currently offline  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 #484549 is a reply to message #484515] Sat, 23 November 2013 10:16 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Have you attached to the FDS with the debugger and walked through to see which step is crashing? Might save you a tremendous amount f time...

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Client Crash [message #484551 is a reply to message #484515] Sat, 23 November 2013 12:09 Go to previous messageGo to next message
Neijwiert is currently offline  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 #484552 is a reply to message #484515] Sat, 23 November 2013 12:13 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

What do you mean? The crash isn't occurring in your code?

If that's true and you're sure it's not some Microsoft DLL (i.e. incorrect usage of a string function or something) then post up (or private message to StealthEye or jonwil) the source and crash dump and the TT developers can look at it, since they actually have the symbols for tt.dll.


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Client Crash [message #484566 is a reply to message #484515] Sat, 23 November 2013 17:35 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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 Go to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

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

Previous Topic: windows 8.1 not working with my scripts
Next Topic: WeaponBag
Goto Forum:
  


Current Time: Sun Dec 22 04:48:03 MST 2024

Total time taken to generate the page: 0.00962 seconds