| 06-11-2006, 02:49 AM | #1 |
Would next trigger crash? 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 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 |
This bug is really nasty. Good to know that it is there. |
| 06-11-2006, 11:53 AM | #3 |
So when GetExpiredTimer() returns null when activated by a computer units death the game crashes? |
| 06-11-2006, 12:23 PM | #4 |
That makes no sense... have to see for myself. |
| 06-11-2006, 12:49 PM | #5 |
If it doesn't make sense it is blizzard's work |
| 06-11-2006, 12:52 PM | #6 | |
Quote:
Correct |
| 06-12-2006, 02:38 AM | #7 |
um, this is almost as bad as this 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 JASS:function B2I takes boolean b returns integer if(b)then return 1 endif return 0 endfunction |
| 06-12-2006, 03:25 AM | #8 |
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 |
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) |
