bugGNU Octave - Bugs: bug #56471, Octave chanes the current...

 
 

bug #56471: Octave chanes the current directory after a program is activated.

Submitted by:  Deyan <dvd_video>
Submitted on:  Tue 11 Jun 2019 07:50:51 AM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Deyan Open/Closed:  Open
Release:  5.1.0 Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Mon 17 Jun 2019 05:00:41 PM UTC, comment #5: 

I pushed a possible fix for this problem as explained here:

https://savannah.gnu.org/bugs/index.php?41275#comment12

Please close this report if it fixes the problem reported here.

John W. Eaton <jwe>
Project Administrator
Mon 17 Jun 2019 04:05:25 PM UTC, comment #4: 

In your functions/player/fullPathMP3.m file, you have the line

  % Add "cd" to the "file.mp3"
  if(strcmp(slashstringn(path,lenp),path))
    path = strcat(cd,'\',path);
  end

and I would bet that is what is changing the directory because in Octave, cd by itself changes to the users home directory instead of simply displaying the current directory.

So, it looks the real problem is the same as bug #41275.  As I noted in comment #7 of that report, I thought we had fixed the problem for function calls like this, but I guess it was never done?  I will take another look at it.

John W. Eaton <jwe>
Project Administrator
Fri 14 Jun 2019 01:50:25 PM UTC, comment #3: 

Set a breakpoint within openmp3.m and then save a run will stop there, so you can single step through the rest of it.

John Donoghue <lostbard>
Project Member
Wed 12 Jun 2019 11:20:27 AM UTC, comment #2: 

1. Yes
2. C:\Octave\octave-5.1.0-w64\octave.vbs
It is the only executable that is available in the install directory that runs octave-gui.exe
2.1. No. The text field is empty.
3. By clicking on "Current directory" folder icon, then browsing and selecting.
4. No, I've deleted my local copy of my custom startup file. It is not needed.
5. Clicking "Save and run" on openmp3.m, but nothing happens. How do I properly debug openmp3.m ?

Deyan <dvd_video>
Tue 11 Jun 2019 09:02:19 AM UTC, comment #1: 

Please be very precise, so that one is able to reproduce your unexpected directory change.

1. You download and deploy your project https://github.com/dvdvideo1234/MP3Toolbox at `C:\Octave\MP3Toolbox`.

2. You Start a freshly installed Octave 5.1.0 GUI via the desktop shortcut.

2.1 Did you modify any default settings regarding the starting directory of Octave? (Startup files https://octave.org/doc/v5.1.0/Startup-Files.html or GUI > Preferences > General > Octave Startup)

3. How do you change the current working directory to `C:\Octave\MP3Toolbox`?

4. Does you code modify the working directory? (`cd` commands?).  In which of your functions you observe this directory change? 

5. Can you run your program in the debugger to determine the function call or script that changes the directory unintentionally?

Kai Torben Ohlhus <siko1056>
Project Member
Tue 11 Jun 2019 07:50:51 AM UTC, original submission:  

Consider the example from the raised issue:

https://savannah.gnu.org/bugs/?56470

First, the current working directory is changed to `C:\Octave\MP3Toolbox`, but then when the program is called it changes to `C:\Users\<user_name>`

How come the `Current directory` is changed every time an how can this be resolved?

P.S. I checked the `Sync Octave working directory with file browser` checkbox.

Deyan <dvd_video>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by dvd_video (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-06-17 jwe Item GroupInaccurate Result => Incorrect Result
        StatusNeed Info => Duplicate
    2019-06-17 jwe Dependencies- => Depends on bugs #41275
    2019-06-11 siko1056 StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5