bugGNU Octave - Bugs: bug #50317, warning 'invalid operation' when...


bug #50317: warning 'invalid operation' when using zoom on Qt figure

Submitted by:  Rik <rik5>
Submitted on:  Wed 15 Feb 2017 05:26:16 PM UTC  
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.2.0 Operating System:  Any

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)

Wed 22 Feb 2017 06:18:12 PM UTC, comment #13:

OK. An incremental build did not work, but a fresh rebuild
fixed the problem. Zoom window is still opaque
(after set (gcf, "graphicssmoothing", "off")), and the plot would not update on the computer with intel graphics, but the warnings are gone.


Dmitri A. Sergatskov <dasergatskov>
Wed 22 Feb 2017 03:57:27 PM UTC, comment #12:

As a second datapoint, Pantxo's changeset fixed the problem for me.

Rik <rik5>
Project Administrator
Wed 22 Feb 2017 07:44:24 AM UTC, comment #11:

@Dmitri: I did get those warnings well before 3a298e07002c (it is actually the subject of this report), but it is supposed to be fixed after 0842b119dc1b. Isn't it?

Pantxo Diribarne <pantxo>
Project Member
Wed 22 Feb 2017 06:51:32 AM UTC, comment #10:

As of
HG ID for this build is "3a298e07002c"
I get lots of

warning: opengl_renderer: Error 'invalid operation' (1282) occurred in init_gl_context
warning: opengl_renderer: Error 'invalid operation' (1282) occurred in init_gl_context

when trying to zoom
set (gcf, "graphicssmoothing", "off")


Dmitri A. Sergatskov <dasergatskov>
Tue 21 Feb 2017 10:57:24 PM UTC, comment #9:



Closing report as fixed.

Pantxo Diribarne <pantxo>
Project Member
Tue 21 Feb 2017 10:46:00 PM UTC, comment #8:

Please go ahead and push this.

Rik <rik5>
Project Administrator
Tue 21 Feb 2017 07:23:52 AM UTC, comment #7:

The cset from comment #5 fixes at least three opengl errors:

  • We were using glPushMatrix without selecting a matrix mode, which at some point lead to a "stack overflow" on the "present" matrix (MODELVIEW I guess)
  • We were always using glPopMatrix on the PROJECTION matrix which lead to a "stack underflow" on this one
  • We were calling glLineWidth inside a glBegin/End block, which is not allowed, and lead to an "invalid operation" error.

I think it is safe, and I would advise, to push it to stable. Can I do so?

Pantxo Diribarne <pantxo>
Project Member
Sun 19 Feb 2017 10:30:30 PM UTC, comment #6:

The patch also fixes bug #50298 for me.

Pantxo Diribarne <pantxo>
Project Member
Sun 19 Feb 2017 07:52:41 PM UTC, comment #5:

I attached a patch that fixes the error for me.

(file #39792)

Pantxo Diribarne <pantxo>
Project Member
Wed 15 Feb 2017 09:47:32 PM UTC, comment #4:

Also -- it seems to be a desktop dependent issue.
If I reboot into Qt/Plasma then qt plot works and i get gl_warnings and an opaque zoom window.


Dmitri A. Sergatskov <dasergatskov>
Wed 15 Feb 2017 09:42:07 PM UTC, comment #3:

For what it worth -- on i7 comp (with intel graphics) qt
plotting is broken completely -- plot does not get updated
until I do "print junk.png" -- no zooming, axis on/off.
Unlike earlier cases now I have to do print trick after each
plot command. I do NOT get gl_warnings at all.

fltk works.

The same with 4.2.0 and with "e2e182a8e699" snapshot.

I always suspected there was some initialization issues with qt
and apparently a recent GL system update made the issue
more severe.


Dmitri A. Sergatskov <dasergatskov>
Wed 15 Feb 2017 08:36:38 PM UTC, comment #2:

The problem is happening somewhere other than in init_gl_context(). This function actually checks for an OpenGl error, versus most functions which don't, so it only appears to originate here.

I modified init_gl_context to:

and it is always this error that is triggered, not the downstream one at the end of the function.

Rik <rik5>
Project Administrator
Wed 15 Feb 2017 07:01:02 PM UTC, comment #1:

Also (at least on my computer with nvidia/Gallium graphics) the zoom window becomes opaque.


Dmitri A. Sergatskov <dasergatskov>
Wed 15 Feb 2017 05:26:16 PM UTC, original submission:

If the property "graphicssmoothing" has been changed to "off", then using the mouse-driven zoom box within a Qt figure causes a warning to be issued.

Code to reproduce:

Rik <rik5>
Project Administrator


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

Attach Files:

Attached Files
file #39792:  zoom.patch added by pantxo (2KiB - application/x-download)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by rik5 (Submitted the item)

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

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-21 pantxo StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2017-02-19 pantxo Attached File- => Added zoom.patch, #39792
        StatusConfirmed => Patch Submitted
    2017-02-15 rik5 StatusNone => Confirmed
    2017-02-15 rik5 Carbon-Copy- => Added pantxo

    Back to the top

    Powered by Savane 3.3