CGAL / cgal

The public CGAL repository, see the README below
https://github.com/CGAL/cgal#readme
Other
4.67k stars 1.35k forks source link

Simple drawing fails with Qt6 6.7.1 #8232

Open efifogel opened 1 month ago

efifogel commented 1 month ago

Issue Details

Issue #8058 is very similar, it reported that simple drawing did not work with 6.8. It also reported on some problems with find_package of CGAL with Qt6. The latter was fixed, and it turned out that 6.8 hasn't been officially published, so it was closed. However, it makes me think that the same reason that caused the segmentation with 6.8 is also the reason for the segmentation with 6.7. (This piece of info may be useless...)

All the example programs that use the simple drawing mechanism end with a segmentation fault, e.g., Polygon/draw_polygon, Arrangement_2/draw_arrangement, Surface_mesh/sm_draw_small_faces. Other programs that are based on Qt6 work fine. This is, of course, not a proof that the problem is in our code, but it's suspicious.

I've experienced the same behavior on two separate machines running Ubuntu 22.04.

Here is the trace of the stack: stack_qt_issue.txt

Source Code

Environment

lrineau commented 1 month ago

The stack looks strangely similar to https://github.com/CGAL/cgal/issues/8209.

lrineau commented 1 week ago

Actually, I now have exactly the same issue on my Linux machine (with Qt 6.7.1 as well). For all examples involving the basic viewer, I have a segfault. The issue is that QOpenGLContext::currentContext() returns a null pointer.

gdamiand commented 1 week ago

I have no problem with Qt 6.2 nor 6.4.