bugGNU Octave - Bugs: bug #57350, Recursive behavior of graphic...

 
 

bug #57350: Recursive behavior of graphic callbacks has changed

Submitter:  Rik <rik5>
Submitted:  Tue 03 Dec 2019 03:59:13 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 10 Sep 2020 12:27:20 AM UTC, comment #10: 

Motivating example code that I posted now runs correctly.  Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 27 Jul 2020 01:05:20 PM UTC, comment #9: 

OK to close this report as fixed?

John W. Eaton <jwe>
Group administrator
Mon 09 Dec 2019 09:47:14 AM UTC, comment #8: 

Since it is an improvement with a more general interest than this specific report, I pushed the patch here:

http://hg.savannah.gnu.org/hgweb/octave/rev/18de38659606

Marking this report ready for test.

Pantxo Diribarne <pantxo>
Group Member
Tue 03 Dec 2019 10:50:33 PM UTC, comment #7: 

@Dmitri: I can reproduce the segfault, but I it probably has nothing to do with this bug. I filed bug #57354.

Pantxo Diribarne <pantxo>
Group Member
Tue 03 Dec 2019 09:43:08 PM UTC, comment #6: 

I applied the patch, but the behavior looks the same.
The core dump trace is much shorter though...


./run-octave -q -f
octave:1> __octave_config_info__ ("hg_id")
ans = cd566153edd6+
octave:2> tst_recur
stopped in updater at line 2 [/home/dima/src/octave/gcc_def/updater.m]
2:   keyboard;
keyboard>
fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)



Dec 03 15:38:57 i7 systemd-coredump[215121]: Process 214976 (lt-octave-gui) of user 1001 dumped core.

                                             Stack trace of thread 215115:
                                             #0  0x00007f607c48ed3e n/a (/home/dima/src/octave/gcc_def/libinterp/.libs/liboctinterp.so.7.0.0)
Dec 03 15:38:57 i7 systemd[1]: systemd-coredump@5-215120-0.service: Succeeded.


Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Tue 03 Dec 2019 07:57:57 PM UTC, comment #5: 

@Dmitri: No, the patch is just attached in comment #2 for testing.
Without the patch, you don't seem to experience the infinite callback execution though.

Pantxo Diribarne <pantxo>
Group Member
Tue 03 Dec 2019 05:54:51 PM UTC, comment #4: 

I guess this was still with an older patch:


hg tip
changeset:   27767:3212c50369cb
bookmark:    @
tag:      hg tip
changeset:   27767:3212c50369cb
bookmark:    @
tag:         tip
user:        Pantxo Diribarne <pantxo.diribarne@gmail.com>
date:        Mon Dec 02 18:23:12 2019 +0100
summary:     Make graphics antialiasing and blending independent (bug #57343)


Did you push the latest one?

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 03 Dec 2019 05:41:53 PM UTC, comment #3: 

With this patch:


octave -q -f
octave:1> tst_recur
updating
updating
octave:2> updating

octave:2> __octave_config_info__ ("hg_id")
ans = 3212c50369cb

(it just sits at "octave:2> updating " until I hit Enter.)
If I uncomment keyboard; in updater.m

octave -q -f
octave:1> tst_recur
stopped in updater at line 2 [/home/dima/scratch/updater.m]
2:   keyboard;
keyboard>
fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)

(I hit Enter at keyboard> )

trace is attached.

Dmitri.


(file #47979)

Dmitri A. Sergatskov <dasergatskov>
Tue 03 Dec 2019 04:51:50 PM UTC, comment #2: 

Oups, use this refreshed patch.

(file #47978)

Pantxo Diribarne <pantxo>
Group Member
Tue 03 Dec 2019 04:48:03 PM UTC, comment #1: 

I think the real change from 5.1 is that some properties used to be modified directly from the GUI. This was not thread safe, but synchronous. Now property modifications are all done through asynchronous graphics events.

I attached a patch that prevents the Panel object from emitting graphics events when its position didn't actually change.

(file #47977)

Pantxo Diribarne <pantxo>
Group Member
Tue 03 Dec 2019 03:59:13 PM UTC, original submission:  

Find two pieces of test code attached:

1) tst_recur.m

Sets up figures and adds listeners to graphic properties which invoke graphics callback updater.m

2) updater.m

Graphics callback.


In Octave-5.1 calling tst_recur prints "updating" four times and then returns to the prompt.  In the development version of Octave "updating" is printed continuously.

If I uncomment the keyboard statement in updater.m I can see that the stack depth just keeps increasing on the development branch.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47978:  bug57350_2.patch added by pantxo (2KiB - text/x-patch)
file #47977:  bug57350.patch added by pantxo (2KiB - text/x-patch)
file #47975:  tst_recur.m added by rik5 (260B - text/x-matlab)
file #47976:  updater.m added by rik5 (381B - text/x-matlab)

 

Depends on the following items: None found

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 dasergatskov (Updated the item)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by rik5 (Submitted the item)
  • -email is unavailable- added by rik5
  •  

    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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-10 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-12-09 pantxo StatusPatch Submitted Ready For Test
    2019-12-03 dasergatskov Attached File- Added das_oct_trace_20191203.txt, #47979
    2019-12-03 pantxo Attached File- Added bug57350_2.patch, #47978
    2019-12-03 pantxo Attached File- Added bug57350.patch, #47977
        StatusConfirmed Patch Submitted
    2019-12-03 rik5 Attached File- Added tst_recur.m, #47975
        Attached File- Added updater.m, #47976
        Carbon-Copy- Added pantxo

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code