bugGNU Octave - Bugs: bug #51375, calling anonymous function handle...

 
 

bug #51375: calling anonymous function handle loaded from a file hangs the interpreter (publish fails on anon functions)

Submitter:  Juan Pablo Carbajal <juanpi>
Submitted:  Mon 03 Jul 2017 09:04:19 PM UTC
   
 
Category:  Octave Function Severity:  4 - Important
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  juanpi Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 09 Mar 2018 09:09:44 PM UTC, comment #5: 

Yeah this looks fixed now on the default branch, thanks.

Mike Miller <mtmiller>
Group Member
Fri 09 Mar 2018 08:49:12 PM UTC, comment #4: 

Octave is not hanging for me with either the original test case or the code in comment #2.

Can anyone still reproduce the problem with a current version of Octave?

John W. Eaton <jwe>
Group administrator
Tue 04 Jul 2017 12:32:26 PM UTC, comment #3: 

Fantastic Mike!
Thanks for the detective work and finding the core problem

Juan Pablo Carbajal <juanpi>
Group Member
Mon 03 Jul 2017 11:31:56 PM UTC, comment #2: 

This looks like the root cause to me:


clear all
myfunc = @(t) sin(t);
save somefile
clear all
load somefile
myfunc(0)     ### Octave hangs


This looks to me like a regression on the default branch, works fine in Octave 4.2.1.

The reason for the necessity of the section marker is that local variables are saved and loaded between each section of code by the publish function.

Mike Miller <mtmiller>
Group Member
Mon 03 Jul 2017 09:31:58 PM UTC, comment #1: 

I can confirm this on Fedora 26.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 03 Jul 2017 09:04:19 PM UTC, original submission:  

The following script

## Test script
#
phi = @(t) sin(t);
y_f =@(t) phi(t);    # Delayed superposition
## A section
#
y = y_f(0);


hangs when published with publish. Removing the "sin" function (it also hangs with "exp", "log", etc... I guess built-ins?) makes publish work again...

BUT! also removing the line "## A section"

Weird bug.. reproducible? (in my system is a very robust bug!)


$ lsb_release -a
No LSB modules are available.
Distributor ID:        Ubuntu
Description:        Ubuntu 16.04.2 LTS
Release:        16.04
Codename:        xenial


HG-ID 1147e5c912aa


Juan Pablo Carbajal <juanpi>
Group Member

 

(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

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by juanpi (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-09 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2017-09-28 mtmiller Dependencies- bugs #52134 is dependent
    2017-07-03 mtmiller Summarycalling function handle loaded from a file hangs the interpreter (publish fails on anon functions) calling anonymous function handle loaded from a file hangs the interpreter (publish fails on anon functions)
    2017-07-03 mtmiller Summarypublish fails when script defines anonymous nested functions calling function handle loaded from a file hangs the interpreter (publish fails on anon functions)
    2017-07-03 mtmiller Severity3 - Normal 4 - Important
        Item GroupIncorrect Result Regression
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code