Numbered Steps to Reproduce Problem:
1.Create a new project.
2.Drop the code snippet in.
3.Start the game and use the "Test" verb.
Code Snippet (if applicable) to Reproduce Problem:
mob
verb
Test()
var/a=0
while(a<999999999)
a++
world<<"This test ran successfully."
Expected Results:It to execute fine or bring up the following message.
Infinite loop suspected--switching proc to background.
If it is not an infinite loop, either do 'set background=1' or set world.loop_checks=0.
proc name: Test (/mob/verb/Test)
usr: Guest-771557032 (/mob)
src: Guest-771557032 (/mob)
call stack:
Guest-771557032 (/mob): Test()
Actual Results:Most of the time it crashes, it rarely brings up the message. It should take at most 10 times to reproduce, I get it every 4 at most.
Does the problem occur:
Every time? Or how often?Most of the time.
In other games?Not Applicable
In other user accounts?Yes
On other computers?Yes
When does the problem NOT occur?Often
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Untested
Workarounds:Lower the load so that things execute faster.
***If it doesn't crash just keep setting it higher, or pushing harder things at it to do, and the app will crash, I was just doing tests with seeing how long it will take to do some icon operations using different methods, and a lot of them...and I kept crashing, some of the crashes occurred with "set background=1" added as well, but not as many as with this.
Incidentally, this code will loop forever because your limit is set much higher than the actual integer sensitivity of vars in BYOND. After about 16.8 million, ++a will stop doing anything.