xpra icon
Bug tracker and wiki

Opened 6 months ago

Last modified 3 months ago

#2738 assigned defect

win32_NotifyIcon.py", line 174, in make_ICONINFO

Reported by: stdedos Owned by: Antoine Martin
Priority: minor Milestone: 4.1
Component: client Version: 3.0.x
Keywords: Cc:

Description (last modified by stdedos)

xpra cannot stop spamming:

2020-04-20 12:56:16,496 Error: failed to set tray icon
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 174, in make_ICONINFO
OSError: [WinError 8] Not enough memory resources are available to process this command.

I must say I have 8GB available RAM already (total of 16GB)

and, after I accidentally (again) turned off my DP monitor:

_create_dc_and_bitmap: The parameter is incorrect.
2020-04-20 13:29:10,207 Error: failed to set tray icon
Traceback (most recent call last):
  File "E:\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 164, in make_ICONINFO
  File "E:\Xpra\trunk\src/xpra/platform/win32/win32_NotifyIcon.py", line 206, in rgb_to_bitmap
AssertionError: failed to create DIB section

and client is frozen. Reconnecting works.

Attachments (9)

xpra-2738.txt (540.3 KB) - added by stdedos 6 months ago.
Xpra_cmd.exe.18032.dmp.7z (441.3 KB) - added by stdedos 6 months ago.
redact-xpra-client-2738-verbose.log (751.6 KB) - added by stdedos 6 months ago.
xpra-2738-client.v2.log (70.5 KB) - added by stdedos 6 months ago.
Xpra_cmd.exe.7904.v2.dmp.7z (443.6 KB) - added by stdedos 6 months ago.
xpra-2732-client-stack.v3.log (9.9 KB) - added by stdedos 6 months ago.
Xpra_cmd.exe.7764.v3.dmp.7z (441.2 KB) - added by stdedos 6 months ago.
tray-icons_2020-04-20_20-24-06.png (12.2 KB) - added by stdedos 6 months ago.
redact-xpra-2738-client-almost_full.log (361.4 KB) - added by stdedos 6 months ago.

Change History (25)

Changed 6 months ago by stdedos

Attachment: xpra-2738.txt added

comment:1 Changed 6 months ago by stdedos

Description: modified (diff)

comment:2 Changed 6 months ago by Antoine Martin

Owner: changed from Antoine Martin to stdedos

I have no idea why it does that. I guess it could be some sort of resource leak.

Later on in the log there's this:

../gtk+-3.24.16/gdk/win32/gdkcursor-win32.c:1025: ...

So I guess this could be in the cursor code.

The first one is a call to CreateIconIndirect.
The second one is a call to CreateDIBSection.

r26149 + r26150 improves the diagnostics.

Can you reproduce with -d tray enabled?
Is this a recent regression?
This could be related to r26118 and convert PIL.Image to GdkPixbuf, then load into GtkImage -- crash Windows if image too large

Changed 6 months ago by stdedos

Attachment: Xpra_cmd.exe.18032.dmp.7z added

comment:3 Changed 6 months ago by stdedos

And the cherry on the top: ^^^

Downloaded the new version now, "installing" ...

FWIW: My good cherry-pick suggestion would be r25898

Last edited 6 months ago by stdedos (previous) (diff)

Changed 6 months ago by stdedos

comment:4 Changed 6 months ago by Antoine Martin

There are lots of TypeError: %x format: an integer is required, not NoneType in that log sample, that's fixed in r26152.

Was that log sample complete or trimmed down? Does it really fail with every call to CreateIconIndirect or does it start failing after a while?

The log now shows the complete method call: set_icon_from_data('1024 pixels', True, 16, 16, 64, {b'rgb_format': 'RGBA', 'encoding': 'rgb32'}) including the actual data on the next log statement (rgb_to_bitmap(b"\x00\...")). There's nothing suspicious at all there.

comment:5 in reply to:  4 ; Changed 6 months ago by stdedos

Was that log sample complete or trimmed down? Does it really fail with every call to CreateIconIndirect or does it start failing after a while?

Complete to Window's Terminal buffer size - but that was more than full.
The issue appears randomly, and it's invisible for a long time (except that one core, which also came out of the blue). Getting a complete log is complicated

Last edited 6 months ago by Antoine Martin (previous) (diff)

comment:6 Changed 6 months ago by stdedos

Owner: changed from stdedos to Antoine Martin

You may appreciate this invocation instead: (However, no -d tray :/)

Changed 6 months ago by stdedos

Attachment: xpra-2738-client.v2.log added

Changed 6 months ago by stdedos

Attachment: Xpra_cmd.exe.7904.v2.dmp.7z added

comment:7 Changed 6 months ago by stdedos

As a side question - why so many refreshes? I think the apps I am using are not updating their application icons (nor have they demostrated "smart" techniques so far like e.g. updating their icon like updating website's favicon with unread status.

comment:8 Changed 6 months ago by stdedos

Also, a stacktrace with its core (sadly, no r26152 :/)

Changed 6 months ago by stdedos

Changed 6 months ago by stdedos

Attachment: Xpra_cmd.exe.7764.v3.dmp.7z added

comment:9 in reply to:  7 Changed 6 months ago by stdedos

Replying to stdedos:

As a side question - why so many refreshes? I think the apps I am using are not updating their application icons (nor have they demostrated "smart" techniques so far like e.g. updating their icon like updating website's favicon with unread status.

Okay, I found my "smart" app: VMWare (14 Pro) started a tray icon. idk why, but it would seem it has such capabilities
I would close it now, but maybe I'll wait until this is fixed.

Nowadays, I keep seeing this tray icon

with no right-click menu or anything.

Changed 6 months ago by stdedos

comment:10 Changed 6 months ago by Antoine Martin

why so many refreshes?

That's because we need the position of the systray on the client side to place it exactly in the same location on the server side (so clicks will actually land on it).
But the API often does not give us the position of the systray, only its size, so we use the pointer events when the pointer is hovering over the systray to guess where it is located.
Every time we get one of those pointer events, we re-calculate the systray geometry, and if the new value differs then we send the new geometry to the server so it can adjust its position. When we do that, the systray window will send a repaint.

with no right-click menu or anything.

Maybe we guess the geometry wrong, so your clicks aren't landing on it..

comment:11 Changed 6 months ago by stdedos

As you can notice, that tray icon ends up in the hidden tray icon section.

And now that I've said that, "tray icon" is a weird notion in Linux (Ubuntu) which feels ... odd.

comment:12 Changed 6 months ago by stdedos

Issue looks like "spontaneous combustion" to me.

I included a bit of "clean" invocations and then the error ones come (at-the-time, it had also cored)

Last edited 6 months ago by stdedos (previous) (diff)

Changed 6 months ago by stdedos

comment:13 in reply to:  5 Changed 6 months ago by stdedos

Replying to stdedos:

Complete to Window's Terminal buffer size - but that was more than full.
The issue appears randomly, and it's invisible for a long time (except that one core, which also came out of the blue). Getting a complete log is complicated

#2642 is mainly to blame for that buffer-filling

comment:14 Changed 6 months ago by stdedos

This seems more of a systematic failure happening with VMWare tray, since I have to / must restart my client ~5 times daily.

If you are blocked for any reason and cannot investigate, I would appreciate the tip, so I can workaround it (i.e. kill VMware tray)

comment:15 Changed 6 months ago by Antoine Martin

Milestone: 4.04.1
Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

This seems more of a systematic failure happening with VMWare tray...

I'll try to install vmware in a VM when I get a chance.

comment:16 Changed 3 months ago by Antoine Martin

Duplicate: #2847.

Note: See TracTickets for help on using tickets.