bugGNU Octave - Bugs: bug #45921, Traditional mode hangs/errors when...

 
 

bug #45921: Traditional mode hangs/errors when interpreting m-file from bash

Submitter:  None
Submitted:  Thu 10 Sep 2015 11:55:59 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  3 - Low Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Timothy Rice Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 11 Sep 2015 11:40:21 AM UTC, comment #4: 

This is now fixed on the stable branch, the fix will be part of the next Octave 4.0 bugfix release.

http://hg.savannah.gnu.org/hgweb/octave/rev/779c1d85cf90

Mike Miller <mtmiller>
Group Member
Fri 11 Sep 2015 02:19:10 AM UTC, comment #3: 

Hi Mike,

Ah, I see, it was the lack of prompt that had me thinking it was hung. Thanks for clarifying :)

Anonymous
Fri 11 Sep 2015 02:10:20 AM UTC, comment #2: 

Hi, thanks for the bug report. This is mostly expected behavior, the only bug here is that the prompt is not displayed in this mode, which can be easily fixed.

Note that --traditional forces the interpreter to stay around after executing a script, because that is the behavior of Matlab when executing an m-file. So it should behave similarly to the --persist option, just needs a minor fix to resolve the crash you are seeing and show the prompt.

Mike Miller <mtmiller>
Group Member
Fri 11 Sep 2015 12:14:13 AM UTC, comment #1: 

I see the same on Ubuntu 14.04

I also tried  cntl d and it stopped normally  -- no error message.

Doug Stewart <dastew>
Thu 10 Sep 2015 11:55:59 PM UTC, original submission:  

Hello,

I am using Octave to interpret the following script (b/w but not including the tilde-fences):

~~~
A = [1 0 1 1 0;
    1 1 1 0 0;
    0 1 1 1 1;
    1 1 0 0 1];

x = [1 0 1 1 0]';

mod(A*x, 2)
~~~

When I don't use the "--traditional" option it gives the correct output and then exits without error.

When I do use the "--traditional" option, it gives correct output but then hangs. When I try to kill it with Control-C nothing happens until I press the Enter key. After I press the Enter key, the following message is printed to stderr:

~~~
error: fatal flex scanner internal error--end of buffer missed
fatal flex scanner internal error--end of buffer missed
panic: Segmentation fault -- stopping myself...
~~~

When I run "$ octave --traditional" without specifying a script to run, it behaves correctly: this problem only occurs when I specify a script using something like "$ octave --traditional ./script.m"

I suspect this might actually be two bugs in one: --traditional has problems interpreting scripts, and the flex parser has problems understanding Control-C.

The operating system is Arch Linux.

Please let me know if you require any more information or if there is any other way I can assist in solving this problem.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34855:  script.m added by None (95B - text/x-objcsrc - M-file; wrapper script for running octave on m-file from bash; output from running script with --traditional turned on.)
file #34856:  output added by None (217B - application/octet-stream - M-file; wrapper script for running octave on m-file from bash; output from running script with --traditional turned on.)
file #34857:  run.sh added by None (63B - application/x-shellscript - M-file; wrapper script for running octave on m-file from bash; output from running script with --traditional turned on.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-09-11 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-09-11 mtmiller Priority5 - Normal 3 - Low
        Item GroupNone Segfault, Bus Error, etc.
        StatusNone Confirmed
    2015-09-10 None Attached File- Added script.m, #34855
        Attached File- Added output, #34856
        Attached File- Added run.sh, #34857

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code