String.gadget bug when hitting Enter
Posted: Sat Jun 13, 2015 9:42 pm
Hi
For a long time (maybe earlier than update 6, can't remember exactly) I have seen a wierd bug with my text editor Annotate and its ReAction Find window's string gadget. I have teared my hair out trying to find what is wrong but could NOT find anything wrong with my code.
So today!! Today I saw the same bug in the normal system ASL file requester (writing a filename in AudioEvolution4).
The bug:
Write some text in a string gadget and press enter: "test"
Result (5-10%): From the gadget I get "textner crap from somewhere".
It seems that sometimes it fails to store a null-terminator but instead stores 'n' followed by some "Earlier crap from somewhere", often seemingly form the clipboard, or written in a string at some other point (the same string gadget?).
I have seen this quite regurlarly from Annotate and thought it was a bug there since it has a STRING_EditHook (in which I just cannot find anything wrong), but now I saw the exact same behavior in an ASL-requester. Does ASL use an EditHook as well? The bug does not appear when the edithook actually edits the string, only sometimes when it passes straight through.
This is probably a pretty simple bug if you just look at the code.
For a long time (maybe earlier than update 6, can't remember exactly) I have seen a wierd bug with my text editor Annotate and its ReAction Find window's string gadget. I have teared my hair out trying to find what is wrong but could NOT find anything wrong with my code.
So today!! Today I saw the same bug in the normal system ASL file requester (writing a filename in AudioEvolution4).
The bug:
Write some text in a string gadget and press enter: "test"
Result (5-10%): From the gadget I get "textner crap from somewhere".
It seems that sometimes it fails to store a null-terminator but instead stores 'n' followed by some "Earlier crap from somewhere", often seemingly form the clipboard, or written in a string at some other point (the same string gadget?).
I have seen this quite regurlarly from Annotate and thought it was a bug there since it has a STRING_EditHook (in which I just cannot find anything wrong), but now I saw the exact same behavior in an ASL-requester. Does ASL use an EditHook as well? The bug does not appear when the edithook actually edits the string, only sometimes when it passes straight through.
This is probably a pretty simple bug if you just look at the code.