Segmentation fault during shutdown on WSL
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- cpp
调研方向
使用提供的 C++ 程序在 WSL 上复现关闭时的崩溃,重点关注已启用的标量量。从 gl_engine.cpp 中的 GLTextureBuffer::~GLTextureBuffer() 开始,该处报告 glDeleteTextures 失败;当关闭窗口不再导致段错误时即表示完成,包括使用 setEnabled(true) 的情况。
由索引模型根据 Issue 内容生成。
描述
I have this simple program:
#include <polyscope/polyscope.h>
#include <polyscope/surface_mesh.h>
int main()
{
polyscope::init();
std::vector<std::array<double, 3>> vertices{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}};
std::vector<std::array<int, 3>> faces{{0, 1, 2}};
std::vector<double> scalars{0.0, 1.0, 2.0};
polyscope::registerSurfaceMesh("my mesh", vertices, faces);
polyscope::getSurfaceMesh("my mesh")->addVertexScalarQuantity("my_scalar", scalars)->setEnabled(true);
polyscope::show();
}
I'm running it on WSL, backend:
[polyscope] Backend: openGL3_glfw -- Loaded openGL version: 4.1 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3
Polyscope is at the latest master version (except the very latest commit which breaks compilation btw).
The program runs fine, but when I close the window, I get
Segmentation fault (core dumped)
I debugged into it and the crash happens at gl_engine.cpp, in the destructor of GLTextureBuffer:
GLTextureBuffer::~GLTextureBuffer() {
glDeleteTextures(1, &handle);
}
The call to glDeleteTextures is still reached, and the crash seems to happen within it. I verified that handle is a reasonable-looking number (34 in my case). If I remove setEnabled(true) and don't manually enable the scalar field either, the crash goes away. Let me know if I can provide any more info to debug this...
- 主要语言
- C++
- 星标
- 2.2k
- 派生
- 242
- 平均合并
- 11 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nmwsharp/polyscope 的其他 Issue
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
难度 5/5 一周以上 新手友好度 30/100
-
Rust Version 未关闭
难度 5/5 一周以上 新手友好度 15/100
-
enhancement
难度 5/5 一周以上 新手友好度 20/100
查看 nmwsharp/polyscope 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
brave/brave-browser#59300 ·
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main 未关闭ai_reviewed
难度 2/5 1-3 小时 新手友好度 70/100
ydb-platform/ydb#53974 · 3 条评论 ·