Intermittent undefined hook removal assertion during cleanup

Aperta
#4,396 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@baphomello ci sta già lavorando.

Dal 21/11/2026.

  • #4399 di @baphomello — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
perl
Ambito
testing

Direzione di ricerca

Start by reading src/Utils/ObjectList.pm (remove/clear) to see where the assertion is raised, then src/Plugins.pm (delHook) and src/InventoryList.pm (DESTROY) for the call chain. Try to reproduce with make test and, since it is intermittent, consider running the suite repeatedly or with a random test order. Note that pull request #4399 is already open against this issue, so coordinate there before writing code; done means the undefined handle is traced and the test command exits nonzero on a cleanup assertion.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Openkore version git

OpenKore git development tree; exact commit at the time of the warning was not recorded

XKore Mode

Empty

RO Server Name

N/A — unit tests; no Ragnarok server was involved

Link to RO server

N/A — unit tests; no server link applies

Result

During one execution of OpenKore's unit test suite, the TAP plan completed with all 1,923 tests passing, then Perl emitted:

(in cleanup) Assertion (Can't remove undefined item) failed!

The test runner returned exit code 0 despite the cleanup assertion. The warning appeared once and did not recur in four subsequent runs on either the development branch or its unchanged base. There is no confirmed reproduction sequence or root cause.

This was noticed while validating unrelated XSTools compatibility work. The cleanup code described below was unchanged by that work. No gameplay impact has been confirmed.

Potentially relevant current code:

  • src/InventoryList.pm, InventoryList::DESTROY, invokes Plugins::delHook for stored hook handles before clearing the list.
  • src/Plugins.pm, Plugins::delHook, gets an entry by saved hook index and passes it to remove without a defined check.
  • src/Utils/ObjectList.pm, ObjectList::remove, asserts that the item is defined using the observed assertion text.

This code relationship is worth investigating, but it does not establish that this path caused the observed warning. Possible explanations include stale hook handles, duplicate removal, an invalidated index, or object destruction order.

Related history:

This report does not attribute the warning to macOS, Apple Silicon, a particular Perl version, or XSTools.

Relevant Log Output
(in cleanup) Assertion (Can't remove undefined item) failed!
Expected Result

Ideally, test cleanup should complete without this assertion. If a cleanup assertion does occur, the test command should report failure with a nonzero exit status so automation does not silently pass.

How to Reproduce

The issue is intermittent and no deterministic reproduction is known. In one make test execution, all 1,923 TAP tests passed, then the cleanup assertion appeared and the command returned exit code 0. It did not recur in four subsequent runs on either the development branch or its unchanged base.

Lingua principale
Perl
Stelle
1.5k
Fork
1.2k
Merge medio
11h
PR unite (30g)
110

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenKore/openkore

Tutte le issue di OpenKore/openkore

Issue simili

Altre issue su Perl

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.