Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ARToolKitNFTCore: calling setupAR2() again leaves markers undetected and leaks the AR2 handle

Aperta
#87 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

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
cpp
Ambito
ar-vr-xr

Direzione di ricerca

Start in ARToolKitNFTCore.cpp at setupAR2(), where the old ar2Handle is overwritten without being freed, and in addNFTMarkers(), which re-applies refDataSetAll. Read ARToolKitNFTCore.h for the documented limitations. Done means a second setupAR2() frees the old handle without leaking, and maintainers have chosen between re-arming detection inside setupAR2() and a separate rearmDetection(). The issue also asks for a re-initialisation scenario in tools/compare-builds.js, which needs maintainer input first.

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

Descrizione

C/C++ code enhancement

Summary

Follow-up to the ARToolKitNFTCore extraction (webarkit/jsartoolkitNFT#683; the core lands in WebARKitLib with the feat/nft-core PR). Two limitations of re-calling setupAR2(), both kept from the original bindings so the refactor stays behaviour-identical, now documented in ARToolKitNFTCore.h:

  1. No detection until the next addNFTMarkers(). setupAR2() recreates the KPM handle (and drops the detector), so the KPM matcher no longer holds the markers already loaded: they are tracked if already locked, but never re-detected. Calling addNFTMarkers({}) re-arms detection (it re-applies the accumulated reference data set), but it returns {}, the same value as a failure.
  2. AR2 handle leak. A second setupAR2() without a setCamera() in between overwrites ar2Handle without deleting it (ARToolKitNFTCore.cpp, setupAR2); with the threaded AR2 variant the old handle's worker threads leak too. The original bindings did the same.

Proposal

  • In setupAR2(), delete an existing AR2 handle before creating the new one (a no-op on the normal flow, where setCamera() already freed it).
  • After recreating the KPM handle, re-apply the accumulated reference data set (refDataSetAll) and recreate the detector, so loaded markers stay detectable; or add an explicit rearmDetection() with a distinct return value.

Both change observable behaviour of the jsartoolkitNFT bindings on a re-initialisation path, so they belong in a release note, and the jsartoolkitNFT comparison tool (tools/compare-builds.js) should be extended with a re-initialisation scenario first.

Lingua principale
C++
Stelle
21
Fork
8
Merge medio
6h 49m
PR unite (30g)
29

Preparare l'ambiente

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 webarkit/WebARKitLib

Tutte le issue di webarkit/WebARKitLib

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.