Bug in QDK Pro 4.1
wsquires
04 Aug 2009, 15:39Problem: In some cases, scripts get corrupted when game loaded/saved.
To Reproduce:
1) Start a new game with QDK Pro 4.1
2) Create two rooms (I called mine room1 and room2 since this is just a test)
3) Select room1 and select the "Exits" tab. Create an exit from room1 -> room2, but do not "automatically create exit in other direction".
4) Select room2 and select the "Exits" tab. Create a script for the corresponding exit from room2 -> room1. Edit the script.
5) Add a conditional that checks to see if a flag is set. Call the flag "player_has_light". In the "Then" clause, put a print message script and make sure the text is really long. Don't put anything in the "Else" clause. Add another line to the script below the conditional
6) Make this script also print a long message (something soppy about the player dying.)
7) Add another line to the script, and select "Game Control | End the game by making the player lose"
8) Close out the script
9) Save the "game".
10) Exit QDK Pro 4.1
11) Relaunch QDK Pro 4.1 and load the "game" you just created.
12) Select room2 and select the "Exits" tab. Now try to look at the script for the exit to room1. Oops!! Only an opening-curly-brace shows up
13) If - heaven forbid - you actually try to edit this defective script, you get into an infinite loop of dialog boxes reporting an error.
Setup:
WinXP (SP2) box w/512 MB RAM and 20+ GB HD space.
32MB Nvidia TNT 64 3D video card
Repeatability:
always (for me, anyway - don't have any other machines to test this on.)
Work-around:
None - yet.
To Reproduce:
1) Start a new game with QDK Pro 4.1
2) Create two rooms (I called mine room1 and room2 since this is just a test)
3) Select room1 and select the "Exits" tab. Create an exit from room1 -> room2, but do not "automatically create exit in other direction".
4) Select room2 and select the "Exits" tab. Create a script for the corresponding exit from room2 -> room1. Edit the script.
5) Add a conditional that checks to see if a flag is set. Call the flag "player_has_light". In the "Then" clause, put a print message script and make sure the text is really long. Don't put anything in the "Else" clause. Add another line to the script below the conditional
6) Make this script also print a long message (something soppy about the player dying.)
7) Add another line to the script, and select "Game Control | End the game by making the player lose"
8) Close out the script
9) Save the "game".
10) Exit QDK Pro 4.1
11) Relaunch QDK Pro 4.1 and load the "game" you just created.
12) Select room2 and select the "Exits" tab. Now try to look at the script for the exit to room1. Oops!! Only an opening-curly-brace shows up
13) If - heaven forbid - you actually try to edit this defective script, you get into an infinite loop of dialog boxes reporting an error.
Setup:
WinXP (SP2) box w/512 MB RAM and 20+ GB HD space.
32MB Nvidia TNT 64 3D video card
Repeatability:
always (for me, anyway - don't have any other machines to test this on.)
Work-around:
None - yet.
Alex
04 Aug 2009, 16:03Thanks for reporting this, I will take a look into it.
wsquires
13 Aug 2009, 15:56Further information:
It is not a problem with file saving. Examining the in-memory ASL and comparing it with the just saved version, reveals that they're identical. I'm guessing the problem is an in-memory bug - some state information is being lost when you exit the program and not being restored simply by reading in the file. This bug appears to only affect scripts tied to exits (so far.) HTH
Also, it has nothing to do with whether the exit script has a conditional in it.
However when I quit QDK Pro 4.1 and re-start it and load either Bugtest2.asl or In-memory.asl, then copy the text from the newly-loaded file (in ASL view) with the previously saved file, there are differences:
1) The indentation is different (visually)
2) viewing the hex version, there's an extra '0x09' (tab) character in several places in the original file which are not there after loading it back in again. Specifically:
a) In the original saved file I have (in ASL):
{<tab><tab>msg <the message goes here...>
<tab><tab>playerlose
<tab>}
end define
b) in the newly-loaded file, this part looks like:
{<tab>msg <the message goes here...>
<tab>playerlose
<tab>}
end define
so it seems to be incorrectly setting the indention level.
It is not a problem with file saving. Examining the in-memory ASL and comparing it with the just saved version, reveals that they're identical. I'm guessing the problem is an in-memory bug - some state information is being lost when you exit the program and not being restored simply by reading in the file. This bug appears to only affect scripts tied to exits (so far.) HTH
Also, it has nothing to do with whether the exit script has a conditional in it.
However when I quit QDK Pro 4.1 and re-start it and load either Bugtest2.asl or In-memory.asl, then copy the text from the newly-loaded file (in ASL view) with the previously saved file, there are differences:
1) The indentation is different (visually)
2) viewing the hex version, there's an extra '0x09' (tab) character in several places in the original file which are not there after loading it back in again. Specifically:
a) In the original saved file I have (in ASL):
{<tab><tab>msg <the message goes here...>
<tab><tab>playerlose
<tab>}
end define
b) in the newly-loaded file, this part looks like:
{<tab>msg <the message goes here...>
<tab>playerlose
<tab>}
end define
so it seems to be incorrectly setting the indention level.
wsquires
14 Aug 2009, 14:49Oops, the line:
However when I quit QDK Pro 4.1 and re-start it and load either Bugtest2.asl or In-memory.asl, then copy the text from the newly-loaded file (in ASL view) with the previously saved file, there are differences:
should have read:
However when I quit QDK Pro 4.1 and re-start it and load either Bugtest2.asl or In-memory.asl, then compare the text from the newly-loaded file (in ASL view) with the previously saved file, there are differences:
However when I quit QDK Pro 4.1 and re-start it and load either Bugtest2.asl or In-memory.asl, then copy the text from the newly-loaded file (in ASL view) with the previously saved file, there are differences:
should have read:
However when I quit QDK Pro 4.1 and re-start it and load either Bugtest2.asl or In-memory.asl, then compare the text from the newly-loaded file (in ASL view) with the previously saved file, there are differences: