Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Nemo Preview PNG loading Bug

オープン
#588 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
desktop

調査の方向性

nemo-preview/js/ui/mainWindow.js と nemo-preview/js/ui/mimeHandler.js から始め、非同期のファイル情報取得パスと Gio.content_type_is_a() に渡される null 値に焦点を当てます。CIFS/SMB 上の PNG で問題を再現し、ローカルのプレビューまたは JPEG のプレビューと比較します。PNG のプレビューが "Loading..." のままにならず、null の content-type エラーが解消されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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
  1. Mount an SMB/CIFS share.
  2. Open the share in Nemo.
  3. Select a PNG file.
  4. Press Spacebar.
  5. Nemo Preview opens but remains on "Loading...".
  6. Select a JPEG file in the same directory.
  7. Press Spacebar.
  8. The JPEG preview works correctly.
  9. Copy the PNG file to /tmp.
  10. Open /tmp in Nemo and press Spacebar on the PNG.
  11. 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.png copied 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.

主要言語
C
スター
486
フォーク
171
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/nemo-extensions のほかの issue

linuxmint/nemo-extensions の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。