Annoying NewGen bug

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Not sure if I should have posted this in the NewGen thread or made my own, so if I did the wrong decision I'm sorry.

On to my question.
Is there any logical reason that a trigger should crash when the test map button is used, but not when warcraft is opened and the map is manually found? This is the trigger.

JASS:
function Trig_Hero_Info_Actions takes nothing returns nothing
    if (GetTriggerUnit() == gg_unit_N000_0006) then
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Fire Mage")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Fire Mage is an |cff0000ffintelligence|r based hero")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Fire Mage's abilities are: ")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Fire Nova: The mage channels fire energy through his body, then blasts it out around him. Deals |cff0000ff(2/3/4)x Intelligence|r damage. Warning: This ability harms allies.")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Flame Rush: The mage sets himself on fire and charges the target, burning all units he passes along the way. Burn damage is |cff0000ff(1/1.5/2)x Intelligence|r.")
        return
    endif

    if (GetTriggerUnit() == gg_unit_H000_0023) then
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Paladin")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Paladin is an |cffff0000Strength|r based hero")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"The Paladin's abilities are: ")
        call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3,"Holy Shield: Creates holy spirits that float around you, damaging anything they hit. Spirit collision damage is |cffff0000(0.5/1.0/1.5)x Strength|r.")
        return
    endif

endfunction

//===========================================================================
function InitTrig_Hero_Info takes nothing returns nothing
    local integer i = 0
    set gg_trg_Hero_Info = CreateTrigger(  )
    loop
    exitwhen i>12
    call TriggerRegisterPlayerUnitEvent(gg_trg_Hero_Info, Player(i), EVENT_PLAYER_UNIT_SELECTED, null)
    set i = i + 1
    endloop
    call TriggerAddAction( gg_trg_Hero_Info, function Trig_Hero_Info_Actions )
endfunction

This works fine if I open the map in warcraft and run it, or if I copy the trigger and units over to the normal WE, yet it crashes if testing in NewGen. This is quite annoying as most of my other triggers require NewGen to work, and it's inconvenient to open warcraft every time I want to test my map.
 

Cohadar

master of fugue
Reaction score
209
Try not using spaces in your trigger name.

Instead of "Hero Info" name it "HeroInfo"
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Got the result I thought I'd get: Still crashes through test button, works in normal warcraft. Didn't think changing trigger name would affect it, but anything's worth a shot.
 

Builder Bob

Live free or don't
Reaction score
249
I tried to reproduce the crash, so I copied your trigger and replaced the units with units from my map.

The map saved perfectly, and the test button was also working.
The text also appeared when selecting the two units in question.

I'm using Jass NewGen Pack 1.4c


Hope you figure it out.
 

Joker(Div)

Always Here..
Reaction score
86
You probably got the wrong trigger, and next, I'm pretty sure the NewGen didn't cause your crashes (This could be a rare case though).
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
You probably got the wrong trigger, and next, I'm pretty sure the NewGen didn't cause your crashes (This could be a rare case though).

I know I have the right trigger, as the map works fine in Test Map with this trigger disabled and all other triggers enabled. And it must be NewGen, cause this trigger works in Warcraft and normal WE.

PitzerMike said:
Use NewGen's bytecode trace to find out where the crash occurs.
And where exactly do I find this? Is it in the logs folder, or is it the error message I get when it crashes, or something different altogether?
 

Terrabull

Veteran Member (Done that)
Reaction score
38
stupid question time.
Do you save the map before you click the test button? EVERY time?
Does it have an asterick (*) after the name of the map when you click the test button? If so, safe and then test.
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
Yes, I save before I test every time. There is never a 'This file has been modified' *. If I didn't, this wouldn't work ever because that map wouldn't be compiled, and wouldn't open in warcraft. But right now it works every way except the NewGen test map button.
 

Tom Jones

N/A
Reaction score
437
I had excactly the same bug. It happened when I switched to the new loader. Switching back to 1.4c did the trick for me, which really doesn't help you if you aren't able to run 1.4c with the new blizzard patch. This brings you back to:
And where exactly do I find this? Is it in the logs folder, or is it the error message I get when it crashes, or something different altogether?
Open your Newgen directory, find war3err.lua, open it, find the line bytecodetrace=false, set it to true instead, save the file, test your map and then have a look in the logs folder.
 

trb92

Throwing science at the wall to see what sticks
Reaction score
142
> It happened when I switched to the new loader.
Yeah, that's when this started happening to me too. Switching back to 1.4c won't work, cause it simply sits there and does nothing after I tell it to open, or opens without the grimorie menus.

To the bytecode trace: I get a whole mess of text... I'm guessing the last entry would be what caused it to crash, but I don't have a clue what it means... Just says
Code:
0 0 0 0x27:return 0
Which is odd, cause all the other entries give a trigger name beside them...
After this last entry, there's also 90 lines of pure spaces for some reason.

And Cohadar, if it were a JassHelper bug it wouldn't compile at all, and the map wouldn't run in warcraft 3, but it does. So I'm pretty sure JassHelper isn't the problem right now.

Thanks for trying to help, guys.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top