Nemo Preview PNG loading Bug
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 68/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- javascript
- Domaine
- desktop
Piste de recherche
Commencez par nemo-preview/js/ui/mainWindow.js et nemo-preview/js/ui/mimeHandler.js, en vous concentrant sur le chemin asynchrone des informations de fichier et sur la valeur nulle passée à Gio.content_type_is_a(). Reproduisez le problème avec un PNG sur CIFS/SMB et comparez-le avec un aperçu local ou un aperçu JPEG. Le travail est terminé lorsque les aperçus PNG ne restent plus sur "Loading..." et que l’erreur de type de contenu nul est résolue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
nemo-preview: PNG files on CIFS/SMB shares remain stuck on "Loading..."
Distribution
Linux Mint 22.3 Zena, Cinnamon
Package versions
nemo:
Installed: 6.6.3+zena
nemo-preview:
Installed: 6.6.0+zena
cjs:
Installed: 115.1+zena
Bug description
Nemo Preview fails to display PNG files located on a network share.
When a PNG file on a CIFS-mounted NAS share is selected in Nemo and the Spacebar is pressed, the Nemo Preview window opens but remains indefinitely on:
Loading...
JPEG files in the same directory on the same network share preview correctly.
The same PNG file works correctly when copied to a local filesystem such as /tmp and previewed from Nemo using the Spacebar.
The issue can also be reproduced when accessing the NAS through smb:// in Nemo instead of the kernel CIFS mount.
Network mount
The share is mounted using CIFS:
//ds725_nas.local/home on /mnt/nas-home type cifs
Relevant mount options include:
rw,relatime,vers=3.0,cache=strict,
uid=1000,forceuid,gid=1000,forcegid,
soft,nounix,serverino,mapposix,reparse=nfs,
nativesocket,rsize=4194304,wsize=4194304,
actimeo=1,_netdev,x-systemd.automount
Steps to reproduce
- Mount an SMB/CIFS share.
- Open the share in Nemo.
- Select a PNG file.
- Press Spacebar.
- Nemo Preview opens but remains on "Loading...".
- Select a JPEG file in the same directory.
- Press Spacebar.
- The JPEG preview works correctly.
- Copy the PNG file to
/tmp. - Open
/tmpin Nemo and press Spacebar on the PNG. - The PNG preview now works correctly.
The same problem also occurs when accessing the share directly through:
smb://server/share
Expected behavior
PNG files on SMB/CIFS shares should preview in the same way as PNG files stored locally and JPEG files stored on the same network share.
Actual behavior
PNG files on the network share remain indefinitely on "Loading...".
Relevant journal output
When attempting to preview the PNG from Nemo:
GFileInfo created without standard::content-type
file ../../../gio/gfileinfo.c: line 1821
(g_file_info_get_content_type): should not be reached
JS ERROR: Error calling prepare() on viewer:
Error: Argument type may not be null
getObject@/usr/share/nemo-preview/js/ui/mimeHandler.js:74:25
_createRenderer/<@/usr/share/nemo-preview/js/ui/mainWindow.js:332:71
run@/usr/share/nemo-preview/js/ui/main.js:57:24
@../src/main.c:2:6
The relevant code in mainWindow.js is:
this._pendingRenderer =
this._mimeHandler.getObject(this._fileInfo.get_content_type());
and mimeHandler.js subsequently calls:
Gio.content_type_is_a(mime, key)
where mime appears to be null.
MIME type tests
Outside nemo-preview, GIO correctly identifies the network PNG:
$ gio info -a standard::content-type "CCC.png"
attributes:
standard::content-type: image/png
xdg-mime also identifies the same PNG correctly:
$ xdg-mime query filetype /tmp/CCC.png
image/png
A JPEG on the same CIFS share is also correctly identified:
$ gio info -a standard::content-type "foto 1.jpg"
attributes:
standard::content-type: image/jpeg
PNG decoding test
GdkPixbuf can load the PNG without problems:
from gi.repository import GdkPixbuf
p = GdkPixbuf.Pixbuf.new_from_file("/tmp/CCC.png")
print(p.get_width(), p.get_height())
Output:
4032 3024
The PNG is also correctly identified by file:
PNG image data, 4032 x 3024, 8-bit/color RGBA, non-interlaced
Additional reproduction test
A JPEG that previews correctly was converted locally to a new PNG using GdkPixbuf.
The resulting file:
PNG image data, 2448 x 3264, 8-bit/color RGB, non-interlaced
behaves as follows:
/tmp/test.png→ Spacebar preview works- same
test.pngcopied to the CIFS share → preview remains on "Loading..."
This suggests the problem is not caused by the contents or metadata of a particular PNG.
Troubleshooting already performed
- Reinstalled
nemo-preview. - Logged out/in.
- Tested multiple PNG files.
- Tested newly generated PNG.
- Tested local filesystem versus CIFS.
- Tested kernel CIFS mount.
- Tested direct
smb://access through Nemo. - Verified GdkPixbuf PNG decoding.
- Verified GIO MIME detection.
- Verified xdg-mime detection.
- Verified JPEG preview works on the same network share.
The problem appears to occur specifically when nemo-preview asynchronously retrieves the file information for a PNG located on an SMB/CIFS resource. GFileInfo.get_content_type() unexpectedly returns null even though GIO correctly reports image/png when queried separately.
- Langage dominant
- C
- Étoiles
- 487
- Forks
- 171
- Merge moyen
- 10 j 19 h
- PR mergées (30 j)
- 1
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de linuxmint/nemo-extensions
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
linuxmint/nemo-extensions#592 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 50/100
linuxmint/nemo-extensions#587 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 74/100
linuxmint/nemo-extensions#586 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
linuxmint/nemo-extensions#585 · 1 commentaire ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
linuxmint/nemo-extensions#581 · 4 commentaires ·
Toutes les issues de linuxmint/nemo-extensions
Issues similaires
-
IO.get_env on Node truncates names at embedded NULPeut-être pris @Yi-111-a l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
HigherOrderCO/Bend#1449 · 1 commentaire ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
FujiNetWIFI/fujinet-firmware#1872 ·
Les mainteneurs répondent en général sous 1 jour
-
bug C/C++ code
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
webarkit/WebARKitLib#84 ·
Les mainteneurs répondent en général sous 1 jour
-
Bad device URI "://" on network printers. Printing stopped working between 2.4.19 and 2.4.20Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
OpenPrinting/cups#1751 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
obsproject/obs-studio#14013 ·
Les mainteneurs répondent en général sous 1 jour