Reproducible crash with get_typeof when using Lua5.4
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Lua
- Estrelas
- 151
- Forks
- 10
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de libvips/lua-vips
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
add something like `mutable`Abertaenhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
question
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 32/100
-
Usage with OpenResty?Abertaquestion
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
Todas as issues de libvips/lua-vips
Issues semelhantes
-
follow-up needs-review
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
ksysoev/duet.nvim#310 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
LUA error since patch 12.1.7Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Jaliborc/PetTracker#509 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
bug discord triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
fitzforge/polestar#5203 · 1 comentário ·
Mantenedores costumam responder em até 1 dia