www.ClassicTW.com
https://mail.black-squirrel.com/

Question about a bug
https://mail.black-squirrel.com/viewtopic.php?f=52&t=30364
Page 1 of 1

Author:  John Pritchett [ Thu Sep 16, 2010 5:26 pm ]
Post subject:  Question about a bug

I just tracked down and fixed a bug that appears to have been around since the late 90s. This bug caused some odd behavior related to displays. For example, it might cause a display to fail to show as if you pressed space to abort the output. In some cases, it would hang the game, but you could break out of the hang by pressing any key, so it wasn't a hard lock. There are other potential problems related to the bug. Basically, what was happening was when the player input buffer wrapped around, any peeks into the buffer would return the character from the previous buffer pass if no new character was available. Obviously a bad thing, and the side-effects would be fairly random. Like if the left-over character that's next in the buffer happens to be a SPACE while you're displaying a screen, that screen would abort.

I was wondering if anyone here has experienced any bugs that might be related to this. I haven't had any reports of the kind of behavior I've seen with this, but the code that caused the bug is VERY old, predating TWGS. I suppose it's possible that some new change caused the bug to surface, but it sure seems like something that's been around for awhile.

Author:  HiTechRedneck [ Thu Sep 16, 2010 11:20 pm ]
Post subject:  Re: Question about a bug

I don't recall having ever seen anything like what you are describing, either recently, or back in the BBS days. But then again, I'm just 1 out of ############# players... :)

Author:  John Pritchett [ Fri Sep 17, 2010 1:47 am ]
Post subject:  Re: Question about a bug

I needed a sanity check on this one, so I installed the last public release, TWGS10300, and tried to reproduce this bug. That version has been out since 2004.

After flying around manually from sector to sector long enough to wrap the 256 byte input buffer, I locked it up as expected. Here's a screen cap.

Image

I'm surprised if nobody has run across this bug. I think it's likely many people have, but never saw a pattern or could reproduce it. It's an elusive bug. I was lucky to spot it myself.

Author:  Cruncher [ Fri Sep 17, 2010 7:06 am ]
Post subject:  Re: Question about a bug

John Pritchett wrote:
I needed a sanity check on this one, so I installed the last public release, TWGS10300, and tried to reproduce this bug. That version has been out since 2004.

After flying around manually from sector to sector long enough to wrap the 256 byte input buffer, I locked it up as expected. Here's a screen cap.

Image

I'm surprised if nobody has run across this bug. I think it's likely many people have, but never saw a pattern or could reproduce it. It's an elusive bug. I was lucky to spot it myself.


Good catch John! I think I've seen this before but just assumed it was pilot error. :)

Author:  John Pritchett [ Fri Sep 17, 2010 2:43 pm ]
Post subject:  Re: Question about a bug

While researching this bug, I discovered another "abort display" related bug. When set to "all keys", if you enter a remote sector and press ENTER, TW will interpret that ENTER as an abort key and you won't see the warp path route, just the prompt to make the move. In general, this is true of any entry that is ended with an ENTER. Any display immediately following that entry will be aborted by the ENTER. If fixed, the expected output will display unless a second ENTER or any key is pressed to abort the display.

My question is, will fixing this bug effect script and helper behavior?

Author:  Maniac [ Fri Sep 17, 2010 8:07 pm ]
Post subject:  Re: Question about a bug

John Pritchett wrote:
While researching this bug, I discovered another "abort display" related bug. When set to "all keys", if you enter a remote sector and press ENTER, TW will interpret that ENTER as an abort key and you won't see the warp path route, just the prompt to make the move. In general, this is true of any entry that is ended with an ENTER. Any display immediately following that entry will be aborted by the ENTER. If fixed, the expected output will display unless a second ENTER or any key is pressed to abort the display.

My question is, will fixing this bug effect script and helper behavior?


Is this anyway related to the "desired" * behavior of sectors under X amount of digits/or less than X do not require an enter?
I can't remember the details but I am sure others know of this "desired"* behavior.


* I will be nice tonight but this desired behavior has been around like forever.... well with the bug fixes we get from you it might just be from before the
last release, but the time frame is the same ..... forever.

Author:  Helix [ Fri Sep 17, 2010 9:23 pm ]
Post subject:  Re: Question about a bug

John Pritchett wrote:
While researching this bug, I discovered another "abort display" related bug. When set to "all keys", if you enter a remote sector and press ENTER, TW will interpret that ENTER as an abort key and you won't see the warp path route, just the prompt to make the move. In general, this is true of any entry that is ended with an ENTER. Any display immediately following that entry will be aborted by the ENTER. If fixed, the expected output will display unless a second ENTER or any key is pressed to abort the display.

My question is, will fixing this bug effect script and helper behavior?


John, when it is a bug, just fix it, IMO. The game and the players will evolve.

H

Author:  Parrothead [ Fri Sep 17, 2010 9:42 pm ]
Post subject:  Re: Question about a bug

All Keys includes "enter"

Other than pack 2 scripts very few use this function as we scripters prefer to add spaces directly in the macro to avoid switching back and forth. Change or not it will have little effect outside of pack 2 scripts which are easily fixed if needed

Author:  John Pritchett [ Sat Sep 18, 2010 3:41 am ]
Post subject:  Re: Question about a bug

The "desired" behavior of not requiring return after unambiguous sector numbers, which was designed behavior, not a bug, is now optional. There has always been mixed feedback on that, and it isn't used for games with > 5K sectors at all anyway. So now there's a setting under personal settings that allows you to turn that "smart" auto-return to off so you have to press enter after ANY sector number, for those who prefer that.

And yes, pretty much any bug in the game has been in there "forever". However, this bug has been in there since about 1997, which makes it as old as it can get without being a carry-over from Gary's original code.

Author:  Cruncher [ Sat Sep 18, 2010 9:49 am ]
Post subject:  Re: Question about a bug

John Pritchett wrote:
The "desired" behavior of not requiring return after unambiguous sector numbers, which was designed behavior, not a bug, is now optional. There has always been mixed feedback on that, and it isn't used for games with > 5K sectors at all anyway. So now there's a setting under personal settings that allows you to turn that "smart" auto-return to off so you have to press enter after ANY sector number, for those who prefer that.

And yes, pretty much any bug in the game has been in there "forever". However, this bug has been in there since about 1997, which makes it as old as it can get without being a carry-over from Gary's original code.


I've been playing HVS MBBS TW recently and that "behavior" is there in the 5k universe. Sectors 1 - 500 require an enter after but sectors 501 - 5000 do not.

Author:  Singularity [ Sat Sep 18, 2010 10:10 am ]
Post subject:  Re: Question about a bug

Auto-complete.

Not sure why it's a big deal. You can just hit "M" before it and
the problem goes away. All of my scripts do that, I'd imagine
most do.

Author:  John Pritchett [ Sat Sep 18, 2010 12:01 pm ]
Post subject:  Re: Question about a bug

It's not a big deal, just some people have said they don't care for it so it's now an option.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/