Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeing errors when disabling/enabling opengl #989

Closed
totaam opened this issue Sep 25, 2015 · 9 comments
Closed

Seeing errors when disabling/enabling opengl #989

totaam opened this issue Sep 25, 2015 · 9 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Sep 25, 2015

Issue migrated from trac ticket # 989

component: client | priority: minor | resolution: fixed | keywords: opengl

2015-09-25 18:21:26: afarr created the issue


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.

@totaam
Copy link
Collaborator Author

totaam commented Sep 26, 2015

2015-09-26 08:57:17: antoine changed priority from major to minor

@totaam
Copy link
Collaborator Author

totaam commented Sep 26, 2015

2015-09-26 08:57:17: antoine changed owner from antoine to afarr

@totaam
Copy link
Collaborator Author

totaam commented Sep 26, 2015

2015-09-26 08:57:17: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Oct 23, 2015

2015-10-23 21:37:04: maxmylyn changed owner from afarr to antoine

@totaam
Copy link
Collaborator Author

totaam commented Oct 23, 2015

2015-10-23 21:37:04: maxmylyn commented


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

@totaam
Copy link
Collaborator Author

totaam commented Oct 24, 2015

2015-10-24 03:59:28: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Oct 24, 2015

2015-10-24 03:59:28: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Oct 24, 2015

2015-10-24 03:59:28: antoine commented


Exception: invalid encoding: png
[[BR]]
That's ticket #1010

[[BR]]

AttributeError: xid attribute not supported
[[BR]]
That's already fixed in r10983

[[BR]]

Interestingly, the client works fine with and without OpenGL. I seen no noticeable graphical issues, just the constant flooding of tracebacks.
[[BR]]
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.

@totaam totaam closed this as completed Oct 24, 2015
@totaam
Copy link
Collaborator Author

totaam commented May 18, 2016

2016-05-18 04:42:15: antoine commented


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant