This blog mainly contains news about my Sins of a Solar Empire Mod - Celestial Bodies

What can I do if a minidump and crash comes before any error message?

 

The whole story:

I have begun testing my custom abilities and buffs. I made a solar radiation ability for a pulsar star. So if i enter the stars gravity well with a ship the game crashes but not error dialog pops up before. Also the log file in the debug folder gives no clue it seams also that it is not completly written, cause the last two line show this:

c:\gs\entrenchment\CodeSource\Engine\DataStructures\FixedArray.h(117): assert! [i >= 0]
c:\gs\entrenchment\CodeSource\Engine\DataStructures\FixedArray.h(117

 

I all cases i got minidumps before at least one error popup was shown that gave me a clue whats wrong. I know that the minidumps only can be analyzide by the devs but I hoped using the dev.exe makes them also readable for me.

 

 


Comments (Page 1)
2 Pages1 2 
on Mar 04, 2009

Do you have showErrors TRUE set in your user.setting?

on Mar 04, 2009

No, but i will test it!

on Mar 04, 2009

Okay, hopefully that spits out something more readable. Your current error is as generic and unspecific as it can get

on Mar 04, 2009

Ok i checked it user settings showErrors is TRUE.

I think the dev exe did it cause I haven't changed the value by hand.

 

Thx Annatar, but the problem is still there.

on Mar 04, 2009

That sucks. Unfortunately, from those 2 lines in the log nobody could tell you what the problem is

So, you put your new ability on a star, and whenever a ship jumps into the star the game crashes? Sounds like it's caused by the ability, maybe if you paste the ability/buff we can figure it out?

on Mar 04, 2009

Yes it crashes when i the ship reaches the star.

 

I made a lot try and error tests now and I figured out that in the red marked part (see below) is somewhere the problem. if i romvoe it and set the periodic action to 0 again it crashes not.

Here the code Buff 1 (buffpulsarradiation):

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeOldBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
    buffInstantActionType "ApplyBuffToSelf"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    buffType "BuffSolarCloaking"
    effectInfo
        effectAttachInfo
            attachType "Invalid"
        smallEffectName ""
        largeEffectName ""
        soundID ""
numPeriodicActions 1
periodicAction
    actionCountType "Infinite"
    actionIntervalTime
        Level:0 0.500000
        Level:1 0.000000
        Level:2 0.000000
    buffInstantActionType "ApplyBuffToTargetsInRadius"
    instantActionTriggerType "AlwaysPerform"
    buffType "BuffPulsarRadiationDamage"
    targetFilter
        numOwnerships 0
        numObjects 2
        object "CapitalShip"
        object "Frigate"
        numSpaces 1
        space "Normal"
        numConstraints 0
    range
        Level:0 25000.000000
        Level:1 0.000000
        Level:2 0.000000
    maxTargetCount
        Level:0 -1.000000
        Level:1 -1.000000
        Level:2 -1.000000
    effectInfo
        effectAttachInfo
            attachType "Invalid"
        smallEffectName ""
        largeEffectName ""
        soundID ""

numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
    finishConditionType "EnterHyperspace"

 

Code Buff 2 (buffpulsarradiation damage):

TXT
entityType "Buff"
onReapplyDuplicateType "PrioritizeOldBuffs"
buffStackingLimitType "ForAllPlayers"
stackingLimit 1
allowFirstSpawnerToStack FALSE
buffExclusivityForAIType "ExclusiveForAllPlayers"
isInterruptable FALSE
isChannelling FALSE
numInstantActions 1
instantAction
    buffInstantActionType "DoDamage"
    instantActionTriggerType "OnDelay"
    delayTime 0.000000
    damage
        Level:0 100.000000
        Level:1 0.000000
        Level:2 0.000000
    damageAffectType "AFFECTS_SHIELDS_AND_HULL"
    damageType "ENERGY"
    isDamageShared TRUE
numPeriodicActions 0
numOverTimeActions 0
numEntityModifiers 0
numEntityBoolModifiers 0
numFinishConditions 1
finishCondition
    finishConditionType "AllOnDelayInstantActionsDone"

Code Ability:

TXT
entityType "Ability"
buffInstantActionType "ApplyBuffToTargetsAtOrbitBody"
instantActionTriggerType "AlwaysPerform"
buffType "BuffPulsarRadiation"
targetFilter
    numOwnerships 0
    numObjects 2
    object "CapitalShip"
    object "Frigate"
    numSpaces 1
    space "Normal"
    numConstraints 0
maxTargetCount
    Level:0 -1.000000
    Level:1 -1.000000
    Level:2 -1.000000
effectInfo
    effectAttachInfo
        attachType "Invalid"
    smallEffectName ""
    largeEffectName ""
    soundID ""
needsToFaceTarget FALSE
canCollideWithTarget TRUE
moveThruTarget FALSE
isUltimateAbility FALSE
maxNumLevels 1
levelSourceType "FixedLevel0"
aiUseTime "Invalid"
aiUseTargetCondition "Invalid"
isAutoCastAvailable FALSE
isAutoCastOnByDefault FALSE
pickRandomPlanetToExploreForAutoCastTarget FALSE
ignoreNonCombatShipsForAutoCastTarget TRUE
onlyAutoCastWhenDamageTakenExceedsPerc 0.000000
useCostType "Passive"
researchPrerequisites
    NumResearchPrerequisites 0
nameStringID "IDS_ABILITY_PULSARRADIATION_NAME"
descStringID "IDS_ABILITY_PULSARRADIATION_DESCRIPTION"
hudIcon "HUDICON_ABILITY_PULSARRADIATION"
smallHudIcon "HUDICON_ABILITY_PULSARRADIATION"
infoCardIcon ""

on Mar 04, 2009

As far as I know, planet/star abilities use ApplyBuffToTargetsAtOrbitBody:

buffInstantActionType "ApplyBuffToTargetsAtOrbitBody"

Have you tried that?

on Mar 05, 2009

I used "ApplyBuffToTargetsAtOrbitBody" in the ability as you can see but i never tried it in BuffPulsarRadiation.

My intention was that the SolarCloaking works on all ships in the graviti well and the Radiation Damage occurs only if a ship comes too close to the stars surface. that is why i used ApplyBuffToTargetsInRadius.

But i will try what you said, this evening.

thanks again!

on Mar 05, 2009

Oops, I missed that little detail, sorry. Here's the odd thing though:

The ability targets any ship in the grav well, and it applies the BuffPulsarRadiation to the ship, right? So then, you have a PeriodicAction that applies a second buff to targets in radius, but I don't think it's radius from star anymore, it's radius from every ship that got affected by the first buff.

Have you tried splitting the ability in two? Have the PulsarRadiation apply to all ships at orbit body, and then make a second ability for the star that applies to targets in radius with the periodic action for PulsarRadiationDamage?

on Mar 05, 2009

Annatar11
The ability targets any ship in the grav well, and it applies the BuffPulsarRadiation to the ship, right?

jepp thats correct.

Annatar11
So then, you have a PeriodicAction that applies a second buff to targets in radius, but I don't think it's radius from star anymore, it's radius from every ship that got affected by the first buff.

ok that sounds logical.

Annatar11
Have you tried splitting the ability in two?

no not at all, but i will do it if iam home again (4 hours)

Annatar11
Have the PulsarRadiation apply to all ships at orbit body, and then make a second ability for the star that applies to targets in radius with the periodic action for PulsarRadiationDamage?

ok understood!

Thanks for the help!

slowly i am beginnig to understand why all Buffs ar splitted into several entity files. It can be very tricky.

on Mar 05, 2009

Well, abilities are really tricky the more complex you make 'em. I don't have very much experience with abilities on planet bodies, so I'm sort of learning along with you here Let me know if you make any progress!

on Mar 05, 2009

Ok here is my progress

Instead of calling the BuffPulsarRadiation by the ability I called BuffPulsarRadiationDamage directly. And it crashes again. Next i increased delayTime of my damagebuff from 0 to 10 and now after 10 secounds crash.

Next step i call again BuffPulsarRadiation from the ability and BuffPulsarRadiationDamage from BuffPulsarRadiation, as it was before. Again after 10 secounds crash.

which brings me to the solution that my BuffPulsarRadiationDamage entity is the true problem.

 

I also tested instead of using

buffInstantActionType "ApplyBuffToTargetsInRadius" 

this one

buffInstantActionType "ApplyBuffToTargetsAtOrbitBody"

as you said before.

 

i switched between the damageType "PHYSICAL" and damageType "ENERGY"

allways the same effect : sins crashes and no error message

 

I also added a weapon effect to BuffPulsarRadiation where a sound is played. The sound plays correct and after 10 secounds crash again.

I hope this is no hardcoded thing that abilities on stars cannot call a buff with DoDamage inside.

 

on Mar 05, 2009

So you tried skipping the BuffPulsarRadiation and went straight to BuffPulsarRadiationDamage from the ability and set the DoDamage delay to 10 seconds and then it crashes when the 10 seconds are up?

That does not sound good. There's nothing wrong with that setup so it should work. Try keeping the same everything, but change DoDamage into some other effect (give shields, or hull, or damage boost, whatever) and see if it works.

If that works ok it must be DoDamage, which would sort of suck.

on Mar 05, 2009

Annatar11
So you tried skipping the BuffPulsarRadiation and went straight to BuffPulsarRadiationDamage from the ability and set the DoDamage delay to 10 seconds and then it crashes when the 10 seconds are up?

yes thats right

Annatar11
That does not sound good. There's nothing wrong with that setup so it should work. Try keeping the same everything, but change DoDamage into some other effect (give shields, or hull, or damage boost, whatever) and see if it works.

If that works ok it must be DoDamage, which would sort of suck.

did as you said i replaced DoDamage with RestoreHullPoints no crash

then instead of adding hull i set the value to -100 so that the hull is decreased. It worked!

Also as i added the BuffPulsarRadiation again into the buff ability chain. all ships that entered the radius periodicly "take damage". unfortunatly the ships aren't destroyed when the hull reaches 0. The hull value becomes negative and only if another ship fires on it, it blows off.

So its a draw (1 point me, 1 point sins)

 

 

 

 

on Mar 05, 2009

Another thing you can try that's a bit awkward.. make your second ability to the star and make it apply buff to targets in radius as a "full" buff, but make that buff call RadiationDamage as ApplyBuffToSelf with DoDamage. Of course it's still linked to the initial call from the star so it will probably still crash

You could of course also experiment with other effects.. like a tiny percent chance to just destroy the ship outright. So the longer they stay in the radiation, the higher the chance they'll suffer critical failure Can make it like a 2% chance every 5 seconds Truly diabolical!

2 Pages1 2