HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Catastrophic CTD from nowhere! Help!

05-09-2006, 11:44 PM#1
|)@rk-Revenant
My map constantly crashes at any of these points:
1. After about 2-3 minutes
2. When a tank fires its main cannon (though, it sometimes fires without crashing. This is absolutely random; it sometimes crashes when you fire, other times firing doesn't affect it)
3. When the tank selection timer reaches zero.

I have tried many things to prevent this from happening, such as setting up triggers differently, enabling and disabling various triggers, and saving the map differently. Nothing works.

The map has worked perfectly in previous versions. It's as if the map suddenly dropped dead for no reason all of a sudden. The latest actually working version is 1.46, but only little has changed since then.

Also, you may notice that the older version has the "Damage" trigger disabled. It was disabled because it wasn't finished at the time. The next version had it enabled. It may also be worth noting that the "Damage" trigger actually worked in 1.47, but that version was overwritten.

Please, I really need help with this!

NOTE: You MUST have WE Unlimited 1.18 for this map to be opened. It has the Advanced Triggers and Advanced Spells tickboxes checked.
Attached Files
File type: w3xBlitzkrieg v1.49.w3x (443.5 KB)
File type: w3xBlitzkrieg v1.46.w3x (441.2 KB)
05-10-2006, 02:28 AM#2
Vuen
How does it crash? Does it crash to the desktop with an error message? Does it crash to the desktop without an error message? Does the triggering suddenly die?

The most common crashing errors I can think of off the top of my head are:

Invalid player calls. Calling Player(-1) (or ConvertedPlayer(0) which is what the GUI does) will crash you back to the desktop with an error message.

Thread-spawning loops, or event loops. For example, having a function ExecuteFunc itself indefinitely, or giving a unit an order in a Unit Is Issued An Order trigger. These will crash you back to the desktop without any error message.
05-10-2006, 03:54 AM#3
|)@rk-Revenant
It crashes with an error that says something about the memory being unable to be called. This crash applies to everyone in the game at the exact same time. The triggers work perfectly until the instant it crashes.

What is ConvertedPlayer(0)?
05-10-2006, 11:13 AM#4
Vuen
ConvertedPlayer(0) is what's causing your map to crash. I modified Blizzard.j to wrap ConvertedPlayer to see if that was the problem, and it is.

This means that somewhere in your code you're trying to convert an integer to a player, but that integer is zero. Since there's no player zero, hello desktop.


I've spent nearly two hours on this, because I don't like to freaking lose, but I finally give up. However, I managed to partly track down what's making it crash on your cannon firing. The reason is because when your cannon fires, it creates a Kapow, which kills itself shortly after it's created. This Kapow fires a death event to some trigger as it dies, and that trigger tries to convert an invalid integer to a player. This is the same reason item missiles crash when they explode, and probably the same reason for your crashes after a few minutes of gameplay because thats when your items start expiring.

I assume you have a broken Unit Dies trigger somewhere, which is causing all of your problems. I couldn't find it. Think about what you've changed since 1.47.

Attached is the modified Blizzard.j file I made. Import it into your map and call it Scripts\Blizzard.j ; this will scream an error message at you instead of crashing, which will let you keep playing to hopefully see what goes wrong. When the error messages go away, you can remove the file out of your map.
Attached Files
File type: zipBlizzard.j.zip (60.4 KB)
05-10-2006, 08:42 PM#5
The)TideHunter(
Thats odd though, try this:

Trigger:
Melee Initialization
Events
Conditions
Collapse Actions
Player - Set Player 1 (Red) Current gold to 750

Edit --> Convert to custom text.

it then says Player(0).
So player 1 gets converted to player 0.
Strange...
Im sure this is to save memory though as a array starts at 0 not at 1.

This maybe the same with ConvertedPlayer but im not sure
05-10-2006, 09:08 PM#6
Captain Griffen
ConvertedPlayer = the REAL player number + 1.
05-10-2006, 09:17 PM#7
Vuen
Quote:
Originally Posted by The)TideHunter(
This maybe the same with ConvertedPlayer but im not sure

No, those are only for the hardcoded "Player 1 (red)" constants. When you actually convert a player number to a player, you get ConvertedPlayer.
05-10-2006, 11:08 PM#8
|)@rk-Revenant
Thank you all, especially Vuen. I will try again to fix it based on what you have said.
05-11-2006, 04:10 AM#9
|)@rk-Revenant
Nope. No luck at all. The map gets the error when non-weapon powerups die, weapon projectiles die, and when tanks fire.
05-11-2006, 06:48 AM#10
Vuen
Well then my advice is figure out what you've changed, and start back from 1.46.
05-11-2006, 03:04 PM#11
|)@rk-Revenant
It's probably unfixable. Darn. Oh well, thank's anyways.