Segmentation fault during shutdown on WSL
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 2.2k
- Fork
- 242
- Merge medio
- 11m
- PR unite (30g)
- 1
Descrizione
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...
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riprodurre il crash durante lo spegnimento su WSL con il programma C++ fornito, concentrandosi sulla quantità scalare abilitata. Iniziare da gl_engine.cpp, in GLTextureBuffer::~GLTextureBuffer(), dove viene segnalato che glDeleteTextures non riesce; il lavoro è completo quando la chiusura della finestra non causa più un segmentation fault, anche quando viene usato setEnabled(true).
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- computer-graphics
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100