bugGNU Octave - Bugs: bug #47216, User GUI not redrawn after callback

 
 

bug #47216: User GUI not redrawn after callback

Submitted by:  Lachlan Andrew <lachlan>
Submitted on:  Mon 22 Feb 2016 02:16:15 AM UTC  
 
Category: PlottingSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: Lachlan Andrew <lachlan>
Originator Name: LachlanOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 07 Jul 2016 12:10:27 AM UTC, comment #9:

@Lachlan: I pushed your cset here http://hg.savannah.gnu.org/hgweb/octave/rev/90eca9a9c47a. Graphics are still slow, but I think at some point we're just going to have to sit down and do some profiling to figure out where the bottlenecks are.

Rik <rik5>
Project Administrator
Fri 01 Jul 2016 10:19:15 AM UTC, comment #8:

The previous patch missed the "username" field. Consider this one.

(file #37643)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Wed 15 Jun 2016 04:32:33 PM UTC, comment #7:

I'm not sure if this solution is "good", but I can't think of anything better. It just checks that the name of the object whose callback this is starts with "ui".

We don't want the criterion to be so smart that it takes a long time to calculate. The figure shouldn't have too many ui* objects, unlike lines or patches, and the purpose of all ui* objects is to alter the figure before returning to the prompt, so it seems the natural thing to try.

(file #37490)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Wed 15 Jun 2016 03:37:31 PM UTC, comment #6:

I've corrected some issues with legend and the really slow drawing is no longer a problem. I still think it is a good idea for performance to see if we can limit executing the callbacks except when it is necessary. However, this is no longer high priority. Take your time to find a good solution.

Rik <rik5>
Project Administrator
Tue 14 Jun 2016 11:40:26 PM UTC, comment #5:

OK. I'll take a look. Thanks for the suggested way forward.

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Tue 14 Jun 2016 08:27:53 PM UTC, comment #4:

Alas, I'm re-opening this bug report. The problem is that certain plots have become unbelievably slow. So slow, that I can see the updates.

The set of legend demos 30-34 are good ones to test with.

I thought it was related to callbacks, so I undid the fix for this bug report,

and now it works.

I think the solution is to be smarter about what updates we do. If there are loads of callbacks executing which are not related to a ui* object it is probably because we are constructing a complicated graphics object. We should just wait until we hit the command line again to display the final graphic. But for objects which will never hit the command line, like a uicontrol, we do need to update the plot.

Rik <rik5>
Project Administrator
Sat 26 Mar 2016 03:49:28 PM UTC, comment #3:

@Lachlan: I tested the patch and pushed it here (http://hg.savannah.gnu.org/hgweb/octave/rev/4f0f9f029d12). Thanks for swatting down another bug report.

Rik <rik5>
Project Administrator
Wed 02 Mar 2016 09:20:13 AM UTC, comment #2:

Rik, you're right that uicontrol triggers a redraw, but not all callbacks do. The attached file shows that a mouse button-up callback doesn't. (I shouldn't have mentioned uicontrol -- I was just trying to emphasize that this isn't about the Octave GUI itself.)

Click on a few points on the axes. The script tries to draw a line to each click, but they don't appear until the uicontrol (with empty callback) is clicked, or the mouse moves out of the window.

(file #36525)

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.
Mon 29 Feb 2016 01:36:50 AM UTC, comment #1:

Can you post an example where this is a problem so I can test before and after the patch?

I'm uploading a test script I used which makes a uicontrol button, but it already works without the patch.

(file #36501)

Rik <rik5>
Project Administrator
Mon 22 Feb 2016 02:16:15 AM UTC, original submission:

If a user creates a GUI with uicontrol etc., then callbacks that modify a graph do not cause the graph to be redrawn. They set Vdrawnow_requested, but nothing checks if that is set (until a command prompt or such).

Matlab draws the object immediately.

I'll attach the (trivial) patch to fix this once I have the bug number.

Lachlan Andrew <lachlan>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36525:  tst_ui.m added by lachlan (639B - d2l/unknowntype)
file #36501:  tst_uicontrol.m added by rik5 (325B - d2l/unknowntype)
file #36417:  bug_47216_draw_on_callback.cset added by lachlan (800B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by lachlan (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Jul 2016 12:10:27 AM UTCrik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Fri 01 Jul 2016 10:19:15 AM UTClachlanAttached File-=>Added bug_47216_limit_draw_on_callback.cset, #37643
    Wed 15 Jun 2016 04:32:33 PM UTClachlanAttached File-=>Added bug_47216_limit_draw_on_callback.cset, #37490
    Tue 14 Jun 2016 08:27:53 PM UTCrik5StatusFixed=>In Progress
      Open/ClosedClosed=>Open
    Sat 26 Mar 2016 03:49:28 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Wed 02 Mar 2016 09:20:13 AM UTClachlanAttached File-=>Added tst_ui.m, #36525
    Mon 29 Feb 2016 01:36:50 AM UTCrik5Attached File-=>Added tst_uicontrol.m, #36501
    Mon 22 Feb 2016 02:18:56 AM UTClachlanAttached File-=>Added bug_47216_draw_on_callback.cset, #36417
      StatusNone=>Patch Submitted
      Assigned toNone=>lachlan

    Back to the top


    Powered by Savane 3.1-cleanup1