Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: I need help, my map crashes
I need help, my map crashes
Nov 2 2022, 11:54 pm
By: Andrea Rosa  

Nov 2 2022, 11:54 pm Andrea Rosa Post #1

Just a glitch in the Matrix

The map I'm working on keeps crashing for no apparent reason. It's not a modded map, and I've never experienced this before. The crash happens randomly, sometimes after 30 minutes, sometimes later. If I reloaded a saved game, the crash may occur again or not. :(

Some more info:
- The map has been made with StarEdit and later edited with SCMDraft2, and I kept using the latter thereafter (I did not switch between editors).
- The map is not excessively complex.
- Tile editing and sprites are present, but can tile editing cause crashes?
- There are some stacked buildings.
- The map size is standard (192x256).
- A Zerg player running Zerg Campaign Difficult has Plague disabled (however I did this before and I never had problems).
- The above mentioned Zerg player initially runs a vanilla campaign script (the one from Eye of the Storm), and later switches to Zerg Campaign Difficult. Could this be an issue?

Any idea? If anyone with some experience in game crashes is willing to take a look at the map I would be very thankful.

Post has been edited 1 time(s), last time on Nov 3 2022, 12:11 am by Andrea Rosa.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Nov 3 2022, 9:15 am Nekron Post #2



AI cannot "switch" scripts, it will load both at once while still being restricted by global AI limits (such as max limit of upg/tech/building requests per town), which could result in a crash once it requests enough stuff.

Separately, Zerg AIs can also rarely crash if an Egg is destroyed in the same frame it was hatching

Separately AIs in general can rarely crash if they have guards (preplaced units, or units placed with the place_guard command, or mind-controlled / spawned / given via trigger units) that have been rebuilt twice.

Either of those could be responsible or even something else I could be forgetting, your best bet is probably asking someone who knows their stuff (not me) to take a look at the crashdump.




Nov 3 2022, 9:16 am IlyaSnopchenko Post #3

The Curious

Disabling stuff for scripts and switching them is not a good idea. There is little other valid reason for a map to crash. Just write your own if the existing ones are not satisfactory.

I also found once that sometimes maps can crash when you place sprites of certain things, like vespene geysers. I don't know what I was stoned on to try that, though. :)



Trial and error... mostly error.

Nov 3 2022, 10:52 am Roy Post #4

An artist's depiction of an Extended Unit Death

Did you check the stickied thread, Why does it crash? (1.16.1)? It goes over how to find the crash logs and has a document with known fault addresses, so you could either diagnose the issue yourself (if it's listed), or post the crash log there for a community member to look at it. Remember to include the error message the game gives you when the crash happens (if any), and include the error log.




Nov 3 2022, 1:11 pm Andrea Rosa Post #5

Just a glitch in the Matrix

Thanks for your replies, guys!


Quote from Roy
Did you check the stickied thread, Why does it crash? (1.16.1)? It goes over how to find the crash logs and has a document with known fault addresses, so you could either diagnose the issue yourself (if it's listed), or post the crash log there for a community member to look at it. Remember to include the error message the game gives you when the crash happens (if any), and include the error log.

Yes, I checked it. Unfortunately, I'm always kicked to the desktop, no error is displayed, and no error log is created.


Quote from IlyaSnopchenko
I also found once that sometimes maps can crash when you place sprites of certain things, like vespene geysers. I don't know what I was stoned on to try that, though. :)

Nope, I only have sprites associated to doodads.


Quote from Nekron
AI cannot "switch" scripts, it will load both at once while still being restricted by global AI limits (such as max limit of upg/tech/building requests per town), which could result in a crash once it requests enough stuff.

I did read somewhere that it is possible to use more than one AI by giving the units to another computer player, then back to the original player, and then run the new AI: this should erase all previous orders and give the new AI a "fresh start". In fact, I've already used this technique in other maps and it worked. However, it could be possible that the two AIs I'm currently using might hit certain limits.


I will try to disable some stuff and see what happens. What is really frustrating is that the bug always occurs late in the game, so it's very difficult to track down its cause. The fact that I don't even get an error log is even more aggravating.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Nov 3 2022, 4:23 pm Nekron Post #6



Quote from Andrea Rosa
I did read somewhere that it is possible to use more than one AI by giving the units to another computer player, then back to the original player, and then run the new AI: this should erase all previous orders and give the new AI a "fresh start".

Hmmm, I think you're right actually and this should work. I know from all the time I spent working on melee AIs that certainly if you kill all of its main towns it will not be able to rebuild from expos. I hadn't thought about it this way (because typically when I hear something along those lines it's three insane AIs slapped together), but your way of doing it sounds like it should avoid this issue.

If you can drop me an example map that uses this (does not have to be this one if you don't want to share it), I can open it with AI debug and take a look!



If no error log is displayed, I would typically expect there to be a infinite loop or something along those lines - is there no Iscript modding/EUDing involved somehow? Probably not the only cause, but when I screw something up that's typically the first thing I look at

If you're testing on SCR and have a good enough machine, you can make a profile called something like test #x5 for LAN and it'll run the game at x32 speed - very useful for repeatedly triggering issues that normally take a long time :)




Nov 3 2022, 5:37 pm MidNighTime Post #7



Hello Andrea Rosa,

Try removing all the doodads as an isolated test. These can crash/freeze/drop you or other players (error rock) when used incorrectly or as map prevention.

I'm almost certain this is the issue but, i could be wrong hehe. I found myself visiting the forums today and noticed this thread. Good luck.



None.

Nov 3 2022, 7:05 pm Andrea Rosa Post #8

Just a glitch in the Matrix

Quote from Nekron
If no error log is displayed, I would typically expect there to be a infinite loop or something along those lines - is there no Iscript modding/EUDing involved somehow? Probably not the only cause, but when I screw something up that's typically the first thing I look at

No modding and no EUD, just normal triggers and stock campaign AI scripts (including scripts from the original missions)



Quote from Nekron
If you're testing on SCR and have a good enough machine, you can make a profile called something like test #x5 for LAN and it'll run the game at x32 speed - very useful for repeatedly triggering issues that normally take a long time :)

I don't have SCR, I'm working with version 1.16


Quote from Nekron
If you can drop me an example map that uses this (does not have to be this one if you don't want to share it), I can open it with AI debug and take a look!

Sure, I have no problems in sharing it :) I have temporarily removed the triggers involving the change of AI, I will test the map again tonight. If it will crash again, I will send it to you (even though this would mean that the problem is elsewhere).


Quote from MidNighTime
Hello Andrea Rosa,

Try removing all the doodads as an isolated test. These can crash/freeze/drop you or other players (error rock) when used incorrectly or as map prevention.

I'm almost certain this is the issue but, i could be wrong hehe. I found myself visiting the forums today and noticed this thread. Good luck.

Thanks, I will take your idea into consideration, even though I've always used plenty of doodads in my maps and they never cashed. I'm also below the 250 sprites limit, by the way.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Nov 4 2022, 12:02 am Andrea Rosa Post #9

Just a glitch in the Matrix

Okay, maybe (just maybe) the problem has been fixed. I have finally been able to play the map till the end, and no crash occurred. More tests will be needed, but the fact that it didn't crash during a gaming session of over 2 hours is encouraging (in all previous tests, the game crashed before the 60 minutes mark).

Apparently, the two AI scripts that I wanted to use are not compatible with each other. That's a shame, because the intended effect was rather cool: "Protoss 10 - Mini-Town Master", along with its areatown scripts, would have kept the Zerg at level 1 upgrade for 30 minutes or so, and then "Zerg Campaign Difficult" would have been executed, allowing the Zerg to quickly reach level 3.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Nov 4 2022, 5:54 am Cool-Knight Post #10



Quote from Andrea Rosa
- A Zerg player running Zerg Campaign Difficult has Plague disabled (however I did this before and I never had problems).
- The above mentioned Zerg player initially runs a vanilla campaign script (the one from Eye of the Storm), and later switches to Zerg Campaign Difficult. Could this be an issue?

Any idea? If anyone with some experience in game crashes is willing to take a look at the map I would be very thankful.

I did read somewhere that it is possible to use more than one AI by giving the units to another computer player, then back to the original player, and then run the new AI: this should erase all previous orders and give the new AI a "fresh start". In fact, I've already used this technique in other maps and it worked. However, it could be possible that the two AIs I'm currently using might hit certain limits.

I would indeed say it's the AI scripts that are causing your map to crash, and doing that "switch and technique" does not change the fact that the game is hardcoded when a "flag" is set; even if you remove the units and give new ones back, the AI is still running the first script in the background. Imagine that it's a window, and you just drop the window down (e.g., a game), but it's still running, and when you bring that window back up, it will resume.

Once an AI script is "run," it will keep running until that player has a trigger called "Win or Lose." Then that script or scripts will be killed off.

Having more than one script running might cause an issue. Having two scripts do almost the same thing is likely to indeed make crashes happen.

Just stick with one script since you are on version 1.16.1 and not a remaster, and yes, you are more likely to have crashes.

Good luck!

And if you need a bit more about the AI, I did document it on my website, but it's not finished or done yet.

StarCraft AIs (information and guidance)

I am not advertising my website, nor am I trying to get people to go from here to my website; once I am done with that, it will also be posted on Staredit.net (one day).



I make StarCraft BroodWar Maps! Servers I'm On: USEast/USWest!

You can also find me at my Website My Akas: SHANE-009

Follows and obey SEN Rules: The Rules.

Updated as of: 9/11/2021

Nov 4 2022, 6:37 am Nekron Post #11



1.16.1 is barely more likely to crash than SCR and not at all due to AI (no AI crashes have been fixed in SCR)

You could try using TB8A for a relatively quick upgrade routine Andrea, and then PB5A/B for lategame attacks if they need to be supplemented. (PB5A/B is only additional attacks, it will crash on players that do not have an AI town currently so it would need to be added and not switched in)

I think in general I would advise to be cautious with Zerg Campaign Easy/Medium/Difficult since the script is extremely poor quality (as in using commands that do not exist sometimes), but in this particular case I'm not sure why would it crash.




Nov 4 2022, 4:49 pm Andrea Rosa Post #12

Just a glitch in the Matrix

Quote from Cool-Knight
I would indeed say it's the AI scripts that are causing your map to crash, and doing that "switch and technique" does not change the fact that the game is hardcoded when a "flag" is set; even if you remove the units and give new ones back, the AI is still running the first script in the background. Imagine that it's a window, and you just drop the window down (e.g., a game), but it's still running, and when you bring that window back up, it will resume.

Once an AI script is "run," it will keep running until that player has a trigger called "Win or Lose." Then that script or scripts will be killed off.

Many thanks for your clear explanation, even more so because I have no deep knowledge of the AI inner structure. I won't miss to check your website :)


Quote from Nekron
You could try using TB8A for a relatively quick upgrade routine Andrea, and then PB5A/B for lategame attacks if they need to be supplemented. (PB5A/B is only additional attacks, it will crash on players that do not have an AI town currently so it would need to be added and not switched in)

Those are Brood War scripts, right? If so I can't use them, I'm working on a StarCraft campaign, my last one for the vanilla game.


Quote from Nekron
I think in general I would advise to be cautious with Zerg Campaign Easy/Medium/Difficult since the script is extremely poor quality (as in using commands that do not exist sometimes), but in this particular case I'm not sure why would it crash.

Well, so far I've been lucky, they always worked decently in my previous maps - of course, the fact that I don't know how they are supposed to work helps me in considering their working "decent" LOL ;) I've found that mixing them with scripts from the original missions is a good solution (even though few of them are actually challenging), and I also like to use forced attacks to add variety to the attack waves.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Nov 5 2022, 9:43 am DaMnUFo0 Post #13



Does "Clear Previous Combat Data" not work for AI scripts?




Nov 5 2022, 12:01 pm Andrea Rosa Post #14

Just a glitch in the Matrix

Quote from DaMnUFo0
Does "Clear Previous Combat Data" not work for AI scripts?

It's a Brood War only feature, while the campaign I'm about to release is for StarCraft, and it will be my last project for the vanilla game.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Nov 5 2022, 12:58 pm Nekron Post #15



Clear previous combat data does nothing except reset region states (tell AI that it does not need to defend/attack a region anymore, potentially)
It's not a BW script, too, I don't think? It's not flagged as requiring BW

Also I wanted to add that the comment above about switching is not right, Andrea's method is correct in that removing enough of an AI will clean most of what you could be concerned about in a town - see this https://www.youtube.com/watch?v=6YymYDdrfRU example where I run an AI and temporarily give all its units away. Nothing is left from the town array, except for commands that are indeed permanent outside of modding/euding an appropriate clear command in (defense_ and guards will not be cleared when a town is lost) - the AI does not start mining again, buildings that were assigned to a town are unassigned, and actions that would have been requested are lost - it will not continue upgrading by itself etc, because its town is deleted.




Nov 5 2022, 3:46 pm Andrea Rosa Post #16

Just a glitch in the Matrix

Quote from Nekron
Clear previous combat data does nothing except reset region states (tell AI that it does not need to defend/attack a region anymore, potentially)
It's not a BW script, too, I don't think? It's not flagged as requiring BW

It was added to the StarCraft mode of Brood War when the latter was released, but it's not present on the original, pre-BW StarCraft.



Level Design Workshop

''Go to hell'' is basic. ''I hope your favorite StarCraft character gets voiced by Pr0nogo'' is smart. It's possible. It's terrifying.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Roy, jun3hong