Reproducible crash with get_typeof when using Lua5.4
まだ誰も着手していません。
評価
調査の方向性
Start by reading Image_method:get_typeof(name) and the voperation.call implementation; the issue points to the call to vips_lib.vips_image_get_typeof(self.vimage, name) and reproductions using Image.xyz, new_from_file, and bandjoin. Investigate garbage collection behavior under Lua 5.4 and compare it with Lua 5.2, 5.3, and LuaJIT. Done means the reproductions no longer crash under Lua 5.4 without relying on stopping and restarting garbage collection.
索引モデルが issue の本文から書いたものです。
説明
When executing this script via lua5.4 typeof.lua I get a crash every time with the following typeof.lua script:
local vips = require "vips"
local im = vips.Image.xyz(1,1)
print(im:get_typeof("width"))
It doesn't crash with Lua 5.2, Lua 5.3 or Luajit. It also crashes in the interpreter when I enter the commands on one line like this:
Lua 5.4.8 Copyright (C) 1994-2025 Lua.org, PUC-Rio
> vips = require "vips"
> im = vips.Image.xyz(1,1); print(im:get_typeof("width"))
Ungültiger Maschinenbefehl (Speicherabzug geschrieben)
This issue (like others in the past) can be fixed by stopping and restarting garbage collection during the call to
vips_lib.vips_image_get_typeof(self.vimage, name)
in function Image_method:get_typeof(name). But there must be a better fix for these issues.
The crash also happens when I create the image with a different method that uses voperation.call, i.e.
im = vips.Image.new_from_file("filename.jpg")
or
im = vips.Image.new_from_array {0}
im = im:bandjoin(im)
In the latter example the second line is needed to create the crash. The first line doesn't use voperation.call, but calls vips_image_new_matrix_from_array directly.
I guess there is something wrong regarding garbage collection in voperation.call. It only shows up in Lu5.4 because of the more aggressive garbage collection.
- 主要言語
- Lua
- スター
- 151
- フォーク
- 10
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
libvips/lua-vips のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
question
難易度 3/5 1〜2日 初心者へのやさしさ 32/100
-
question
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
libvips/lua-vips の issue をすべて見る
似ている issue
-
follow-up needs-review
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ksysoev/duet.nvim#310 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bug discord triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
fitzforge/polestar#5203 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100