HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

OH my god! What a bug!

06-11-2006, 02:49 AM#1
Vexorian
Would next trigger crash?
Collapse JASS:
function Trig_Melee_Initialization_Actions takes nothing returns nothing
    call GetExpiredTimer()
endfunction

//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
    set gg_trg_Melee_Initialization = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Melee_Initialization, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction

The answer is Yes, it is also No .

If a computer unit dies it will crash, instead if it is a player controlled unit it won't crash.

This bug had stopped 5 months of development of my map (I was using GetExpiredTimer() and comparing it to null to recognize if the function was called by a timer or by ExecuteFunc )
06-11-2006, 11:22 AM#2
Blade.dk
This bug is really nasty.

Good to know that it is there.
06-11-2006, 11:53 AM#3
Jazradel
So when GetExpiredTimer() returns null when activated by a computer units death the game crashes?
06-11-2006, 12:23 PM#4
iNfraNe
That makes no sense... have to see for myself.
06-11-2006, 12:49 PM#5
Vexorian
If it doesn't make sense it is blizzard's work
06-11-2006, 12:52 PM#6
The)TideHunter(
Quote:
Originally Posted by Vexorian
If it doesn't make sense it is blizzard's work

Correct
06-12-2006, 02:38 AM#7
weaaddar
um,
this is almost as bad as this
Collapse JASS:
function B2I takes boolean b returns integer
return b
return 0
endfunction

Then a trigger that when you pick up an item would just display B2I(IsItemPawnable(GetManipulatedItem() )) would crash the game on some items. Totally awesome thank god though that
Collapse JASS:
function B2I takes boolean b returns integer
if(b)then
return 1
endif
return 0
endfunction
works perfectly.
06-12-2006, 03:25 AM#8
PipeDream
Maybe booleans aren't four bytes? If one was only a byte at the end of of a block, it's conceivable that accessing out of bounds for int print -> crash.
06-12-2006, 05:22 AM#9
weaaddar
right but its very specific item types that seem to cuase the crash. Like potions didn't do it, but great town hall items did. (i also noted the boolean while testing that made it crash too)