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

 
 

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

Submitter:  Rik <rik5>
Submitted:  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
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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.

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>
Group 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>
Group 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
(after
 set (gcf, "graphicssmoothing", "off")
)

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 21 Feb 2017 10:57:24 PM UTC, comment #9: 
Pantxo Diribarne <pantxo>
Group Member
Tue 21 Feb 2017 10:46:00 PM UTC, comment #8: 

Please go ahead and push this.

Rik <rik5>
Group 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>
Group Member
Sun 19 Feb 2017 10:30:30 PM UTC, comment #6: 

The patch also fixes bug #50298 for me.

Pantxo Diribarne <pantxo>
Group 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>
Group 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.

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.
--

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:


  void
  opengl_renderer::init_gl_context (bool enhanced, const Matrix& c)
  {
#if defined (HAVE_OPENGL)

    GLenum gl_error0 = glGetError ();
    if (gl_error0)
      warning ("0_Error: Error %s occurred in init_gl_context",
               gluErrorString (gl_error0));


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



Rik <rik5>
Group 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.
--

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.


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


Code to reproduce:


close all
graphics_toolkit qt
plot (1:10)
set (gcf, "graphicssmoothing", "off")
## Now use mouse to select zoom operation and draw a zoom box inside the
## plot window.



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 #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)
  •  

    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 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.13-f8d8.
    Corresponding source code