bugGNU Octave - Bugs: bug #65623, New Script Failing to Load - Only...

 
 

bug #65623: New Script Failing to Load - Only Workaround to Restart Octave

Submitter:  None
Submitted:  Mon 22 Apr 2024 03:42:45 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Need Info Assigned to:  None
Originator Name:  Rob Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 9.1.0
Release:  Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 08 Dec 2024 03:08:17 PM UTC, comment #13: 


>  The file show up immediately in the file browser. So Octave knows about.


yes, that describes the known problem behavior. Note that the file appearing in the file browser does not equate to another part of the program knowing that a change in available files has occurred.

Glad to hear the path(path()) workaround is still viable for now.

Nicholas Jankowski <nrjank>
Group Member
Sun 08 Dec 2024 10:28:18 AM UTC, comment #12: 

Hello Nicolas,

I did some more tests, strange behavior:

1) Start up Octave, change to C:\Users\roland\Documents and create a new file(s) I have NOT got the error. The new scripts have been accepted immediately.

2) Start up Octave, change to C:\Users\roland\Documents\PlatformIO\Projects\WebIO\Octave using the file browser history and creating a new file there.
This is a folder I had this issue recently each time creating a new .m file working on a larger project which is including octave code.

- The file show up immediately in the file browser. So Octave knows about.
- Press the run button (or F5, ...) I get the "undefined" error message

3) Entering path(path()) at the command line.
Afterwards the new file is recognized. Good to know about this workaround.

More strange observations
a) Creating a new file after starting up Octave, waiting for some minutes before trying to run that the file it is recognized on the first try.

b) Creating a new file after using path(path()) once the new files are all recognized immediately (at least for all the new ones I have created for testing so far).

All above look like might be related to the file change marks in Windows you mentioned.

... but since I used path(path()) at the moment even if I restart Octave and create new file(s) in C:\Users\roland\Documents\PlatformIO\Projects\WebIO\Octave they are found immediately!

I'll report more once I have the problem again.

Remark: In general the user interface of octave 9.2.0 is pretty slow compared version 8.4.0 I had installed before. Especially the file system browser responding very slow, e.g. scrolling down the list or selecting a file right clicking for "delete" or similar.

Roland <roland67>
Sun 08 Dec 2024 03:06:57 AM UTC, comment #11: 

@Roland:

does the

>> path(path())


suggestion below work in your case?  this has been a longstanding issue based on the way that windows inconsistently leaves file change marks in the filesystem in contrast to linux and other filesystems. The command above should force a recheck of all files in the path, including the local working directory.

Nicholas Jankowski <nrjank>
Group Member
Sat 07 Dec 2024 04:30:10 PM UTC, comment #10: 

Same problem for me (Windows 10, Octave 9.2.0)

If I create a new script or function m file (e.g. testNewScript.m) in editor and either

  • press run
  • press F5
  • call that script from command line


I get the error message

error: 'testNewScript' undefined near line 1, column 1

All ways to run the file show same result

The file resides in local folder and could be reopened from Octave's File Browser. But even if I change the folder and go back the new file is not recognised (I hoped the folder content will be rescanned).

The only solution to get the new file recognised is to quit and restart Octave.

Boring thing, I think I will switch back to previous (8.x) version where I never have seen that problem.

Roland <roland67>
Tue 14 May 2024 05:48:12 AM UTC, comment #9: 

When that error occurs, how did you try to run the new script? Did you type its name at the command prompt, use F5, click a toolbar button, ...?

Markus Mützel <mmuetzel>
Group administrator
Tue 14 May 2024 05:39:17 AM UTC, comment #8: 

The files are on a local drive, on my laptop. I just had the error happen again, and it happens right after working for a while in Octave, then attempting to save and call a new script. I am unable to call the new script. I've tried closing the script from the editor window and reopening it and that does not work either.  I tried 'path(path())' and that seemed to work for the time being. I will try to replicate that solution and see if it works more than once.

Robert Vannice <vannirob000>
Mon 13 May 2024 06:51:58 AM UTC, comment #7: 

I don't know if that is related:
Are the files with new functions stored on a local drive or on a network share?

Markus Mützel <mmuetzel>
Group administrator
Sat 11 May 2024 04:02:13 PM UTC, comment #6: 

Sorry forgot to mention that
'path(path())'

does clear this problem for at least the particular file (uncertain if it sticks until Octave is restarted since it is hard to reproduce the problem)


comment #5:

> Still happens with
> GNU Octave, version 9.1.90
>
> I cannot reproduce at will, just seems to happen occasionally.  Seems most repeatable if I work on something else for awhile and then try to create a new function that I have typed from scratch.  Really hard to tell though what is triggering it.
>
>
>

Ray Cross <ray_obr>
Sat 11 May 2024 03:46:38 PM UTC, comment #5: 

Still happens with
GNU Octave, version 9.1.90

I cannot reproduce at will, just seems to happen occasionally.  Seems most repeatable if I work on something else for awhile and then try to create a new function that I have typed from scratch.  Really hard to tell though what is triggering it.



Ray Cross <ray_obr>
Mon 06 May 2024 08:48:54 AM UTC, comment #4: 

A release candidate for Octave 9.2.0 has been published. See:
https://octave.discourse.group/t/release-candidate-for-octave-9-2-0-available/5579

Could you please check if you can still reproduce the issue with that release candidate?

Markus Mützel <mmuetzel>
Group administrator
Sun 05 May 2024 12:09:48 AM UTC, comment #3: 

I am not the original commenter but had the exact same symptoms and tried some of the same solutions that didn't work.

Yes

`path(path())`

does allow the file to work at a least until the next time Octave is restarted.

The problem is intermittent and hard to reproduce so I am not sure what induces the problem.


GNU Octave, version 9.1.0
Windows 11

Ray Cross <ray_obr>
Thu 02 May 2024 06:21:20 PM UTC, comment #2: 

Can original user test workaround suggested in comment #1?  Is this still an issue?

Rik <rik5>
Group administrator
Mon 22 Apr 2024 06:07:18 AM UTC, comment #1: 

That sounds eerily similar to bug #65548.

Does `path(path())` work around the issue when it occurs?
Does it still happen in a recent nightly build from nightly.octave.org?

Markus Mützel <mmuetzel>
Group administrator
Mon 22 Apr 2024 03:42:45 AM UTC, original submission:  

Sometimes, when I create a new script and save it in the current directory, then call it in the command window, it will state that the call for the script is undefined at line1 column1. This usually happens after already working in Octave and then creating and saving a new script in the working directory.

For troubleshooting, I have confirmed the file is in the load path, in current directory, and does not contain any spaces or prohibited characters, so there's no parsing errors. It's just failing to 'see' the file to load. I have tried different file names and it does not work. When the error does occur, it fails to load any new script and gives the error, "undefined at line1 column1".

I did some research and found this article (https://lists.gnu.org/archive/html/help-octave/2009-03/msg00212.html), but rehash, clear all, and clearing the script name I'm attempting to load do not work.

The only solution is to restart Octave, and then my call to the script works as it should.

As a workaround restarting Octave each time does work, but it's a minor inconvenience to have to restart Octave every time this happens.

Any guidance is much appreciated. 

System: Windows 10

GNU Octave, version 9.1.0

Any guidance is much appreciated.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by roland67 (Posted a comment)
  • -email is unavailable- added by vannirob000 (Posted a comment)
  • -email is unavailable- added by ray_obr (Posted a comment)
  • -email is unavailable- added by mmuetzel (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-05-14 rik5 Carbon-CopyRemoved 72865 -
    2024-05-02 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.15-ef91.
    Corresponding source code