nmwsharp / nmwsharp/polyscope

crash while running polyscope under WSL

Open
#171 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.2k
Forks
242
Avg merge
11m
Merged PRs (30d)
1

Description

A colleague is trying to use Polyscope (via the Python wrappers) under WSL and it crashes in init when indirect rendering isn't disabled (I've been using it under Linux where it works great). The package has just been installed via pip and hence is using version 1.3.1 under Python 3.8.

>>> import polyscope as ps
>>> ps.init()
GLFW emitted error: GLX: Failed to create context: GLXBadFBConfig
GLFW emitted error: Cannot set swap interval without a current OpenGL or OpenGL ES context

This is immediately followed by a crash in glfwSetWindowPos. Running under GDB suggests this crash is unrelated and just due to not checking return of glfwCreateWindow for a nullptr:

https://github.com/nmwsharp/polyscope/blob/8e692da5a50c4da8b0dedaf941e1f2cef335fa11/src/render/opengl/gl_engine.cpp#L1679-L1682

These issues seem to be caused by indirect rendering imposing a hard limit of OpenGL version 1.4. This precludes most of the newer features Polyscope requires, hence the GLXBadFBConfig error.

I can create a pull request for the crash, but wondering if anyone has any suggestions about getting it using a GPU under Windows 10?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Python 3.8 Polyscope 1.3.1 ps.init() failure under WSL and inspect src/render/opengl/gl_engine.cpp at lines 1679-1682. Check the reported glfwCreateWindow failure path and the indirect-rendering limitations; done should mean the WSL case no longer crashes and its supported rendering behavior is documented or handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
computer-graphics, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.