wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
225 stars 30 forks source link

Game crash when using specific tech tree upgrades in BuildingDefinition #954

Closed TheSkullbot closed 4 years ago

TheSkullbot commented 4 years ago

Describe the bug Creating unit definitions with specific upgrades lead to a game crash when trying to access the building menu of units

Steps to reproduce :

OR

Code (simplified) example : https://github.com/TheSkullbot/WurstBug

compiler.log : https://pastebin.com/raw/AY8nSD4x languageServer.log : https://pastebin.com/raw/cXpGHARM

Weird behaviour :
Some buildings works, some others don't 🤷 I can upgrade my lamp into a chicken coop without issue, but not into a Torch Maybe it's related to compiletime order and ID generation ?

Frotty commented 4 years ago

The example misses too much code, please make a concise 1 package example that reproduces the problem.

TheSkullbot commented 4 years ago

I'll try to make a package with only the described problem today 👍

Frotty commented 4 years ago

Yes, please provide a SCCEE. Otherwise it's very hard to rule out side effects from the rest of the code.

TheSkullbot commented 4 years ago

I update the repo https://github.com/TheSkullbot/WurstBug with only the needed code.

I also narrowed the issue to this 2 conditions :

In the code example : Building 1 : Tent Building 2 : Campfire Building 3 : Lamp

Please also note that I'm using an ObjectIDManager lib to generate ids at compile time Ids are ok in the generated map (x001, x002 & x003)

Hope it helps !

Frotty commented 4 years ago

Does this constellation work in the world editor?

TheSkullbot commented 4 years ago

Hum, good point, it doesn't work in the world editor either. I should have tried it before posting. So, definetely not a Wurst issue, can be closed :)

Unrelated but, do you guys know where to find the crash logs for reforged ?

Frotty commented 4 years ago

Hum, good point, it doesn't work in the world editor either.

😅 Good to know, might be useful to add as comment to stdlib source/doc pages.

Unrelated but, do you guys know where to find the crash logs for reforged ?

Nope. I just know that classic crash logs were never really useful to modders.