xpra icon
Bug tracker and wiki

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#989 closed defect (fixed)

Seeing errors when disabling/enabling opengl

Reported by: alas Owned by: Antoine Martin
Priority: minor Milestone: 0.16
Component: client Version: trunk
Keywords: opengl Cc:

Description

Testing with OSX client 0.16.0 r10624 vs. fedora 21 0.16.0 r10655 server... with an Intel video card on the osx client, connecting with --opengl=on flag.

When I use the application menu Features->OpenGL option to disable the opengl I see the following server side:

2015-09-25 10:14:18,202 client_decode_error: failed to get a gl context (-1)
2015-09-25 10:14:18,203 client_decode_error:  (-1)
2015-09-25 10:14:18,203 client_decode_error:  (-1)
2015-09-25 10:14:18,204 client_decode_error: failed to get a gl context (-1)
2015-09-25 10:14:18,204 client_decode_error:  (-1)
2015-09-25 10:14:18,204 client_decode_error:  (-1)
2015-09-25 10:14:18,206 client_decode_error:  (-1)
2015-09-25 10:14:18,214 client_decode_error: failed to get a gl context (-1)
2015-09-25 10:14:18,214 client_decode_error:  (-1)
2015-09-25 10:14:18,222 client_decode_error:  (-1)
2015-09-25 10:14:18,233 client_decode_error: __exit__ (-1)
2015-09-25 10:14:18,234 client_decode_error:  (-1)
2015-09-25 10:14:18,236 client_decode_error: delta region bucket 0 references pixmap data we do not have! (-1)
2015-09-25 10:14:18,237 client_decode_error: delta region bucket 0 references pixmap data we do not have! (-1)

And the following client side:

2015-09-25 10:14:18,187 UI thread is running again, resuming
2015-09-25 10:14:18,268 draw error
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2329, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 470, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 503, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 350, in paint_with_video_decoder
AttributeError: __exit__
2015-09-25 10:14:18,268 error processing draw packet
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2273, in _draw_thread_loop
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2329, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 470, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 503, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 350, in paint_with_video_decoder
AttributeError: __exit__
2015-09-25 10:14:18,289 draw error
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2329, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 470, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 501, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 298, in paint_rgb32
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 179, in process_delta
Exception: delta region bucket 0 references pixmap data we do not have!
2015-09-25 10:14:18,289 error processing draw packet
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2273, in _draw_thread_loop
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2329, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 470, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 501, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 298, in paint_rgb32
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 179, in process_delta
Exception: delta region bucket 0 references pixmap data we do not have!
2015-09-25 10:14:18,324 draw error
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2329, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 470, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 501, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 298, in paint_rgb32
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 179, in process_delta
Exception: delta region bucket 0 references pixmap data we do not have!
2015-09-25 10:14:18,325 error processing draw packet
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2273, in _draw_thread_loop
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2329, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 470, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 501, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 298, in paint_rgb32
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 179, in process_delta
Exception: delta region bucket 0 references pixmap data we do not have!

When I then use the same application menu option to re-force the opengl, I see this server side:

2015-09-25 10:14:24,984 client_decode_error: window 3 is already gone! (-1)
2015-09-25 10:14:25,027 client_decode_error:  (-1)
2015-09-25 10:14:25,323 client_decode_error: video decoder dec_avcodec.Decoder({'decoder_height': 606, 'encoding': 'h264', 'colorspace': 'YUV444P', 'actual_colorspace': 'YUV444P', 'height': 606, 'decoder_width': 682, 'width': 682, 'version': (56, 41, 100), 'formats': ['YUV422P', 'BGRX', 'GBRP', 'RGB', 'YUV420P', 'BGRA', 'ARGB', 'XRGB', 'YUV444P'], 'frames': 84L, 'type': 'avcodec', 'buffers': 0}) did not return an image (-1)

And I see some more stuff server side:

2015-09-25 10:14:24,162 UI thread is now blocked
2015-09-25 10:14:25,120 UI thread is running again, resuming
Exception Exception ValueError: 'cannot conValueErrorv: er'tc afnlnooatt  cNoanNv etrot  ifnltoeagte rN'aN in  t'ox pirnat.ecgoedre'cs in .l'ixbparva_.ccoomdmeocns..alvi_blaovg_.cloomgm_ocna.lalvb_alcokg_.olvoegr_rciadlel'ba ignored
ck_override'2015-09-25 10:14:25,1443201265498 libav: error while decoding MB 23 0, bytestream 371
 ignored
2015-09-25 10:14:25,1443201265498 libav: error while decoding MB 21 25, bytestream 1512
2015-09-25 10:14:25,499 avcodec error decoding 8828 bytes of data with options={'speed': 59, 'type': 'P', 'flush': 0, 'pts': 54, 'frame': 1, 'encoding': 'h264', 'quality': 65, 'csc': 'YUV444P'} (frame 84, step 1 of 1)
2015-09-25 10:14:25,499  decoder state: {'decoder_height': 606, 'encoding': 'h264', 'colorspace': 'YUV444P', 'actual_colorspace': 'YUV444P', 'height': 606, 'decoder_width': 682, 'width': 682, 'version': (56, 41, 100), 'formats': ['YUV422P', 'BGRX', 'GBRP', 'RGB', 'YUV420P', 'BGRA', 'ARGB', 'XRGB', 'YUV444P'], 'frames': 84L, 'type': 'avcodec', 'buffers': 0}
2015-09-25 10:14:25,499 paint_with_video_decoder: wid=3, h264 decompression error on 8828 bytes of picture data for 682x606 pixels using dec_avcodec.Decoder({'decoder_height': 606, 'encoding': 'h264', 'colorspace': 'YUV444P', 'actual_colorspace': 'YUV444P', 'height': 606, 'decoder_width': 682, 'width': 682, 'version': (56, 41, 100), 'formats': ['YUV422P', 'BGRX', 'GBRP', 'RGB', 'YUV420P', 'BGRA', 'ARGB', 'XRGB', 'YUV444P'], 'frames': 84L, 'type': 'avcodec', 'buffers': 0}), options={'speed': 59, 'type': 'P', 'flush': 0, 'pts': 54, 'frame': 1, 'encoding': 'h264', 'quality': 65, 'csc': 'YUV444P'}
2015-09-25 10:16:26,887 UI thread is now blocked
2015-09-25 10:16:28,202 UI thread is running again, resuming
2015-09-25 10:17:50,036 UI thread is now blocked
2015-09-25 10:17:50,425 UI thread is running again, resuming

I'll attach an xpra info for opengl=on and assume you don't need another for =off.

Change History (4)

comment:1 Changed 5 years ago by Antoine Martin

Owner: changed from Antoine Martin to alas
Priority: majorminor

Hmm, this happens because painting the screen is threaded... and we want to keep it that way.

The problem is that when we re-create the windows, we can't stop the paint thread, and so it will fail if the backing is closed by the time the decoded pixels are ready to be painted.

Lowering the priority as this should not have any major adverse effects, just log messages. Feel free to re-raise it if that is not the case.

  • r10687 should make things better, at least for the paint_with_video_decoder errors.
  • r10688 should change all the paint stacktraces into more "regular" paint errors
  • r10779 + r10902 + r10822 + r10776: try to get rid of all the "errors" and just trigger a new "non-error-refresh" for this rather special case (picture decompression finishes after we've destroyed the backing)
  • r10922 should fix the delta bucket errors
Last edited 5 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 5 years ago by J. Max Mena

Owner: changed from alas to Antoine Martin

Running a r10972 OSX Client from xpra.org/beta against a r10989 trunk built server:

EDIT:

  • Also connected against a Fedora 21 server configured to use RPMs from xpra.org/beta/

/EDIT

  • Client output is flooded with invalid encoding errors while OpenGL is enabled (Intel Iris Pro)
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2415, in _draw_thread_loop
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/ui_client_base.py", line 2475, in _do_draw
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/client_window_base.py", line 539, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 524, in draw_region
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/window_backing_base.py", line 532, in do_draw_region
Exception: invalid encoding: png
  • Disabling OpenGL gives the following traceback:
Traceback (most recent call last):
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/client/gtk_base/gtk_client_window_base.py", line 275, in on_realize
  File "/Users/osx/gtk/inst/lib/python2.7/site-packages/xpra/gtk_common/gobject_compat.py", line 62, in get_xid
AttributeError: xid attribute not supported
  • Enabling OpenGL does not throw any errors, however.

Interestingly, the client works fine with and without OpenGL. I seen no noticeable graphical issues, just the constant flooding of tracebacks.

Regardless, passing back to you

Last edited 5 years ago by J. Max Mena (previous) (diff)

comment:3 Changed 5 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

Exception: invalid encoding: png


That's ticket #1010


AttributeError: xid attribute not supported


That's already fixed in r10983


Interestingly, the client works fine with and without OpenGL. I seen no noticeable graphical issues, just the constant flooding of tracebacks.


That can be both a good or a bad thing:

  • if we detect the paint failures and refresh with another encoding (not png or jpeg which have problems), then that's good
  • if we just constantly try to re-use the same failing encoding then that's bad: first because maybe we don't need to refresh anything if you haven't noticed visual degradation, second because that's going to keep wasting bandwidth

In any case, I am closing this ticket as fixed and we can re-open it if it re-occurs. Note: it can also be triggered by scaleup/scaledown.

Last edited 5 years ago by Antoine Martin (previous) (diff)

comment:4 Changed 4 years ago by Antoine Martin

The fix in r10922 for references pixmap data we do not have was not complete, r12597 probably fixes that.

Note: See TracTickets for help on using tickets.