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

DevIL via DerelictIL segfaults on initializing

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
klickverbot



Joined: 19 Jan 2009
Posts: 4

PostPosted: Mon Jan 19, 2009 6:29 am    Post subject: DevIL via DerelictIL segfaults on initializing Reply with quote

Hallo,

I can't get DerelictIL/DevIL to work correctly. Even this minimal program
Code:
import derelict.devil.il;

void main() {
   DerelictIL.load();
   ilInit();
}

segfaults with varying backtraces like
Code:
#0  0x080873a1 in ilGetInteger ()
#1  0xb7b8757f in ilDefaultStates () at ./../src-IL/src/il_states.c:91
#2  0xb7b7c106 in ilInit () at ./../src-IL/src/il_stack.c:517
#3  0x0805fac4 in _Dmain ()
#4  0x0806594b in runMain () at dgccmain2.d:287
#5  0x08065ab9 in tryExec (dg={object = 0xb7bc3ac0, func = 0xb7bc3ae0 <ilStates>}) at dgccmain2.d:235
#6  0x080660bc in runAll () at dgccmain2.d:295
#7  0x08065ab9 in tryExec (dg={object = 0xb7bc3ac0, func = 0xb7bc3ae0 <ilStates>}) at dgccmain2.d:235
#8  0x08065fb1 in _d_run_main (argc=1, argv=0xbf951b44, main_func=0x805fa84 <_Dmain>) at dgccmain2.d:302
#9  0x080689cb in main (argc=Cannot access memory at address 0x0) at cmain.d:5

or
Code:
#0  0x0808739e in ilGetError ()
#1  0xb7d0257f in ilDefaultStates () at ./../src-IL/src/il_states.c:91
#2  0xb7cf7106 in ilInit () at ./../src-IL/src/il_stack.c:517
#3  0x0805fac4 in _Dmain ()
#4  0x0806594b in runMain () at dgccmain2.d:287
#5  0x08065ab9 in tryExec (dg={object = 0xb7d3eac0, func = 0xb7d3eae0 <ilStates>}) at dgccmain2.d:235
#6  0x080660bc in runAll () at dgccmain2.d:295
#7  0x08065ab9 in tryExec (dg={object = 0xb7d3eac0, func = 0xb7d3eae0 <ilStates>}) at dgccmain2.d:235
#8  0x08065fb1 in _d_run_main (argc=1, argv=0xbfecc724, main_func=0x805fa84 <_Dmain>) at dgccmain2.d:302
#9  0x080689cb in main (argc=Cannot access memory at address 0x60
) at cmain.d:5


What could be wrong here? I have tried the distro-supplied packages, several tarballs and the SVN version of DeviIL, but none seem to work. The same minimal program in C works fine though, so there might be an issue with the .so loading part.

Ubuntu 8.10 (for what it matters)
gdc (GCC) 4.1.2 20070214 ( gdc 0.24, using dmd 1.030)
DerelictIL installed via dsss
Build command:
leading to
Code:

rebuild main.d

which calls:
Code:
compile   gdmd -version=Posix -version=Tango -c main.d  -I/usr/local/bin/../include/d  -vdmd -od.
/usr/local/bin/gdc -fversion=Posix -fversion=Tango -I /usr/local/bin/../include/d -c main.d -o ./main.o
rename    ./main.o to ./nmd_main.o
link      gdmd ./nmd_main.o  -ofmain -q,-rdynamic -L-lDerelictIL  -L-lDerelictUtil  -L-lDG-tango-sys  -L-lDG-tango-stdc  -L-lDG-tango-sys-linux  -L-lDG-tango-stdc  -L-ldl  -L-lDerelictUtil  -L-lDG-tango-core  -L-lDG-tango-stdc  -L-lDG-tango-text  -L-lDG-tango-stdc  -L-lDerelictUtil  -L-lDerelictIL


I have the odd feeling that I am making some really silly error, but I have not been able to figure out what exactly causes the application to segfault.

Thanks in advance!
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Mon Jan 19, 2009 9:53 pm    Post subject: Reply with quote

Sorry, but I can't help you with this myself. One of these days I'll get around to getting DMD & GDC environments setup on my Ubuntu partition, but I just don't have the time to deal with Linux right now.

However, I'd like to suggest that you configure rebuild to use DMD and see what happens. It could possibly shed more light on the issue.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
klickverbot



Joined: 19 Jan 2009
Posts: 4

PostPosted: Tue Jan 20, 2009 4:21 pm    Post subject: Reply with quote

Thank you for the quick reply!

Indeed, DerelictIL/DevIL works flawlessly when using DMD, which in turn does not like some of the template magic I use in the project. Seems like I was stuck between a rock and a hard place...
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Tue Jan 20, 2009 7:44 pm    Post subject: Reply with quote

klickverbot wrote:
Indeed, DerelictIL/DevIL works flawlessly when using DMD


Thanks! This is good to know. Now I just hope some Linux guru comes along and tells us why it fails with GDC.
_________________
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
Page 1 of 1

 
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