bckobayashimaru.de

Bridge Commander Kobayashi Maru Project
It is currently Tue Jun 25, 2019 4:28 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sat Dec 09, 2006 10:58 am 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
ok, found a few of the problems that make BC crash:

Code:
App.DamageableObject_Cast()

Will crash the game if you give this function an old pointer.

Recommendation: check if the objet does exist before

pObject = App.ObjectClass_GetObjectByID(None, pObject.GetObjID())


Code:
pObject.DisableGlowAlphaMaps()

Can crash the game if the Object is dead.

Recommendation: check for pObject.IsDead() first


Code:
pObject.GetRandomPointOnModel()

Will crash the game if object is dying (sometimes) or is dead (always)

Recommendation check for pObject.IsDead() or pObject.IsDying() first.


Code:
pObject.GetLocalRandomPointAndNormalOnModel(kPoint1, kPoint2)

Will sometimes crash the game and sometimes not. No idea when.

Recommendation: Never use this function.


Code:
App.g_kSystemWrapper.GetRandomNumber()

Will crash if value given is 0.

Recommendation: Always check for value first.


Code:
pObject.AddDamage()

Will crash if pObject is dead.

Recommendation: Check with pObject = App.DamageableObject_GetObjectByID(None, pObject.GetObjID()) first


Code:
foo.TurnOn()
foo.TurnOff()
foo.Turn()

Will crash if the ship foo belongs to doesn't exist anymore

Code:
App.g_kLODModelManager.SetGlowMapsEnabled(1)

Will crash when Model Level is not set to high.

Recommendation: Check Model Detail with App.g_kLODModelManager.GetDropLODLevel() == 0

Code:
pSequence.AddAction(pAction)

Will crash when pAction is None

Code:
pSequence.Abort()

May crash sometimes, but not always. So better do not use it.

Code:
pSet.DeleteObjectFromSet()

shouldn't be used, please use

Code:
pSet.RemoveObjectFromSet()

instead.

Code:
pCodeCondition.SetStatus(1)

in every Condition file

Recommendation: Check with
pCondition = App.ConditionScript_Cast(App.TGObject_GetTGObjectPtr(self.pCodeCondition.GetObjID()))

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Last edited by Defiant on Wed Jul 11, 2007 10:31 am, edited 10 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 15, 2006 12:36 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Added App.g_kSystemWrapper.GetRandomNumber() to the list

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 16, 2006 1:53 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Added pObject.AddDamage()

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Dec 28, 2006 12:55 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
Added turnon()

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Dec 29, 2006 12:01 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
added App.g_kLODModelManager.SetGlowMapsEnabled(1)

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 01, 2007 1:33 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
added pSeq.AddAction()

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 01, 2007 1:36 pm 
Offline
Cadet 2nd Year
Cadet 2nd Year
User avatar

Joined: Sun Jun 26, 2005 3:56 pm
Posts: 45
Location: Netherlands
Have another one for you:

BC will crash when you call abort on a finnished sequence, or if you are it (on the sequence itself) from inside one of the actions.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 01, 2007 1:49 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
thx added to the list

its probably better to stop a sequence with return 1 anyway.

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 01, 2007 9:12 pm 
Offline
Ensign
Ensign
User avatar

Joined: Thu Oct 27, 2005 11:57 pm
Posts: 141
Code:
pSequence.Abort()

This will crash the game if the sequence is not running. You can test if the sequence is running with the IsPlaying method.

_________________
Image
Image
"there are only two types of pedestrians, the quick and the dead"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 02, 2007 12:49 pm 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
pSet.DeleteObjectFromSet() shouldn't be used either

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 11, 2007 10:32 am 
Offline
Chief Engineer
Chief Engineer
User avatar

Joined: Fri May 06, 2005 10:41 am
Posts: 2449
Location: Hamburg, Germany
added pCodeCondition.SetStatus(1)

_________________
Shuttle Launching Framework carrier file creator

--
Whenever you find that you are on the side of the majority, it is time to reform.
-- Mark Twain


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group