View previous topic :: View next topic |
Author |
Message |
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Wed Oct 22, 2008 3:04 pm Post subject: Derelict and QtOpengl segfolt together. |
|
|
Started wrapping some Qt functionality - for some reason when creating and displaying Qt openGL widget when derelict libraried are linked(even not loaded) program segfolts. Can somebody point where can be the issue? |
|
Back to top |
|
|
Cyborg16
Joined: 28 Apr 2007 Posts: 39
|
Posted: Fri Nov 07, 2008 5:27 am Post subject: |
|
|
I guess you've solved it? I doubt anyone could help without more info anyway. |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Sat Nov 22, 2008 11:02 am Post subject: |
|
|
Actually not. I simply export (C) couple of opengl functions and manually linked my app with opengl libs. I guess derelict opengl context conflicts in some way with that of Qt. I am now working on Qt port, I am going to work on this problem later. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Nov 22, 2008 8:52 pm Post subject: |
|
|
eldar wrote: | I guess derelict opengl context conflicts in some way with that of Qt.. |
Derelict doesn't create an OpenGL context. All it does is load the functions into the application's address space, the same that happens when you link directly with the OpenGL library. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Sat Feb 07, 2009 10:59 pm Post subject: |
|
|
with pre-release of qtd I was able to check once again - and the problem is still there. What can be the cause of this problem and what additional information should I provide, that it can be solved? |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sun Feb 08, 2009 4:50 am Post subject: |
|
|
The command line you use to compile will be helpful, for starters. Also, does the segfault occur before or after calling any OpenGL functions?
If I were to take a wild guess, it would be that the OpenGL library is getting linked in at compile time. Linking with libraries that Derelict loads has been known to cause crashes (and isn't necessary anyway). That's just a guess, though. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Sun Feb 08, 2009 5:49 am Post subject: |
|
|
I use DSSS, build flags are something like this:
-L-ldl -L-lQtGui -L-lQtCore -L-lQtOpenGL
Segfault occurs before windows are created, most likely it happens during DerelictGL.load(); DerelictGLU.load();
There is no crash if I don't link against libQtOpenGL of course. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Mon Feb 09, 2009 9:59 pm Post subject: |
|
|
eldar wrote: | There is no crash if I don't link against libQtOpenGL of course. |
Which means that libQtOpenGL links to OpenGL. And I assume that this library is necessary in order to create an OpenGL context in Qt. Correct? This problem doesn't occur when using DerelictGL with SDL because SDL doesn't link with OpenGL, but rather loads the functions needed at runtime.
I don't know how to solve it. It's a known issue that has been reported with multiple Derelict packages when a bound library is linked with the executable. On the surface, it appears to be a fundamental problem with shared objects on Linux, or at least with the libdl API. Unless there's some command line option that can be used during link time to avoid this problem, the only workaround I can see is to use a different binding, one that doesn't load OpenGL manually. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Sat Feb 21, 2009 6:31 pm Post subject: |
|
|
but maybe it is possible to add a switch to Derelict so that it doesn't load a library, and only loads symbols. This could be not a default behaviour of course, but rather an option. Is it possible? |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Feb 21, 2009 11:55 pm Post subject: |
|
|
eldar wrote: | but maybe it is possible to add a switch to Derelict so that it doesn't load a library, and only loads symbols. This could be not a default behaviour of course, but rather an option. Is it possible? |
You need a library handle in order to load symbols from it. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Fri Mar 13, 2009 8:15 pm Post subject: |
|
|
eldar wrote: | I simply export (C) couple of opengl functions |
I missed this part before. Why are you doing this? Which functions are you exporting? Derelict already provides the opengl function declarations, so if you are exporting functions and attempting to call those, that might be the problem. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Sat Mar 14, 2009 6:16 am Post subject: |
|
|
I export them in order to get something working because I can't use derelict
If you want to play, installation of QtD on linux is not that difficult. You will need Qt 4.4 for that. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Mar 14, 2009 10:53 am Post subject: |
|
|
eldar wrote: | If you want to play, installation of QtD on linux is not that difficult. You will need Qt 4.4 for that. |
Yeah, well. I have yet to get Tango properly set up on my Ubuntu partition. I'll give it another go next week, I suppose. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
eldar
Joined: 14 Jun 2008 Posts: 101 Location: Ufa, Russia
|
Posted: Wed Mar 18, 2009 5:08 pm Post subject: |
|
|
You could also try QtD on windows, it works to the same extent as on linux. You will need Qt 4.4.3 for that and mingw 3.81 |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
|
Back to top |
|
|
|