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

No matching CSC module found #2642

Closed
totaam opened this issue Mar 13, 2020 · 13 comments
Closed

No matching CSC module found #2642

totaam opened this issue Mar 13, 2020 · 13 comments
Assignees
Labels
bug Something isn't working encoding v3.0.x
Projects

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 13, 2020

Issue migrated from trac ticket # 2642

component: client | priority: minor

2020-03-13 14:37:02: stdedos created the issue


Log output is too massive, attaching it.

No idea what caused it, since it didn't cause any disruption (apart from the looming #2617).

This would be my most massive usage of xpra client to-date;

                                        Xpra top 3.0.7-25609
Xpra GTK3 X11 server 64-bit
xpra top - 16:32:13 up 1 day, 6:42:46,  1 users, load average: 1.52, 2.19, 2.12
8 threads
cursor at 2030x358

 ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
 │Python/GTK3 client version 4.0-[r25603](../commit/772e6a7edbcdfd1b09b16a5c0863669aa8286e56)                                                             │
 │batch delay: 994 (909)                                                                            │
 │latency: 0 (0)                                                                                    │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘

5 windows
 ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
 │quartz@h: ~                                                                                       │
 │1920x1002 at 1600,23 - gravity=1, base-size=(12, 50), minimum-size=(298, 79), increment=(9, 17)   │
 │focused, maximized                                                                                │
 │NORMAL                                                                                            │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
 │Terminal                                                                                          │
 │166x158 at 1601,79                                                                                │
 │grabbed, override-redirect                                                                        │
 │POPUP_MENU                                                                                        │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
 │2020-Mar.xlsx - LibreOffice Calc                                                                  │
 │1920x1017 at 1600,23 - gravity=10, base-size=(0, 0), minimum-size=(136, 39)                       │
 │maximized                                                                                         │
 │NORMAL                                                                                            │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
 │atf â   qwertyuiop[asdfghjkl;cvbnmk,l;fghjkl                                                      │
 │1920x1017 at 1600,23 - gravity=1, minimum-size=(324, 39), position=(2141, 74)                     │
 │hidden, iconic                                                                                    │
 │NORMAL                                                                                            │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
 │LibreOffice 6.4                                                                                   │
 │1x1 at -99,-99                                                                                    │
 │override-redirect                                                                                 │
 │NORMAL                                                                                            │
 └──────────────────────────────────────────────────────────────────────────────────────────────────┘
@totaam
Copy link
Collaborator Author

totaam commented Mar 13, 2020

2020-03-13 14:37:52: stdedos uploaded file xpra-client-console.txt (181.7 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Mar 13, 2020

Weird, we're using video for a 2x16 area:

Error: no matching CSC module found
 for 2x16 GBRP source format,
 to 2x16 BGRA or BGRX or RGBA or RGBX or BGR or RGB

@totaam
Copy link
Collaborator Author

totaam commented Mar 14, 2020

That's very strange, we already had code that prevents using video regions for small areas:

        if cww*cwh<=MAX_NONVIDEO_PIXELS:
            return nonvideo(quality+30, "window is too small")

And the default value:

MAX_NONVIDEO_PIXELS = envint("XPRA_MAX_NONVIDEO_PIXELS", 1024*4)

So it should not have been possible to use a video encoding for 2x16, unless you somehow forced it with command line options or environment variables?

r25632 will ensure we never bother using video for anything smaller than 16 pixels in width or height, since not all CSC modules can handle very small sizes.
The correct fix would be to add a new capability so the client can tell the server what the minimum size requirements really are, but since all the CSC modules we have support at least 8, I didn't bother.

It would be interesting to see why we ended up choosing video for such add odd looking window region.

Do you know which window triggered it? (r25633 will show the window id in the exception message from now on)

@totaam
Copy link
Collaborator Author

totaam commented Mar 14, 2020

2020-03-14 18:22:07: stdedos commented


(..)
So it should not have been possible to use a video encoding for 2x16, unless you somehow forced it with command line options or environment variables?

I am trying to keep my changes in the console and in one configuration file, and as minimal as possible. I am inclining to say no (the changes required here are already complex enough to inadvertently apply them).

(..)
Do you know which window triggered it? (r25633 will show the window id in the exception message from now on)

No, unless things "complain violently", a lot of things go on auto-pilot.
I will have at least one more big session coming up, and I think client betas are already out. Fingers crossed.

@totaam
Copy link
Collaborator Author

totaam commented Mar 20, 2020

2020-03-20 10:07:04: stdedos commented


I cannot re-trigger it.

No client or server log is found to contain 'no csc module found' 😕

Found it (see attachment, the spam is SO MUCH)

@totaam
Copy link
Collaborator Author

totaam commented Mar 23, 2020

2020-03-23 15:45:26: stdedos uploaded file redact-xpra-2604-200.log (344.2 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Mar 27, 2020

2020-03-27 12:27:28: stdedos uploaded file csc-2.txt (793.5 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Apr 1, 2020

2020-04-01 14:20:58: stdedos commented


If you are using JetBrains products (Find !Action/File/Symbol, toast notifications, hovers e.g. commit message from Annotations) or Sublime Merge, you'll definitely hit this one.

Maybe this is somewhat helpful. From RubyMine:

2020-04-02 10:55:39,180 [   8465]   WARN - openapi.wm.impl.ToolWindowImpl - ToolWindow icons should be 13x13. Please fix ToolWindow (ID:  Problems View) or icon jar:file:~/.local/share/JetBrains/Toolbox/apps/RubyMine/ch-0/201.6251.5/lib/icons.jar!/general/warning.svg 

@totaam
Copy link
Collaborator Author

totaam commented Apr 23, 2020

ToolWindow icons should be 13x13
This could be because MS Windows simply cannot create very small non-OR windows. If that's the case, then it won't occur with macos or Linux clients.

This may cause problems with some applications.

  • it's very hard to fix (we would need to detect such a case and lie to the server about the window geometry, then fill the rest of the window with black or white)
  • applications should handle such cases more gracefully (some window managers may choose to use whatever window size they see fit - the request applications send is just that: a request, it may not be honoured)

@totaam
Copy link
Collaborator Author

totaam commented May 28, 2020

2020-05-28 06:01:35: antoine commented


Also reported elsewhere: #2780

@totaam
Copy link
Collaborator Author

totaam commented Nov 6, 2021

Not seen this, closing.

Let's re-open if it happens again.

@totaam totaam closed this as completed Nov 6, 2021
@totaam totaam reopened this Nov 7, 2023
@totaam
Copy link
Collaborator Author

totaam commented Nov 7, 2023

And I have a reproducer:

  • wayland desktop session (so more limited nvidia codecs?): python3.12 /usr/bin/xpra seamless --bind-tcp=0.0.0.0:10000 --no-daemon -d compress --start=xterm
  • wayland client: python3.12 /usr/bin/xpra attach --opengl=no --remote-logging=no --mmap=no
  • run glxspheres
ValueError: no csc module found for wid 3 YUV420P(1240x900) to \
BGRX or RGBX or BGR or RGB or r210 or BGR565(1240x900) in \
    {'BGRX': {
        'YUV420P': [cython(BGRX to YUV420P), libyuv(BGRX to YUV420P)],
        'NV12': [libyuv(BGRX to NV12)]
    }, 'RGBX': {
        'YUV420P': [cython(RGBX to YUV420P)]
    }, 'BGR': {
        'YUV420P': [cython(BGR to YUV420P)]
    }, 'RGB': {
        'YUV420P': [cython(RGB to YUV420P)]
    }, 'YUV420P': {
        'RGB': [cython(YUV420P to RGB)], 'BGR': [cython(YUV420P to BGR)],
        'RGBX': [cython(YUV420P to RGBX)], 'BGRX': [cython(YUV420P to BGRX)]},
        'GBRP': {'RGBX': [cython(GBRP to RGBX)], 'BGRX': [cython(GBRP to BGRX)]
    }, 'r210': {
        'YUV420P': [cython(r210 to YUV420P)], 'BGR48': [cython(r210 to BGR48)],
        'YUV444P10': [cython(r210 to YUV444P10)]
    }, 'YUV444P10': {
        'r210': [cython(YUV444P10 to r210)]}, 'GBRP10': {'r210': [cython(GBRP10 to r210)]},
        'NV12': {'RGB': [libyuv(NV12 to RGB)], 'BGRX': [libyuv(NV12 to BGRX)],
        'RGBX': [libyuv(NV12 to RGBX)]
    }
}

The encoder should be using YUV420P subsampling so that the openh264 decoder can handle it.

totaam added a commit that referenced this issue Nov 8, 2023
@totaam
Copy link
Collaborator Author

totaam commented Nov 8, 2023

Closing again. python3.12 was not relevant, but running without opengl was. (was happening more readily under wayland until abc5902)
It turns out that there was a bug in the instantiation of the csc modules:

Error: failed to create csc instance <class 'xpra.codecs.csc_cython.converter.Converter'>

Fixed in the commit above.
So there was a discrepancy between what the client was telling the server it could handle, and what it could actually handle.
I suspect that the original issue was similar.

@totaam totaam closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working encoding v3.0.x
Projects
codecs
Low Priority
Development

No branches or pull requests

1 participant