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 Feb 15 17:26:16 2017  
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: Any

Add a New Comment (Rich MarkupRich 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)

Wed Feb 22 18:18:12 2017, 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 Feb 22 15:57:27 2017, comment #12:

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

Rik <rik5>
Project Administrator
Wed Feb 22 07:44:24 2017, 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 Feb 22 06:51:32 2017, 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 Feb 21 22:57:24 2017, comment #9:



Closing report as fixed.

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

Please go ahead and push this.

Rik <rik5>
Project Administrator
Tue Feb 21 07:23:52 2017, 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 Feb 19 22:30:30 2017, comment #6:

The patch also fixes bug #50298 for me.

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

I attached a patch that fixes the error for me.

(file #39792)

Pantxo Diribarne <pantxo>
Project Member
Wed Feb 15 21:47:32 2017, 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 Feb 15 21:42:07 2017, 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 Feb 15 20:36:38 2017, 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 Feb 15 19:01:02 2017, comment #1:

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


Dmitri A. Sergatskov <dasergatskov>
Wed Feb 15 17:26:16 2017, 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 File(s):

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


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by dasergatskov (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by rik5 (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Feb 21 22:57:24 2017pantxoStatusPatch Submitted=>Fixed
    Sun Feb 19 19:52:41 2017pantxoAttached File-=>Added zoom.patch, #39792
      StatusConfirmed=>Patch Submitted
    Wed Feb 15 20:36:38 2017rik5StatusNone=>Confirmed
    Wed Feb 15 17:27:59 2017rik5Carbon-Copy-=>Added pantxo

    Back to the top

    Powered by Savane 3.1-cleanup1