CGAL / cgal

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

`QOpenGLContext::functions()`, the d-pointer is null (was QScopedPointer exception) #8209

Closed 271812697 closed 4 months ago

271812697 commented 4 months ago

Please use the following template to help us solving your issue.

Issue Details

I build CGAL with Cmake,After building, all project concerning with Qt will appear exception,for example when i run AABB_demo, an exception occurs as follow

Picture

异常

Environment

lrineau commented 4 months ago

Hi buranya (@271812697), from what I can see, and guess, from your issue report, the error is probably on your side. It seems you generated a Visual Studio project, using CMake, as it should be. Probably from CGAL-5.6.1, but I am not sure.

We need the following information, to help you:

Environment

271812697 commented 4 months ago

Thank you so much,I compile CGAL with following environment:

Environment

The projects concerning with Qt compile successfully,but will occur exception,the stack is as following: image image

image

lrineau commented 4 months ago

@CGAL/geometryfactory I see in the stack of the error that it is probably QOpenGLContext::functions() that is called on an QOpenGLContext that is not correctly initialized (because its d-pointer is null).

@271812697 It seems to be related to your OpenGL driver, and the way the CGAL application does not initialize the Qt6 OpenGL support correct. Do you have a way to tell us more about your OpenGL driver?

That would help us.

lrineau commented 4 months ago

@271812697 Thanks for the information. There is an issue, though: you mention that you are use CGAL-5.6.1, and Qt-6.7.0. However, CGAL-5.6.1 is not compatible with Qt6, but only with Qt5. Can you please verify?

271812697 commented 4 months ago

Thank you so much,as you say, This exception is indeed caused by the incompatibility of the Qt version. When I changed the Qt version, the problem was solved!