cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Simple drawing fails with Qt6 6.7.1

Open efifogel opened this issue 1 year ago • 3 comments

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

  • Operating system Linux, 64 bits):
  • Compiler: g++ 11.4.0
  • Release or debug mode: both
  • Specific flags used (if any):
  • CGAL version: latest
  • Boost version: 1.82
  • Other libraries versions if used (Eigen, TBB, etc.):

efifogel avatar May 28 '24 10:05 efifogel

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

lrineau avatar May 28 '24 10:05 lrineau

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.

lrineau avatar Jun 20 '24 10:06 lrineau

I have no problem with Qt 6.2 nor 6.4.

gdamiand avatar Jun 21 '24 07:06 gdamiand

@efifogel you can test https://github.com/CGAL/cgal/pull/8453

sloriot avatar Sep 02 '24 16:09 sloriot