bugGNU Octave - Bugs: bug #60406, copyfile() fails with "Cannot...

 
 

bug #60406: copyfile() fails with "Cannot perform a cyclic copy" with octave-cli.exe under Windows

Submitter:  None
Submitted:  Sat 17 Apr 2021 03:25:24 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Horshack 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
   

Sun 18 Apr 2021 06:59:52 PM UTC, comment #3: 

Thank you for reporting back.

Closing report.

Markus Mützel <mmuetzel>
Group administrator
Sun 18 Apr 2021 12:21:56 PM UTC, comment #2: 

comment #1:

> IIUC, `octave-cli.exe` shouldn't be run directly unless you make sure that the necessary environment variables are set globally.
>
> Instead you should start the CLI either with the `octave.vbs` in OCTAVE_HOME or with `octave.bat` in the bin directory. Either of those will set the necessary environment variables.
>
> Does the error still occur in that case?
>

Thanks for the quick reply. I was completely unaware octave.bat was required to launch the cli (or alternately, that it required environmental variables to be set). Completely user error on my part - I apologize. When using octave.bat the copyfile() error disappears. It also fixes the hang I was experiencing when running copyfile() inside a larger script. Thanks again for your help.

Horshack <horshack>
Sun 18 Apr 2021 11:40:00 AM UTC, comment #1: 

IIUC, `octave-cli.exe` shouldn't be run directly unless you make sure that the necessary environment variables are set globally.

Instead you should start the CLI either with the `octave.vbs` in OCTAVE_HOME or with `octave.bat` in the bin directory. Either of those will set the necessary environment variables.

Does the error still occur in that case?

Markus Mützel <mmuetzel>
Group administrator
Sat 17 Apr 2021 03:25:24 PM UTC, original submission:  

Every copyfile() fails under Windows 10 when executed using octave-cli.exe. The error reported is "Cannot perform a cyclic copy". The same function call succeeds when performed in a command window in the Octave GUI.

Here are the various methods tried:

octave-cli.exe --eval "copyfile('t1.txt', 't2.txt')"

octave-cli.exe testcopy.m, where testcopy.m contains:
copyfile('t1.txt', 't2.txt');

Running octave-cli.exe in interactive mode and typing:
copyfile('t1.txt', 't2.txt')

An original issue was discovered in a larger script where the copyfile() call actually hangs the script but only when executed via octave-cli.exe - it runs fine in the GUI. That script is too large and involved to reference for recreation in this bug report but hopefully the underlying issue is the same as what causes the error message.

Configuration:
Windows 10 Version 1909
Octave 6.2.0 64-bit
Executable: "c:\Program Files\GNU Octave\Octave-6.2.0\mingw64\bin\octave-cli.exe"

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 horshack (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-18 mmuetzel StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2021-04-18 mmuetzel StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code