Crash bug in console.device

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
Raziel
Posts: 1068
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Crash bug in console.device

Post by Raziel »

I have for years an annoying freeze/crash when working with shell/console.
Mostly when i'm scripting and switching back and fourth between the shell and an editor while testing the script inbetween.

I was finally able to reproduce the crash and it's actually pretty easy to do.

version Kickstart/console.device.kmod file full
console.device 53.105 (25.01.2017)
version cli full
shell 53.15 (11.11.2013)

Steps to reproduce (beware of crashing/freezing)

1) Open a shell
2) Inside the shell press RETURN as often as needed to let the history scroller (right side) appear and give it a few more presses
3) Drag the history scroller to the top
4) Click anywhere on the Workbench to deactivate the shell window
5) Click into the shell window to activate it again (history scroller still on top)
6) Now press CTRL-C
Nothing happens, of course, but
7) Press Return again and drag your system down (it will freeze, no Grim Reaper shows up)

I don't know what the reason for the crash is.
It might be the history scroller acting up, it might be the Return command issuing the console redraw and the skip back to the bottom (out-of-sight) active input line, it might even be the former CTRL-C...would be extremely interesting to know what is causing this.

As i said, i have this behaviour for years, but never could point my finger to what is causing it.
I was suspecting MouseBlanker, but that clearly was not the case, then i thought it might simply be the script that i was testing, but no.
Since i do a lot of CTRL-C to interrupt my scripts while testing it showed up today again...

Please keep me updated on this one and it would be great if anyone could confirm.

Thank you

P.S: The attachment is not packed, .txt is not allowed, so i simply renamed it to .zip
Attachments
Debug_Serial.zip
Crash log from serial, no GrimReaper
(21.46 KiB) Downloaded 11 times
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 201
Joined: Mon Aug 15, 2011 9:20 am
Location: Brisbane, QLD. Australia.

Re: Crash bug in console.device

Post by colinw »

Confirmed !!

It does it here too, thanks for that, I had some random lockups with a CLI program I was working on
recently, when I had to break it ^C, it was sometimes crashing, but I couldn't figure out why.
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1454
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Crash bug in console.device

Post by tonyw »

Well, bugger me!

Thanks for that, Raziel. What ever would we do without people like you to take the time to find how to reproduce it.

Should be fairly easy to fix, since it shouldn't be in that area of code at all.

(Time passes...)

OK, fixed it. When you clicked in the window, the console assumed you were going to click 'n' drag to select some text and set the Selected flag to remember it. Normally you would start by typing something, which would cancel the flag again. I fixed it by not setting the Selected flag until you actually start dragging (which is how it should have been all the time).

If you want a work-around before you receive an updated version, try this:

After you have clicked in the window to regain focus, try typing: a CR, space, anything - before you type the Ctrl/C to stop the scrolling.
cheers
tony
User avatar
Raziel
Posts: 1068
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Crash bug in console.device

Post by Raziel »

@colinw

/wipes sweat from forehead

Thank you for confirming...i was 50% sure i'd been chasing ghosts again :-)

@tonyw

Aww, too much credit, but thank you very much. :-D
And thank you for sharing the reasons for the crash, it's always nice to know why something does what it does (or what it shouldn't).

I'll try to remember the workaround (hopefully i can change my behaviour from roughly 7 years)

Ok, time to get MouseBlanker out of it's isolation...
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1629
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Crash bug in console.device

Post by nbache »

Thanks, Colin and Tony for reacting so quickly! I had just seen that I could recreate it yesterday, but didn't have time to do more, so was planning to make a proper research and BZ and response today. But I was too slow :-).

Well, at least I know how to beta test it when the fix is ready for beta (apart from the usual regression-type tests).

Best regards,

Niels
Post Reply