Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

af.features.Features crashes when its __del__ method is called

未关闭
#268 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api

调研方向

报告的入口点是 af.orb、Features.get_xpos()、Features.get_ypos() 和 Features.del;首先在 Windows 上使用 ArrayFire 3.8.0 运行提供的最小工作示例。跟踪位置数组超出作用域时对象的生命周期,然后验证删除 features 不再导致静默崩溃,并且返回位置的情况仍然有效。

由索引模型根据 Issue 内容生成。

描述

When using a Features() object, arrayfire crashes silently when calling the object's __del__() method if the object's get_xpos() method has already been deleted (or has fallen out of scope).

Potentially due to a similar root case as mentioned in #169 (or due to the changes made as a result of this in commit a9031fb5e0db371bc88c958f0b8d43efd7fe8f45)

Running on Windows; using arrayfire 3.8.0.

Minimum working example:

import arrayfire as af

def get_feature_locations(features):
    # Get x and y positions of features
    x_pos = features.get_xpos()
    y_pos = features.get_ypos()
    
    # If this is uncommented, the code works as intended
    # return x_pos, y_pos

img = af.randn(d0=500, d1=500)
features, descriptors = af.orb(img, threshold=1, max_features=10, num_levels=1)
feature_locations = get_feature_locations(features)

print("Before delete")
del features
print("After delete")

Which outputs:

Before delete

Uncommenting line 10 (return x_pos, y_pos) outputs:

Before delete
After delete

Thanks!

主要语言
Python
星标
422
派生
63
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

arrayfire/arrayfire-python 的其他 Issue

查看 arrayfire/arrayfire-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。