|
This page details the code that is used in the demo. If you do not understand the bug, you should look at the code to see what is happening.
Download the movie as a .dir file
If you don't want to bother with the explanation of this code, skip to the conclusion.
Overview
The code that is used to test for the bug is quite simple. Firstly there is a parent script to handle the network operation and simplify the rest of the scripts. This simply initiates preloadNetThing and uses callbacks to pass information back to the calling script whenever there is a change in status. It can pass any of the following messages:
- netBegin
The preload operation has begun successfully and a netID has been assigned.
- netComplete
The preload operation has completed successfully.
- netError
There was some sort of error: returns a description of the error.
Expected Behaviour
In theory, when the button is pressed, the net-object should start preloading the text file. When this begins, the "Waiting..." message should be displayed. If, for some reason, there is a network error, the error will be displayed, but that should not happen and is unrelated to our bug test.
The net-object is added to the actorList and will continually poll netDone once per frame until the preload operation has completed.
If the code is working as it should, then the operation will complete after a short time, and netDone will return true. As soon as this happens, the net-object will update the message to display the result. Normally, this will display "OK". Again, if there is a network error, the error will be displayed instead.
Actual Behaviour
Under build 102 or earlier, or if run from a webserver, the code functions as expected.
However, if run locally under build 106, the network operation never completes. Clearly, this is not desirable. The result is that the "Waiting..." message is displayed forever.

|