FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Derelict and QtOpengl segfolt together.
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Wed Oct 22, 2008 3:04 pm    Post subject: Derelict and QtOpengl segfolt together. Reply with quote

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
View user's profile Send private message
Cyborg16



Joined: 28 Apr 2007
Posts: 39

PostPosted: Fri Nov 07, 2008 5:27 am    Post subject: Reply with quote

I guess you've solved it? I doubt anyone could help without more info anyway.
Back to top
View user's profile Send private message Send e-mail
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Sat Nov 22, 2008 11:02 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Nov 22, 2008 8:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Sat Feb 07, 2009 10:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sun Feb 08, 2009 4:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Sun Feb 08, 2009 5:49 am    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Feb 09, 2009 9:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Sat Feb 21, 2009 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Feb 21, 2009 11:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Fri Mar 13, 2009 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Sat Mar 14, 2009 6:16 am    Post subject: Reply with quote

I export them in order to get something working because I can't use derelict Smile
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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Mar 14, 2009 10:53 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
eldar



Joined: 14 Jun 2008
Posts: 101
Location: Ufa, Russia

PostPosted: Wed Mar 18, 2009 5:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Mar 18, 2009 7:31 pm    Post subject: Reply with quote

Does the segfault occur on Windows? I was under the impression it's a problem only on Linux.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group