clearing oct files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

clearing oct files

David L
Hi,

I've just started playing with integrating some C/C++ tools with octave using oct files. I was wondering if it's possible to have octave pick up a recompiled .oct file without restarting octave. I've seen different behavior when trying to do this including a crash like the one in the closed bug report here:


Eg:
warning: library /tmp/foo.oct not reloaded due to existing references
fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)

If I remove the .oct file and call it, it says it's undefined and doesn't crash. If I then copy the new one, it doesn't crash, but it also doesn't pick up the changes until I exit octave and restart. Is that old bug really fixed? I'm using 6.2.0.

Thanks,

        David

On a related topic, if the .oct file is a symbolic link and you clear the function, it behaves just as if the .oct file didn't change when the destination of the symlink changes.



Reply | Threaded
Open this post in threaded view
|

Re: clearing oct files

PhilipNienhuis
David L wrote

> Hi,
>
> I've just started playing with integrating some C/C++ tools with octave
> using oct files. I was wondering if it's possible to have octave pick up a
> recompiled .oct file without restarting octave. I've seen different
> behavior when trying to do this including a crash like the one in the
> closed bug report here:
>
> http://savannah.gnu.org/bugs/?34861
>
> Eg:
> warning: library /tmp/foo.oct not reloaded due to existing references
> fatal: caught signal Segmentation fault -- stopping myself...
> Segmentation fault (core dumped)
>
> If I remove the .oct file and call it, it says it's undefined and doesn't
> crash. If I then copy the new one, it doesn't crash, but it also doesn't
> pick up the changes until I exit octave and restart. Is that old bug
> really
> fixed? I'm using 6.2.0.
>
> Thanks,
>
>         David
>
> On a related topic, if the .oct file is a symbolic link and you clear the
> function, it behaves just as if the .oct file didn't change when the
> destination of the symlink changes.

I may misunderstand your post, but (at least on Windows) it's required to
clear the function(s) defined in the .oct file ("clear <function name>" or
simply "clear -f") before the .oct file can be removed at all. After that,
Octave neatly picks up the changed functions in the new .oct file upon
calling them.

Philip




--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html