bugGNU Octave - Bugs: bug #59495, Entering certain glyphs might...

 
 

bug #59495: Entering certain glyphs might leave the GUI command window irresponsive

Submitter:  Jeremias Söll <jerry>
Submitted:  Fri 20 Nov 2020 04:43:56 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Jeremy Open/Closed:  * Closed
Release:  * other Operating System:  * Microsoft Windows
Fixed Release:  8.1.0 Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 12 Apr 2023 09:32:20 PM UTC, comment #17: 

Closing as fixed.

Rik <rik5>
Group administrator
Tue 29 Nov 2022 06:57:20 PM UTC, comment #16: 

okay, that makes sense. So despite that message issue, I can't recreate the command window becoming irresponsive.  Suggests that  this particular aspect of non-ascii character bug may be fixed.

Nicholas Jankowski <nrjank>
Group Member
Tue 29 Nov 2022 06:28:49 PM UTC, comment #15: 

Try to assign those characters to a string and convert it to double. E.g., for Alt+0226:

>> a='â'
a = â
>> double(a)
ans =

   195   162

>>


It looks like the parser stops at the first byte that it doesn't understand. It might be easier for a user to understand if it displayed the entire UTF-8 byte sequence of the complete code point.

Markus Mützel <mmuetzel>
Group administrator
Tue 29 Nov 2022 06:22:11 PM UTC, comment #14: 

also, I'm not certain how the invalid character information is being generated.

entering some test characters directly in the console using ALT-### # on the numeric keypad (all of which cause the irresponsive command window in v7.3.0):

ALT-0176

>> °
error: parse error:

  invalid character '' (ASCII 194)

>>> °
    ^


ALT-0150 (noting that this still causes errors in bug #56244)

>> –
error: parse error:

  invalid character '' (ASCII 226)

>>> –
    ^


ALT-0226

>> â
error: parse error:

  invalid character '' (ASCII 195)

>>> â
    ^


Nicholas Jankowski <nrjank>
Group Member
Tue 29 Nov 2022 06:10:13 PM UTC, comment #13: 

(all windows 10)

pulling something from a recent copy/paste error:

틣‡>> numel(2.^(0:10))


if I copy/paste that into Octave 7.3.0, the prompt goes non-responsive, but octave doesn't crash.

on an exit/reload, I see the text displayed in the Command history.  if I double click that command history item, i get:


>> \355\213\243\357\277\202\357\277\275>> numel(2.^(0:10))

error: parse error:

  invalid character '' (ASCII 237)

>>> 틣틣ᅡ�>> numel(2.^(0:10))
    ^


after which the Octave prompt continues to behave as normal.

Attempting the same in GNU Octave Version: 8.0.1 (hg id: 017ec2d748f7):

the characters paste in as expected. on hitting <enter> i get:

>> 틣틣ᅡ>> numel(2.^(0:10))
error: parse error:

  invalid character '' (ASCII 237)

>>> 틣틣ᅡ>> numel(2.^(0:10))
    ^


and the octave prompt remains responsive.

selecting the last command from the command history gives:


>> 틣틣ᅡ�>> numel(2.^(0:10))

error: parse error:

  invalid character '' (ASCII 237)

>>> 틣틣ᅡ�>> numel(2.^(0:10))
    ^


Nicholas Jankowski <nrjank>
Group Member
Tue 29 Nov 2022 11:26:23 AM UTC, comment #12: 

Could anyone affected by this bug please check if it still occurs with a recent nightly build of Octave from the mxe-default category:
https://buildbot.octave.space/#/download

In particular, it would be interesting to hear if the arrow keys are still working to access the history (in the GUI and in the CLI). Additionally, does entering non-ASCII characters in the command window widget of the GUI work correctly? Does it still crash the Windows console (i.e., freeze the command window)?

Markus Mützel <mmuetzel>
Group administrator
Fri 12 Nov 2021 04:01:39 PM UTC, comment #11: 

possibly related, another discourse conversation mentioned being able to repeatably  cause octave gui to crash by pasting certain glyphs: https://octave.discourse.group/t/start-release-process-for-octave-6-4-0/1652/44

and it was recenently mentioned as a side note in bug #61461, comment #2: "The GUI is quite vulnerable against pasting test into the command window, copying test into it can crash Octave.
Since I work with Octave 6.4 for MS Windows I observed at least 10 crashes."

Is this the same bug? thoughts on why the result escalated from 'freeze' to 'crash' in recent versions of Octave?  or is this something new?

Nicholas Jankowski <nrjank>
Group Member
Wed 17 Mar 2021 08:05:44 AM UTC, comment #10: 

See also this thread on the discourse forum that is discribes an error that is probably caused by the same bug:
https://octave.discourse.group/t/command-window-freezing-by-matrices/770

Markus Mützel <mmuetzel>
Group administrator
Sun 22 Nov 2020 10:19:58 AM UTC, comment #9: 

I am not exactly certain if this is the same error that Jeremias is seeing. But to reproduce a similar error for me, it is enough to try to enter some glyphs (that are not part of the current locale).
E.g. set the keyboard layout of a German keyboard to "T2" (e.g. [1]) and try to enter "⸳" (AltGr+ö, Space).
This leads to the command window being irresponsive to any further input.
"conhost.exe" crashes with the following stack:

conhost.exe caused an Unknown [0xC0000409] Exception at location 00007FFF48CDB65C in module KERNELBASE.dll.

AddrPC           Params
00007FFF48CDB65C 0000000000000000 00007FFF48CDB500 0000000000000000  KERNELBASE.dll!RaiseFailFastException
00007FF7AA713CE5 000000677397DF00 0000016FC4CAEEB0 00007FF7AA77C2BE  conhost.exe!wil::details::WilDynamicLoadRaiseFailFastException
00007FF7AA713DB0 00007FF7AA77C2BE 0000000000000001 00007FF7AA79CDC0  conhost.exe!wil::details::WilRaiseFailFastException
00007FF7AA713D8F 00007FF7AA725D7C 0000000000000003 000000677397F769  conhost.exe!wil::details::WilFailFast
00007FF7AA6ECF01 0000000000000001 00007FF7AA6F0000 0000000000000010  conhost.exe!wil::details::ReportFailure
00007FF7AA6ECE20 0000000000000000 0000016FC4D81A00 000000677397F630  conhost.exe!wil::details::ReportFailure_Hr
00007FF7AA71606C 0000000000000000 0000016FC4CAEEB0 0000000000000001  conhost.exe!wil::details::in1diag3::_FailFast_Unexpected
00007FF7AA70D1AE 0000016FC4CAEEB0 000000677397F630 0000000000000001  conhost.exe!_DoGetConsoleInput
00007FF7AA725D7C 0000000000000000 000000677397F769 0000000000000000  conhost.exe!ApiRoutines::ReadConsoleInputAImpl
00007FF7AA6EE07D 0000016FC4B80000 000000677397F830 000000677397F830  conhost.exe!ApiDispatchers::ServerGetConsoleInput
00007FF7AA6F8B0F 000000677397F830 000000677397F830 0000000000000000  conhost.exe!ApiSorter::ConsoleDispatchRequest
00007FF7AA6EA646 0000000000000000 0000000000000000 0000000000000000  conhost.exe!ConsoleIoThread
00007FFF4A147034 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FFF4B4DCEC1 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart


I am not sure if this is a bug in conhost.exe (component of Windows) or something Octave is doing wrong using it. (Quite probably the latter.)

[1]: https://www.europatastatur.de/

Markus Mützel <mmuetzel>
Group administrator
Sat 21 Nov 2020 12:21:07 AM UTC, comment #8: 

The .ofig you uploaded looks right to me.  The x-axis has limits from [0, 5] and the y-axis from [0,40].  The color of the line is blue.

Can this bug report be closed?

Rik <rik5>
Group administrator
Fri 20 Nov 2020 06:49:42 PM UTC, comment #7: 

EDITOR:

clear
a = 3;
v0 = 50/3.6;
t = [1 2 3];
v = v0 +a*t
t = 0:0.1:5;
v = v0 + a*t;
plot(t, v, 'b')
axis([0 5 0 40])
grid on
xlabel('t in s')
ylabel('v in m/s')






COMMAND WINDOW:

>> cd ..
>> pwd

ans = C:\Users\Jerry

>> cd Desktop/
>> pwd

ans = C:\Users\Jerry\Desktop

>> edit Tempus_times_velocitas.m
>> t

t =

 Columns 1 through 8:

    0.00000    0.10000    0.20000    0.30000    0.40000    0.50000    0.60000    0.70000

 Columns 9 through 16:

    0.80000    0.90000    1.00000    1.10000    1.20000    1.30000    1.40000    1.50000

 Columns 17 through 24:

    1.60000    1.70000    1.80000    1.90000    2.00000    2.10000    2.20000    2.30000

 Columns 25 through 32:

    2.40000    2.50000    2.60000    2.70000    2.80000    2.90000    3.00000    3.10000

 Columns 33 through 40:

    3.20000    3.30000    3.40000    3.50000    3.60000    3.70000    3.80000    3.90000

 Columns 41 through 48:

    4.00000    4.10000    4.20000    4.30000    4.40000    4.50000    4.60000    4.70000

 Columns 49 through 51:

    4.80000    4.90000    5.00000

>> v

v =

 Columns 1 through 9:

    13.889    14.189    14.489    14.789    15.089    15.389    15.689    15.989    16.289

 Columns 10 through 18:

    16.589    16.889    17.189    17.489    17.789    18.089    18.389    18.689    18.989

 Columns 19 through 27:

    19.289    19.589    19.889    20.189    20.489    20.789    21.089    21.389    21.689

 Columns 28 through 36:

    21.989    22.289    22.589    22.889    23.189    23.489    23.789    24.089    24.389

 Columns 37 through 45:

    24.689    24.989    25.289    25.589    25.889    26.189    26.489    26.789    27.089

 Columns 46 through 51:

    27.389    27.689    27.989    28.289    28.589    28.889

>> Tempus_times_velocitas

v =

   16.889   19.889   22.889

Jeremias Söll <jerry>
Fri 20 Nov 2020 06:40:08 PM UTC, comment #6: 

Thanks for your instrunction, now i can do some edits on octave. I´m very happy to have you.

Jeremias Söll <jerry>
Fri 20 Nov 2020 06:09:19 PM UTC, comment #5: 

Try putting all the commands in an m-file and executing the m-file as Doug suggested.

This doesn't seem to be an issue with the axis function, but rather an issue (maybe) with the terminal and entering commands.

If the m-file works then I think the next step is to try opening the command-line version of Octave rather than the GUI and checking whether your example works there.

Rik <rik5>
Group administrator
Fri 20 Nov 2020 06:07:45 PM UTC, comment #4: 

I suppose you are using a keyboard with German (or a different non-English) layout.
If so, you have to stay clear of the Umlaut keys while the command window has focus.

It is a known issue that the command window on Windows works only for input of ASCII characters. Other characters can cause strange results (including crashing the conhost process that runs in the background).
Re-implementing the command window is on the wishlist for some time now. Unfortunately, it will be a big undertaking to get that done.

For the time being, the best advice I can give is: try to avoid typing keys that would enter non-ASCII characters.

The built-in editor is also fine. So, you could also use script files to avoid the risk of crashing the command window...

Markus Mützel <mmuetzel>
Group administrator
Fri 20 Nov 2020 05:25:34 PM UTC, comment #3: 

Try doing it in an M file.

Doug Stewart <dastew>
Fri 20 Nov 2020 05:12:46 PM UTC, comment #2: 

I have the version 5.2.0.0
I installed it as it was recommendet.
I do not have a M file.

Jeremias Söll <jerry>
Fri 20 Nov 2020 05:05:44 PM UTC, comment #1: 

It all works for me.
Tell us more!
what version of octave, and how did you install it.
If you put all your commands in an M file, does it work then?

Doug Stewart <dastew>
Fri 20 Nov 2020 04:43:56 PM UTC, original submission:  

The line i wrote is:

Command Window:
....>> a = 3;
....>> v0 = 50/3.6;
....>> t = [1 2 3]
t =
       1        2        3
....>> v = v0 + a*t
v =
       16.8889      19.8889      22.8889

Until there, everything seems allright, not?

Command Window:
....>> t = 0:.1:5;
....>> v = v0 + a*t;
....>> plot(t, v, 'b')
....>> axis ([0 5 0 40] ... up here the programm won´t let me figure in that last symbol ")" and i can´t go anywhere. Even if i press the "Enter-Button" nothing happens. In the background, there is a window with that graf that i described. What can i do? Maybe it is not comfortable for octave, because it´s used in matlab. how can i use it without matlab? i have to wait minimum one year to go to university for a cheap license. Can you help me to come forward? Thank you for your effort. Jias

Jeremias Söll <jerry>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #50310:  Tempos@times@velocitas.ofig added by jerry (26KiB - application/octet-stream)

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by jerry (Submitted the item)
  • -email is unavailable- added by jerry (thanks for your effort)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-12 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 8.1.0
    2022-11-29 rik5 Carbon-CopyRemoved 72865 -
    2022-11-29 mmuetzel StatusNeed Info Ready For Test
    2022-06-03 nrjank Dependencies- bugs #62573 is dependent
    2021-08-04 mmuetzel Dependencies- bugs #61006 is dependent
    2021-06-05 mmuetzel Dependencies- bugs #60732 is dependent
    2021-03-17 mmuetzel Dependencies- bugs #60247 is dependent
    2020-11-22 mmuetzel Summaryaxis([0 5 0 40]) Entering certain glyphs might leave the GUI command window irresponsive
    2020-11-20 jerry Attached File- Added Tempos@times@velocitas.ofig, #50310
    2020-11-20 rik5 Item GroupMatlab Compatibility Other
        StatusNone Need Info
    2020-11-20 jerry Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code