bugGNU Octave - Bugs: bug #60781, Possible interpreter problems on...

 
 

bug #60781: Possible interpreter problems on MS Windows

Submitter:  None
Submitted:  Tue 15 Jun 2021 03:15:57 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Works For Me Assigned to:  None
Originator Name:  Konrad Wöllhaf Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 6.2.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 18 Jun 2021 09:40:04 AM UTC, comment #6: 

[Email by Konrad Wöllhaf:]

> Hello all,
>
> Thank you all very much for your efforts! As I wrote in the forum, I could not reproduce the problem later. However, the error was reproducible before and my colleague who came to me about the problem spent several days looking for errors. It is extremely strange but I wanted to let you know that I did not report the error lightly.
>
> Best Regards!
> Konrad


No need to apologize 😉  All Octave maintainers are happy to make the software better and to help users with problems.  If you face any issues, please always feel encouraged to report them.

Kai Torben Ohlhus <siko1056>
Group Member
Thu 17 Jun 2021 02:27:37 AM UTC, comment #5: 

Using both attached files (file #51568, file #51569), which are identical, I could also not observe severe interpreter problems (MS Windows 10 Home 21H1, Octave 6.2.0, official release):


>> DemoError1
error: parse error near line 6 of file C:\Users\siko1056\Downloads\DemoError1.m

  syntax error

>>> function [y]=snow(x)
           ^
>> 1+1
ans = 2
>> snow(1)
error: 'snow' undefined near line 1, column 1
>> DemoError1
error: parse error near line 6 of file C:\Users\siko1056\Downloads\DemoError1.m

  syntax error

>>> function [y]=snow(x)
           ^
>> DemoError1
error: parse error near line 6 of file C:\Users\siko1056\Downloads\DemoError1.m

  syntax error

>>> function [y]=snow(x)
           ^
>> DemoError1
error: parse error near line 6 of file C:\Users\siko1056\Downloads\DemoError1.m

  syntax error

>>> function [y]=snow(x)
           ^
>> DemoError2
error: parse error near line 6 of file C:\Users\siko1056\Downloads\DemoError2.m

  syntax error

>>> function [y]=snow(x)
           ^
>> 1+1
ans = 2
>>


Does the problem occur in a "freshly started" Octave session, like in my case?

Kai Torben Ohlhus <siko1056>
Group Member
Wed 16 Jun 2021 08:31:43 PM UTC, comment #4: 

Likewise, I find that the Octave interpreter correctly identifies the line where it gets confused (line 6) and that there are no persistent effects.  I tested with both 6.2.0 and the development branch.  My PC runs Linux so I suppose it is possible that there is some error that only occurs on MS Windows.

Can you run the file 'DemoError1' just as it was done in comment #3 and then copy and paste the results from the Command Window?

Rik <rik5>
Group administrator
Wed 16 Jun 2021 06:59:40 PM UTC, comment #3: 

@woellhaf: Can you show a typical Octave session including the "strange" and non deterministic error messages you get. Here is what I get if I run your test script twice:


octave:1> ls
DemoError1.m
octave:2> DemoError1
error: parse error near line 6 of file /tmp/mozilla_pantxo0/DemoError1.m

  syntax error

>>> function [y]=snow(x)
           ^
octave:3>
octave:3> DemoError1
error: parse error near line 6 of file /tmp/mozilla_pantxo0/DemoError1.m

  syntax error

>>> function [y]=snow(x)
           ^
octave:4>


I admit that the error message is not very helpful to determine the origin of the error -ideally something like "unclosed parents were found" would help- but at least it shows the line where the parser gets confused, and it is predictable for me. This is on linux.

Pantxo Diribarne <pantxo>
Group Member
Wed 16 Jun 2021 09:08:56 AM UTC, comment #2: 

Sorry I am new in that forum and seems I don't know how to use it.I got an Email and I wanted to answer in the diskussion and upload the file. So I try to answer here:
The Code I did sent was inside an m-File. I the code is called a strange error message comes and afterwards I can't call any other m-File.
If I call the same code today it shows another error-message and it show different behavior. I really have some experience with computers (working with Matlab since 1988) and I am confused now.

(file #51569)

Konrad Wöllhaf <woellhaf>
Wed 16 Jun 2021 01:23:41 AM UTC, comment #1: 

Octave gives syntax errors as expected and there are no persistent effects from the code. Are you getting something different? If so, please post it.

Also indicate whether this is executed at the prompt or as a script. If as a script foo.m, are you typing foo at the Octave prompt or are you calling it with "octave foo.m"?


$ octave -qf
octave:1> A=[
> 1,
> 2,
> 3
>
> function [y]=snow(x)
error: parse error:

  syntax error

>>> function [y]=snow(x)
           ^
octave:1> y=2*x;
error: 'x' undefined near line 1, column 1
octave:2> end
error: parse error:

  syntax error

>>> end
      ^
octave:2>
octave:2> b=snow(5);
error: 'snow' undefined near line 1, column 1
octave:3>


Anonymous
Tue 15 Jun 2021 03:15:57 PM UTC, original submission:  

Hallo,

a friend used octave and he did spend many hours because of a strange error in a complex program. At the end we found out, that only a closing bracket is missing. But this should be recognized by the syntax check. After runing the script "DemoError.m" octave does not work with any other program. It always gives a syntax-error.


A=[
1,
2,
3

function [y]=snow(x)
y=2*x;
end

b=snow(5);


Please let me know about the result.

Best Regards!
Konrad Wöllhaf



Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51569:  DemoError1.m added by woellhaf (65B - text/plain - The File with the error)
file #51568:  DemoError1.m added by woellhaf (65B - text/plain - Here you see the error-file. )

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by woellhaf (Updated the item)
  • -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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-06-18 siko1056 Open/ClosedOpen Closed
    2021-06-16 rik5 SummaryStrange Error that should not happen! Possible interpreter problems on MS Windows
    2021-06-16 pantxo StatusNone Works For Me
    2021-06-16 woellhaf Attached File- Added DemoError1.m, #51569
    2021-06-16 woellhaf Attached File- Added DemoError1.m, #51568

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code