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

 
 

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

Submitted by:  None
Submitted on:  Thu 10 Sep 2015 11:55:59 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 3 - LowItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Timothy RiceOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project Administrator
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>
Project Administrator
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 File(s):
   
   
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
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by dastew (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 Sep 2015 11:40:21 AM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 11 Sep 2015 02:10:19 AM UTCmtmillerPriority5 - Normal=>3 - Low
      Item GroupNone=>Segfault, Bus Error, etc.
      StatusNone=>Confirmed
    Thu 10 Sep 2015 11:55:59 PM UTCNoneAttached File-=>Added script.m, #34855
      Attached File-=>Added output, #34856
      Attached File-=>Added run.sh, #34857

    Back to the top


    Powered by Savane 3.1-cleanup1