XnView MP seems to freeze entire desktop, please help interpret logs

Hi everyone,

I am investigating an issue I have when using XnView MP, a non-KDE image viewer. I’m trying to make sure it’s the application that causes my problem.

The problem is that when I close XnView, sometimes basically everything freezes. I can move my mouse pointer around but nothing will react to anything, but everything I do during that freeze will be performed afterwards e.g. files I clicked will open, windows I clicked will activate.

It seems to be related to copy & paste so I suspected the clipboard, something related to huge files in memory, but I can’t really pin it down. There is however something in the journal that I suspect is the freeze and that is the very last line in the following excerpt, which starts when I cropped a photo shortly before closing XnView MP.

Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: XNVIEW restoreGeometry before : 640 480
Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: XNVIEW restoreGeometry after : 1918 1114
Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: ARG[] = /opt/xnviewmp/XnView
Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: ARG[] = /home..REDACTED....jpg
Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: #### onCurrentChanged 0
Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:17 steamdeck-arch xnviewmp[289785]: QThread::setPriority: Cannot set priority, thread is not running
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 33540
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: #### onCurrentChanged 7
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: MyBitmapView :: mousePressEvent
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 79
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 96
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 28574
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 674
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 10  IHDR 13
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 29  pHYs 9
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 3e  tIME 7
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 51  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 205d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 4069  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 6075  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 8081  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: a08d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: c099  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: e0a5  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 100b1  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 120bd  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 140c9  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 160d5  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 180e1  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 1a0ed  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 1c0f9  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 1e105  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 20111  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 2211d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 24129  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 26135  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 28141  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 2a14d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 2c159  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 2e165  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 30171  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 3217d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 34189  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 36195  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 381a1  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 3a1ad  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 3c1b9  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 3e1c5  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 401d1  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 421dd  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 441e9  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 461f5  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 48201  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 4a20d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 4c219  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 4e225  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 50231  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 5223d  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 54249  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 56255  IDAT 8192
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 58261  IDAT 6560
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 100
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 136
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 35337
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 32266
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 31973
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 34044
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 34479
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 7246
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 10413
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 7133
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 7105
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 96
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: BLOB length 6822
Okt 04 00:37:21 steamdeck-arch xnviewmp[289785]: 101  Unregistered schema namespace URI
Okt 04 00:37:26 steamdeck-arch xnviewmp[289785]: QMutex: destroying locked mutex
Okt 04 00:37:26 steamdeck-arch kwin_x11[1074]: XCB error: 3 (BadWindow), sequence: 42123, resource id: 140509191, major code: 129 (SHAPE), minor code: 3 (Combine)
Okt 04 00:37:26 steamdeck-arch kwin_x11[1074]: XCB error: 3 (BadWindow), sequence: 42124, resource id: 140509191, major code: 129 (SHAPE), minor code: 3 (Combine)
Okt 04 00:37:26 steamdeck-arch kwin_x11[1074]: XCB error: 3 (BadWindow), sequence: 42197, resource id: 140509191, major code: 129 (SHAPE), minor code: 3 (Combine)
Okt 04 00:37:26 steamdeck-arch kwin_x11[1074]: XCB error: 3 (BadWindow), sequence: 42198, resource id: 140509191, major code: 129 (SHAPE), minor code: 3 (Combine)
Okt 04 00:37:26 steamdeck-arch xnviewmp[289785]: BLOB length 7812
Okt 04 00:37:26 steamdeck-arch xnviewmp[289785]: ## BaseViewWindow :: ~BaseViewWindow()
Okt 04 00:37:26 steamdeck-arch xnviewmp[289785]: ## BaseViewWindow :: ~BaseViewWindow() ok
Okt 04 00:37:26 steamdeck-arch systemd[931]: app-XnView@281661ccff7b45f7ab8e231eb87d5251.service: Consumed 2.035s CPU time over 9.137s wall clock time, 69.8M memory peak.

I don’t know what consuming CPU time means but it doesn’t sound good to me. Also, I do not understand why XnView is somehow a systemd service. I did not install it as one and systemctl status app-XnView yields an error that the unit was not found.

that “Consumed 2.035s CPU” line at the end is normal. systemd wraps apps launched from the menu as app-XnView@…service so it can track cpu/mem. unit not found after exit is expected.

the line id look at harder is QMutex: destroying locked mutex right before kwin starts spamming BadWindow on SHAPE. that + clicks queuing up til things unfreeze smells like something held the X11 event/clipboard path on close.

id try:
-turn off anything clipboard related in XnView prefs if it has it
-temporarily stop klipper (or whatever clipboard manager) and close XnView again after a crop
-if u can, try the same crop/close on a Plasma Wayland session once and see if it still locks

the unregistered schema / BLOB spam looks like normal image metadata noise to me.

QMutex: destroying locked mutex, looks like Qt mutex was destroyed while still locked, causing a hang.

XnViewMP has issues with clipboard interaction on X11. Try a test in Wayland?

I never used it myself, I remember XnView as a Windows application - and this could well be a huge issue, it’s designed for Windows and then later ported to Qt - so the codebase just isn’t well polished for Linux. It is likely written with Windows clipboard semantics in mind - Windows has a fundamentally different clipboard model.

The best solution could simply be to look at alternatives.

I’m not good at interpreting error messages in terminal output, but I can say I’ve never experienced any problems in using XnView as an alternative image viewer from time to time for its vast options of quick image manipulation if they are missing in firstly KDE’s Gwenview and secondly GNOME’s gThumb.
I use the latest XnView ApImage under Debian.