bugGNU Octave - Bugs: bug #42586, bogus identifier error in GUI if...

 
 

bug #42586: bogus identifier error in GUI if comment string contains 'name'

Submitter:  Chris Mumby <chrismumby>
Submitted:  Thu 19 Jun 2014 11:14:30 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lostbard
Originator Name:  Chris Mumby Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 22 Jun 2014 08:36:33 PM UTC, comment #8: 

Closing bug report as fixed

John Donoghue <lostbard>
Group Member
Sun 22 Jun 2014 05:01:07 PM UTC, comment #7: 

John, your patch fixes the issue on my system.

Torsten Lilge <ttl>
Group Member
Sun 22 Jun 2014 11:24:20 AM UTC, comment #6: 
John Donoghue <lostbard>
Group Member
Sat 21 Jun 2014 08:38:48 PM UTC, comment #5: 

Attached patch checks for the name and then type.

(file #31589)

John Donoghue <lostbard>
Group Member
Fri 20 Jun 2014 11:55:14 AM UTC, comment #4: 

How about checking for "name" and then "type" keyword?

John Donoghue <lostbard>
Group Member
Thu 19 Jun 2014 09:10:08 PM UTC, comment #3: 

A double click should open the file in the editor but this file is detected as a data file.
Looks like the line 268 in load-save.cc


std::string tmp = extract_keyword (file, "name");


detects the keyword "name" in the comment of the file.

Torsten Lilge <ttl>
Group Member
Thu 19 Jun 2014 05:14:43 PM UTC, comment #2: 

It also does it 3.8.2rc1

John Donoghue <lostbard>
Group Member
Thu 19 Jun 2014 05:13:38 PM UTC, comment #1: 

Does the same for me - only when file is opened from the file browser pane of the GUI by double click, or from the LoadData context menu.
Using the Open/Open File menus work as expected.

John Donoghue <lostbard>
Group Member
Thu 19 Jun 2014 11:14:30 AM UTC, original submission:  

The GUI gives an 'error : load: bogus identifier ' or ' nameerror: load: bogus identifier' if the script it reads in contains a variable definition and then a comment after it with the 'name' word in it.

Simple example attached. The error doesn't happen if you type the same line into the command window. The command line version does not have the same problem.

Solution for my example was to expand 'name' to 'filename' in the comment.

Chris Mumby <chrismumby>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31589:  bug42586.patch added by lostbard (1KiB - text/x-patch)
file #31581:  script.m added by chrismumby (91B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by chrismumby (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-06-22 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-06-22 lostbard StatusPatch Submitted Ready For Test
    2014-06-21 lostbard Attached File- Added bug42586.patch, #31589
        StatusNone Patch Submitted
        Assigned toNone lostbard
        Release3.8.1 dev
        Operating SystemMicrosoft Windows Any
    2014-06-19 chrismumby Attached File- Added script.m, #31581

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code