[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hgsave weirdness
From: |
John W. Eaton |
Subject: |
Re: hgsave weirdness |
Date: |
Mon, 23 Sep 2019 15:49:04 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 9/23/19 3:11 PM, Dmitri A. Sergatskov wrote:
On Mon, Sep 23, 2019 at 2:00 PM Rik <address@hidden> wrote:
error: hgload: unable to locate file t2.ofig
error: called from
hgload at line 60 column 7
t2 at line 5 column 3
the problem is in hgload at line 60. If I look at that code, I see
if (isempty (file_in_loadpath (filename)))
error ("hgload: unable to locate file %s", filename);
endif
So, I would start with the debugger and when you reach line 60 take a look at
your path variable. Maybe something is removing '.' from the search path
(.octaverc configuration file?).
I tried and "." is the very first in path.
It works also if I run it it immediately the second time.
Also:
octave:1> t2
fname = t2.ofig
error: hgload: unable to locate file t2.ofig
error: called from
hgload at line 60 column 7
t2 at line 6 column 3
octave:2> file_in_loadpath ("t2.ofig")
ans = /d2/home/dima/src/octave/clang/t2.ofig
But it is something with loadpath. If I change fname to /tmp/t2.ofig it works.
Yes, the bug appears to be in file_in_loadpath. If I make the following
change in hgload.m, it will loop forever. But stat shows that the file
exists and I can see it with ls in a command window while Octave is looping.
diff --git a/scripts/plot/util/hgload.m b/scripts/plot/util/hgload.m
--- a/scripts/plot/util/hgload.m
+++ b/scripts/plot/util/hgload.m
@@ -56,9 +56,13 @@ function [h, old_prop] = hgload (filenam
error ("hgload: unable to locate file %s", filename);
endif
else
- if (isempty (file_in_loadpath (filename)))
- error ("hgload: unable to locate file %s", filename);
- endif
+ ii = 0;
+ while (isempty (file_in_loadpath (filename)))
+ stat (filename)
+ ii++
+ pause (1);
+ endwhile
+ ii
endif
## Load the handle structure
I'm guessing a loadpath caching error for filenames that are not absolute?
Trying older versions, it looks like it first started failing in 4.2.x.
jwe
- hgsave weirdness, Dmitri A. Sergatskov, 2019/09/23
- Re: hgsave weirdness, Rik, 2019/09/23
- Re: hgsave weirdness, Dmitri A. Sergatskov, 2019/09/23
- Re: hgsave weirdness, Dmitri A. Sergatskov, 2019/09/23
- Re: hgsave weirdness, Dmitri A. Sergatskov, 2019/09/23
- Re: hgsave weirdness, Rik, 2019/09/23
- Re: hgsave weirdness, Dmitri A. Sergatskov, 2019/09/23
- Re: hgsave weirdness, Dmitri A. Sergatskov, 2019/09/23
- Re: hgsave weirdness,
John W. Eaton <=