ID:1559411
 
Resolved
(VS build) Proc error messages could cause crashes.
BYOND Version:506.1244 (VS2013)
Operating System:Windows 8 Pro 64-bit
Web Browser:Internet Explorer 11
Applies to:Dream Seeker
Status: Resolved (506.1246)

This issue has been resolved.
Descriptive Problem Summary:When I make a verb which is taking a long time to execute the app will crash most of the time.

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.

Do you have any details on the crash? I can try to reproduce this with code when I get a chance, but it'd be helpful to have something more concrete to look at.

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.
@Lummox JR, it happens when I make it do anything in a loop which loops a lot of times.

Event Viewer Crash Log

Faulting application name: dreamseeker.exe, version: 5.0.506.1244, time stamp: 0x535ae1c6
Faulting module name: MSVCR120.dll, version: 12.0.21005.1, time stamp: 0x524f7ce6
Exception code: 0xc0000005
Fault offset: 0x000129bf
Faulting process id: 0x187dc
Faulting application start time: 0x01cf647d843f2dad
Faulting application path: C:\Users\[Hidden]\Desktop\byond 506.1244\bin\dreamseeker.exe
Faulting module path: C:\Users\[Hidden]\Desktop\byond 506.1244\bin\MSVCR120.dll
Report Id: c3f0527a-d070-11e3-bee7-00235405775f
Faulting package full name:
Faulting package-relative application ID:

Due to your own report of the code likely looping forever in this case, I made a new code to reproduce the error.

mob
verb
Test()
var/a=0
var/b=0
while(b<1000000)
while(a<1000000)
a++
b++
world<<"This test ran successfully."


So it will loop a to 1mil, then b to 1mil(all while testing a each time even though it's over 1mil after the 1st counting to 1mil...which is about 2mil plus's to a variable, but actually testing with the code it executes instantly when I use "set background=1" and no crashing...so it must not be very cpu intensive...

It must just detect a possible infinite loop because it's executed the same statement so many times, and not properly handling this, when it's set to the background, it knows it's a possible infinite loop already, knows to throw no error about as much, and thus causes no crash in this case.

I believe the error I was getting crashes even with "set background=1" maybe because I was going so much over the limit of integer of the approximately 16.8mil that you said in your previous post, and it was a non-sleeped infinite loop running forever which caused a crash in that case.

I would have to come up with a separate test for that using the latest version once this is fixed probably to see what the result is.
Lummox JR resolved issue with message:
(VS build) Proc error messages could cause crashes.