I've been working on my map with a library called "N's Talent." I've been working with this library fine just now... Even though it had a CRITICAL ERROR that happened in a very small chance - where the triggers of the game didn't load when the game started.
The error happened only about 1 times during 10 tests. However, this frequency got increased all of a sudden, and...
Now I'm getting 9 Trigger-Not-Loading errors out of 10 tests.
Can somebody fix this library or recommend me another one?
I've been working with this library for a long time, so if this can't be fixed, the map will have to go through a complete overhaul - which I spent 2 years doing, and this is going to be... A big problem.
Thanks in advance to who wants to help!
To SUM the ERROR up: Every now and then, with this library - Map Initialization Triggers won't load.
The Video shows what's happening in detail - The game randomly works and doesn't work.
Can you create an example map where this problem can be recreated? Otherwise the problem could be due to a conflict with the system in your map and not with the system itself.
Are there any script runtime errors being logged? These often reveal why triggers are not working.
Try debugging what is happening. Enable the trigger debugger (editor preferences, test in windowed mode and turn on trigger debugger). You can insert break points and inspect variable values to try and identify what is going wrong and where it happens.
Hello and thanks for the reply! I've tried to make this happen again in a small map with nothing in - which I failed to create the error situation-working map. How can I see if there are any script runtime errors being logged?
And I don't think I can see when and where the triggers are going wrong - since it happens "Only" in the map's very first second - and every single trigger with "Map Initialization" Events doesn't work. AND this doesn't happen all the time but randomly.
Although I don't like this idea, I could send you the map to your Email if you want to take a look, since with this error persisting, the map can't go on.
EDIT: I've tried to use the Debugging window and didn't work as well. The game stays in a black screen and never progresses until I turn off the debugging window.
How can I see if there are any script runtime errors being logged?
Usually they appear in the error log window at the top of the screen when testing the map. Error logging can be explicitly turned off however, using one of the map settings
And I don't think I can see when and where the triggers are going wrong - since it happens "Only" in the map's very first second - and every single trigger with "Map Initialization" Events doesn't work. AND this doesn't happen all the time but randomly.
Break points you insert from a previous test of the map are remembered when you restart the map. This allows you to break during execution of the map initialization functions.
What you are describing is symptomatic of a thread crash. The initialization is being stopped at some stage before completion. This can be caused by a fatal galaxy error or if the thread is hitting its operation limit. This is a common problem with Warcraft III maps however I have never seen it reported in a StarCraft II map before.
EDIT: I've tried to use the Debugging window and didn't work as well. The game stays in a black screen and never progresses until I turn off the debugging window.
This sounds like the debugger is set to break on error. The first galaxy runtime error that occurs will cause the debugger to pause execution at the point of the error. Useful for identifying the cause of a specific error.
You can resume execution by right clicking on the script window and selecting the appropriate button (something like "resume"). It will then continue execution until either another script error occurs, or a break point is reached.
Although I don't like this idea, I could send you the map to your Email if you want to take a look, since with this error persisting, the map can't go on.
This is usually the best way to diagnose such obscure problems such as this. Simplest approach is to upload the map and all required mods to a free cloud storage service like DropBox, OneDrive or Google and share a public link to it via Private Message, and then delete it from the cloud after it has been downloaded. The reason this is generally better than email is because some email services, especially those that are free, limit the maximum size of received attachments and some maps can be several hundred megabytes in size.
In case you are worried about my credibility, I have worked on maps such as Undead Assault 3 and Special Forces Elite 5 under the name DrSuperGood.
Hello and thanks for the reply! I've tried to make this happen again in a small map with nothing in - which I failed to create the error situation-working map. How can I see if there are any script runtime errors being logged?
And I don't think I can see when and where the triggers are going wrong - since it happens "Only" in the map's very first second - and every single trigger with "Map Initialization" Events doesn't work. AND this doesn't happen all the time but randomly.
Although I don't like this idea, I could send you the map to your Email if you want to take a look, since with this error persisting, the map can't go on.
EDIT: I've tried to use the Debugging window and didn't work as well. The game stays in a black screen and never progresses until I turn off the debugging window.
AND.... I was able to create an example map where the error persisted.
You can see the error in action just by testing the map - and keep restarting. If you're lucky, you'll get a Dehaka. If you're not lucky however... You will face the ERROR.
I really hope someone could find a solution to this problem.
Oh I didn't know that I was writing a reply when you were writing YOUR reply! Thanks a bunch! And I was finally able to create a map file that recreates this error! (Check my previous post)
Yes, and I'm seeing this too. How should I give you the file? The size is only about 900kb. I tried uploading this to SC2Mapster's project site where I uploaded my previous Viacre-related files - and got rejected for no apparent reason. So I must find another way to upload this.
I will start looking into the problem. Although I will try to prioritize it, it may take a few days depending on how difficult it is to find the cause.
The problem is your color randomization system. The way you implemented it has a chance to create too many nested trigger threads. The result is that the main initialization thread does not manage to fully execute.
After disabling the action to run the color randomization trigger, initialization worked all the time.
To assign players a unique random color, start by adding all available colors to a list (array). Then for each player who you want to have a random unique color you pull out the color at a random index from the list. To pull an element out of a list, all subsequent elements are shuffled down 1 position and the list size is decremented by 1. Since order is not important during random selection, you can simplify this to moving the last element of the list to the position of the element that was just pulled. This approach allows a unique item to be chosen at random with a complexity of O(1) and with invariant runtime duration.
Hello, community of SC2Mapster!
I've been working on my map with a library called "N's Talent." I've been working with this library fine just now... Even though it had a CRITICAL ERROR that happened in a very small chance - where the triggers of the game didn't load when the game started.
The error happened only about 1 times during 10 tests. However, this frequency got increased all of a sudden, and...
Now I'm getting 9 Trigger-Not-Loading errors out of 10 tests.
Can somebody fix this library or recommend me another one?
The link to the Library's Project
The Newer Link with Downloadable Files
I've been working with this library for a long time, so if this can't be fixed, the map will have to go through a complete overhaul - which I spent 2 years doing, and this is going to be... A big problem.
Thanks in advance to who wants to help!
To SUM the ERROR up: Every now and then, with this library - Map Initialization Triggers won't load.
The Video shows what's happening in detail - The game randomly works and doesn't work.
Can you create an example map where this problem can be recreated? Otherwise the problem could be due to a conflict with the system in your map and not with the system itself.
Are there any script runtime errors being logged? These often reveal why triggers are not working.
Try debugging what is happening. Enable the trigger debugger (editor preferences, test in windowed mode and turn on trigger debugger). You can insert break points and inspect variable values to try and identify what is going wrong and where it happens.
In reply to Forge_User_04585675:
EDIT: I've tried to use the Debugging window and didn't work as well. The game stays in a black screen and never progresses until I turn off the debugging window.
Usually they appear in the error log window at the top of the screen when testing the map. Error logging can be explicitly turned off however, using one of the map settings
Break points you insert from a previous test of the map are remembered when you restart the map. This allows you to break during execution of the map initialization functions.
What you are describing is symptomatic of a thread crash. The initialization is being stopped at some stage before completion. This can be caused by a fatal galaxy error or if the thread is hitting its operation limit. This is a common problem with Warcraft III maps however I have never seen it reported in a StarCraft II map before.
This sounds like the debugger is set to break on error. The first galaxy runtime error that occurs will cause the debugger to pause execution at the point of the error. Useful for identifying the cause of a specific error.
You can resume execution by right clicking on the script window and selecting the appropriate button (something like "resume"). It will then continue execution until either another script error occurs, or a break point is reached.
This is usually the best way to diagnose such obscure problems such as this. Simplest approach is to upload the map and all required mods to a free cloud storage service like DropBox, OneDrive or Google and share a public link to it via Private Message, and then delete it from the cloud after it has been downloaded. The reason this is generally better than email is because some email services, especially those that are free, limit the maximum size of received attachments and some maps can be several hundred megabytes in size.
In case you are worried about my credibility, I have worked on maps such as Undead Assault 3 and Special Forces Elite 5 under the name DrSuperGood.
If you're lucky, you'll get a Dehaka. If you're not lucky however... You will face the ERROR.
https://www.sc2mapster.com/projects/viacre-chapter-02-another-world/files/2453840/download
In reply to Forge_User_04585675:
The download link produces a 404 error. I do not think it is set to allow public downloads.
In reply to Forge_User_04585675:
I will start looking into the problem. Although I will try to prioritize it, it may take a few days depending on how difficult it is to find the cause.
In reply to Forge_User_04585675:
The problem is your color randomization system. The way you implemented it has a chance to create too many nested trigger threads. The result is that the main initialization thread does not manage to fully execute.
After disabling the action to run the color randomization trigger, initialization worked all the time.
To assign players a unique random color, start by adding all available colors to a list (array). Then for each player who you want to have a random unique color you pull out the color at a random index from the list. To pull an element out of a list, all subsequent elements are shuffled down 1 position and the list size is decremented by 1. Since order is not important during random selection, you can simplify this to moving the last element of the list to the position of the element that was just pulled. This approach allows a unique item to be chosen at random with a complexity of O(1) and with invariant runtime duration.
In reply to Forge_User_04585675: