Page 1 of 2

Notepad locks up hard with RAMIGA-V

Posted: Mon Nov 28, 2011 10:14 am
by Raziel
AmigaOS4.1 upd 3
AmigaOneXE 512MB RAM
Radeon9200 127MB

Some Info:
I'm not sure if this is already in the tracker but just today i found an easy way to reproduce this lockup
It was bugging me for a long time now and iirc was already present in at least upd 1 (i could be wrong about this, though, so please, don't stone me) :-)

Steps:

*** Be careful, i mean it, i have SFS and JXFS on my partitions and sometimes they kick in after that happened and after a reboot to repair what seems to be a write error (Nothing bad had happened until now, though, they were always able to fix them) ***


1) Please take precautions, i don't want you to loose data!!!

2) Use this (zip file which holds a "HOSTS" file ~614KB in size)
*** I don't know if some of the chars in this file cause that behaviour or it's sheer size ***
What i can say is, that with this file i can reproduce that behaviour EVERY single time!
(I have to add that it also happened with other files in the past, but i was not able to reproduce back then)


3) Open "HOSTS" in whatever you like (i tried OWB[-MUI], Multiview, MEmacs and of course Notepad)
4) Use "Mark all" or something like that and do a RAMIGA-C to copy it to clipboard
*** It doesn't matter from which program you copy it to the clipboard, it will lock on the paste command ***

5) Open Notepad and RAMIGA-V --> complete system freeze!
It is ONLY Notepad that will crash hard or at least lock up.
I tried AmigaWriter, MEmacs, AmigaShell and even this text input field here on this website...all work as expected.

edit: RAMIGA changes (stupid me)

Re: [BUG] Notepad locks up hard with CTRL-V

Posted: Mon Nov 28, 2011 3:48 pm
by salass00
@Raziel

Are you sure that shouldn't be RAMIGA-C and RAMIGA-V instead of CTRL-C and CTRL-V?

Re: [BUG] Notepad locks up hard with CTRL-V

Posted: Mon Nov 28, 2011 5:40 pm
by Raziel
salass00 wrote:@Raziel

Are you sure that shouldn't be RAMIGA-C and RAMIGA-V instead of CTRL-C and CTRL-V?
Oi :-/

Of course...changed the post accordingly

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Tue Nov 29, 2011 6:07 pm
by xenic
I can confirm this bug. The problem also occurs if you use the paste button. Occasionally the paste (RAmiga-V) appears to work but eventually the system or NotePad freezes. I think it has to something to do with the size or the number of lines because when I copy half of the text and paste it info NotePad it seems to work.

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Wed Nov 30, 2011 11:57 am
by tonyw
Have you tried copying/pasting the other half of the file? It might be just some data string in a part of the file that makes the app fall over.

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Wed Nov 30, 2011 1:07 pm
by Raziel
tonyw wrote:Have you tried copying/pasting the other half of the file? It might be just some data string in a part of the file that makes the app fall over.
Hi tonyw

thanks for answering

Yes, i just tried with different sizes and portions of the file and i got three behaviours.

1) If the size of the file is ~145Kb or 4250 lines it does what it should, nothing happens
2) If the size of the file is ~153KB or 4500 lines it still does what it should BUT ... and that's a very big BUT
i get an error requester with
USB UHCI Error
There are unresolveable problems with the UHCI Controller
which may or may not (but most times it will) take down my USB mouse/keyboard and leave me no choice as to reboot
3) If the size of the file is ~162KB or 4750 lines it will instantly lock up

Another thing i tried was to paste the working 4250 lines to notepad and after that paste the same 4250 in the same Notepad window and it bombed right away, so my conclusion is that Notepad suffers a buffer overflow either in it's stack (which i don't really think as i believe it already has a stack cookie?) or in the history/drag bar/line counter/whatever magic the devs put in there... :-)

There, your turn :-D

note: i don't really know what i'm talking about, i just like to hear myself ;-)

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Wed Nov 30, 2011 5:31 pm
by xenic
@Raziel
In an effort to determine if the problem is related to something in your test file or is just an issue of size, I created several large text files by joining my SYS:Documentation/Workbench-ARexx.doc file to itself several times. I ended up with 3 test files; with sizes of 157775 bytes, 210340 byes and 315510 bytes. Pasting the contents of the 315,501 byte file into NotePad procuced a system freeze. However, pasting the 210,340 byte file into NotePad succeeded but my system memory dropped to 2MB from 840MB. When I attempted to open another application on it's own screen after the 210,340 byte paste into NotePad, I got an "Out of memory" requester and the application failed to open.

Based on my testing, I've concluded that the problem is not the contents of your test file but is a memory allocation issue that needs to be entered in the bug tracker and fixed before the next update. I'm testing on a SAM Flex 800 with 1MB memory running OS4.1u3.

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Wed Nov 30, 2011 9:57 pm
by Raziel
Thanks for the tests, xenic.

That would mean a dramatic drop of memory has caused my USB to fail...intruiging.

...waiting for a dev to step in :-D

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Wed Dec 07, 2011 6:21 pm
by Raziel
@xenic

After recreating my SWAP partition (hopefully sane this time) i now get the exact same behaviour as you.
(The "Unsolvable problems with the UHCI controller" are gone in this case!)

Re: [BUG] Notepad locks up hard with RAMIGA-V

Posted: Thu Dec 08, 2011 11:19 am
by Deniil
So Notepad has a bug causing it to eat all memory when pasting large stuff, and the swap system in update 3 is broken causing the instant freeze.