Strange Issue - Help requested

kel

New Member
Reaction score
1
Hi,

So I have a strange issue.

I have been working on a map with lots of custom code and units. Until recently everything was fine-ish. Recently, I have run into an issue that is bothering me.

The issue:
Everytime I try to save the map, I get a host of JASS errors. I have traced these errors to a function (that is autogenerated) that is creating an 'empty' trigger and calling its initialization right after the default Melee_Initilization trigger in the InitCustomTriggers function of war3map.j.
This error is preventing the map running.

This is, to my knowledge, the part of the code where things start breaking down:

JASS:
==============
// Trigger: 
//
================================
==============
function Trig__Actions takes nothing returns nothing
endfuntion

//
================================
==============
function InitTrig_ takes nothing returns nothing // *NB* this is the bad function, it is being autogenerated
    set gg_trg_ = CreateTrigger( ) // the function is trying to create a trigger and assign it to gg_trg_, but gg_trg_ doesn't exist!
    call TriggerAddAction( gg_trg_, function Trig__Actions )
endfunction

//
=================================
==============
function InitCustomTriggers takes nothing returns nothing
    ... a whole bunch of valid triggers then right near the end of this function we see...
    call InitTrig_Melee_Initialization( )
    call InitTrig_( ) //*NB* This is where the faulty trig is being called
endfunction


A few key notes:

* the global trigger variable gg_trg_ is not in the globals section of the script.
* I have manually gone into the script and tried the following:
- Manually remove the function call to InitTrig( ) as well as remove the whole InitTrig_ function and its action function. Doing this and injecting the new (edited) war3map.j into the map file allows me to run the map, but as soon as I change something and try to save the map, the bad code reappears!

This leads me to believe that something, somewhere is autogenerating this bad code.

I have even tried to manually add gg_trg_ as a global trigger variable in the global definitions at the top of the map.j file. But that section gets re-written when I save the map. Bringing me back to square one.

Since the problem seems to be one where something is autogenerating this bad trigger (empty trigger by the looks of it since its just gg_trg_ with no name), I tried again after disabling all my triggers except for the melee init (which doesn't do anything on my map).
Even after this, the problem persists, something is creating this random empty trigger, not adding it to the globals and forcing it to be called during the inits of all custom triggers.


I was wondering if anyone had come across a problem like this before, one where empty triggers are being generated from nowhere. If so, how did you solve it?

A quick turnaround would be helpful, I will be watching this thread in case you need more info.

As a side note, I am not using any custom spell/trigger system. Everything is base Jass. Nothing fancy :)

Thanks for the help.
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
export, then reimport all triggers?
 

kel

New Member
Reaction score
1
export, then reimport all triggers?

Tried it.

Crashes. Gives me a "not enough memory issue". Don't know why, but I think its a separate issue (I'm developing on a mac).

I do see a way to fix it, but it involves manually copying over each trigger to a new map (thankfully, object data can get imported just fine).

I am hoping not to have to do that though, it is more of a last resort.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
It's just a hunch, but the .j file is written by the trigger file inside the MPQ.
I'm not sure about the exact name of the file, but it should be the one of the larger text files.

Perhaps, opening this file would give you more insight about what's happening.
It could be that there is some corruption going on, and that the trigger with no name is actually in there. But the Trigger Editor does not show empty triggers or anything. However on save, it gets loaded into the .j file.

But as I said, it's just a hunch. I guess it's worth taking a look.
 

kel

New Member
Reaction score
1
It's just a hunch, but the .j file is written by the trigger file inside the MPQ.
I'm not sure about the exact name of the file, but it should be the one of the larger text files.

Perhaps, opening this file would give you more insight about what's happening.
It could be that there is some corruption going on, and that the trigger with no name is actually in there. But the Trigger Editor does not show empty triggers or anything. However on save, it gets loaded into the .j file.

But as I said, it's just a hunch. I guess it's worth taking a look.
Aye, this was on my mind too. I was going through the files in the w3x to see if there was something obvious in there.

It makes sense that the auto-genned war3map.j is pulling its custom trigger info from some file that's being piped out by the trigger editor. I will take a look at this in more detail and report back. Unfortunately, there is no good MPQ editor/viewer for the Mac, so anytime I need to mess about with the w3x I need to bootcamp into my windows partition :( If only there was an MPQ Master like program for the Mac (on a side note, if anyone knows of one please let me know :D ).
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
If only there was an MPQ Master like program for the Mac (on a side note, if anyone knows of one please let me know :D ).
I use MPQ Extractor and DropMPQ.

As for your problem, I think I've run into something similar, but I had evidence of a blank, uneditable trigger in the trigger editor, and the program soon crashed. Don't know what causes it.
 

kel

New Member
Reaction score
1
I use MPQ Extractor and DropMPQ.

As for your problem, I think I've run into something similar, but I had evidence of a blank, uneditable trigger in the trigger editor, and the program soon crashed. Don't know what causes it.
I use MPQ Extractor as well, however, from my experience with it, it doesn't handle w3x files. It manages actual .MPQs just fine though. I'll give DropMPQ a try.
MPQ Master for windows can actually handle pretty much any kind of packaged blizzard files, MPQs, W3Xs W3Ms, etc etc.

I have a theory as to what might be causing the creation of the blank trigger. From my experience, I found that (at least in the Mac version) if you create a new trigger in the editor and then try to rename it, and then while renaming it (i.e. typing the text into the name field) click outside of the text box for the name (even by mistake), the world editor crashes completely. This happens consistently. I have a feeling that this bug is somehow related to this behavior. Maybe in an attempt to 'save any data' before crashing, the trigger editor quickly flushes out everything it has into the file that the script generator uses to auto-populate, and in the process, it flushes out a trigger with no name (since you were still renaming it when it crashed).

Then something bad happens and somehow, the trigger editor looses sight of this buggy trigger and it gets locked in the system somehow. Anyway, these are just ideas really.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
I use MPQ Extractor as well, however, from my experience with it, it doesn't handle w3x files. It manages actual .MPQs just fine though. I'll give DropMPQ a try.
Change the file extension to .mpq. :thup: .w3x files are MPQ compressed.

I've never had anything happen other than the WE crashing when I clicked out of a trigger's name.
 

kel

New Member
Reaction score
1
Change the file extension to .mpq. :thup: .w3x files are MPQ compressed.
Excellent tip! You just saved me a lot of time and hassle :thup:

Strange about the renaming issue. I can make it happen pretty consistently. Click on the trigger name like you want to rename it, let the text box go into edit mode, click away somewhere else in the trigger editor, boom!

Are you using any special third party addition to the default world editor? I am using nothing but the defaults. Either way, strange.

Edit: By the way, know of any good syntax highlighters for Jass on the Mac?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Oh, no no, I meant that it doesn't do anything worse than just crash. :p No corrupted maps because of it.

[edit] "Good" is subjective, but you can get the Java-based jEdit and Vexorian's JASS definitions for it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top