As the title says I was not sure if this is a bug because of my lack of knowledge.
This is the simple script for the purpose of demonstration.
package arm;
import cpp.vm.Thread;
class ThreadTrait extends iron.Trait {
var countingThread: Thread;
public function new() {
super();
notifyOnInit(function() {
countingThread = Thread.create(counting);
});
}
function counting(){
var count = 0;
while(count < 500){
count++;
trace(count);
}
}
}
Program just randomly exits. Thread is spawned and it prints count variable but not to the end of while loop. Sometimes prints to count=350 or smaller value. When I open project in Visual Studio and start to debugging in most cases program is working. Here is the screenshot of error in VS I have managed to catch