Homesource Forums

Homeworld Source Editing Talk
It is currently Mon Sep 25, 2017 10:52 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Wed Nov 29, 2006 7:20 pm 
Offline

Joined: Tue Nov 28, 2006 8:52 am
Posts: 9
Hi everybody

I just succeeded in playing my first Homeworld SDL game :). I had some troubles with librgl. The game refused to start because of this error :

Quote:
SDL_GL_LoadLibrary(librgl.so): Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol: DPMSDisable


I tried to build sdl without dpms support. Now the error was :
Quote:
SDL_GL_LoadLibrary(librgl.so): Failed loading XRRFreeScreenConfigInfo: /usr/lib/libXrender.so.1: undefined symbol: XRRFreeScreenConfigInfo


So I built sdl without xranr support.. but then the error was with shm. Since it is not a good idea to disable shm, I replaced all calls to librgl.so to libGL.so directly. Now the game is working, but there is some little problems:

In Option / Audio / Speaker Settings / Change click OK or Cancel and the games crashes :

Quote:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211500864 (LWP 6845)]
listDetachNode
(node=0xb757156c) at LinkedList.c:50
50 if (owner->head == node)
(gdb) backtrace
#0 listDetachNode (node=0xb757156c) at LinkedList.c:50
#1 0x08100702 in listRemoveNode (node=0xb757156c) at LinkedList.c:330
#2 0x08103250 in memFreeSBH (cookie=0xb7571560) at Memory.c:1378
#3 0x0813937b in regRegionDelete (region=0xb75b6780) at Region.c:1496
#4 0x081394ab in regRegionProcess (reg=0xb757bc80, mask=4261412864)
at Region.c:578
#5 0x08139495 in regRegionProcess (reg=0xb7738280, mask=4294967295)
at Region.c:574
#6 0x08139495 in regRegionProcess (reg=0x82c5340, mask=4294967295)
at Region.c:574
#7 0x08139d3a in regProcessTask () at Region.c:949
#8 0x08463368 in ?? ()
#9 0x00000000 in ?? ()


Also, everytime I quit the game, there is a problem when freeing memory :
Quote:
*** glibc detected *** /home/mbouchar/games/homeworld/bin/homeworld: munmap_chunk(): invalid pointer: 0x0848f508 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7ce3310]
/usr/lib/libSDL-1.2.so.0(SDL_AudioQuit+0x61)[0xb7dc4911]
/usr/lib/libSDL-1.2.so.0(SDL_QuitSubSystem+0x7c)[0xb7dc3e3c]
/usr/lib/libSDL-1.2.so.0(SDL_Quit+0x1e)[0xb7dc3e9e]
/home/mbouchar/games/homeworld/bin/homeworld[0x804c9aa]
/lib/libc.so.6(__libc_start_main+0xd8)[0xb7c95838]
/home/mbouchar/games/homeworld/bin/homeworld[0x804a861]


There is also some noise in the sound / music.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 8:22 pm 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
hmm, a few others have that DPMS problem:
http://www.google.com/search?&q=%22Fail ... Disable%22

http://www.mail-archive.com/debian-bugs ... 04394.html
Sam says this DPMS issue is "harmless".
what happens when you just ignore the DPMS issue? (compile libsdl normally, with dpms, etc) Does HWSDL run ok?

what OS and version are you running?

what versions are you using:
libsdl, gcc, hwsdl

using hwsdl rev341 on kubuntu 6.10 ; libsdl 1.2.11 ; gcc3.3, i'm not having these problems.

if you're using libsdl 1.2.10, please use 1.2.11 instead.
I remember experiencing audio weirdness (crackles kind of) using libsdl1.2.10.

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 9:03 pm 
Offline

Joined: Tue Nov 28, 2006 8:52 am
Posts: 9
nova wrote:
what happens when you just ignore the DPMS issue? Does HWSDL run ok?


The full error output is:

Quote:
Scanning for newer files in /home/mbouchar/games/homeworld/data
Compared 5 filesystem files to main & update bigfiles.
0 files found newer than main bigfile in filesystem.
0 files found newer than update bigfile in filesystem.
SDL_GL_LoadLibrary(librgl.so): Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol: DPMSDisable
SDL_GL_LoadLibrary(librgl.so): Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol: DPMSDisable
Fatal Error: Couldn't initialize default rendering system
.Error creating window


If I use the configuration I've set with my modified version of homeworld, I get it working with original r341, but text menu is disapearing on the menu screen on mouse overing.

Quote:
what OS and version are you running?


I'm using linux 2.6.18 with gentoo

Quote:
what versions are you using:
libsdl, gcc, hwsdl


libsdl: 1.2.11
gcc: 4.1.1
hwsdl: r341

One of the possible causes of my problems with dpms is my version of libX11 1.1 with libxcb 1.0

Quote:
mbouchar@laptop ~/games/homeworld/bin $ ldd homeworld
linux-gate.so.1 => (0xb7fa0000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7e9c000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e40000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7e29000)
libc.so.6 => /lib/libc.so.6 (0xb7d01000)
libm.so.6 => /lib/libm.so.6 (0xb7cdb000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7cd9000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7cc2000)
libdl.so.2 => /lib/libdl.so.2 (0xb7cbe000)
/lib/ld-linux.so.2 (0xb7fa1000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7cbb000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7cb5000)

mbouchar@laptop ~/games/homeworld/bin $ ldd librgl.so
linux-gate.so.1 => (0xb7f02000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7e6b000)
libc.so.6 => /lib/libc.so.6 (0xb7d43000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7c5c000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7c59000)
/lib/ld-linux.so.2 (0x80000000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7c56000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7c3f000)
libdl.so.2 => /lib/libdl.so.2 (0xb7c3b000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7c36000)

mbouchar@laptop ~/games/homeworld/bin $ ldd librglsw.so
linux-gate.so.1 => (0xb7f1a000)
librgl.so => /home/mbouchar/games/homeworld/lib/librgl.so (0xb7dd5000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7d5d000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xb7d4f000)
libc.so.6 => /lib/libc.so.6 (0xb7c27000)
libm.so.6 => /lib/libm.so.6 (0xb7c01000)
libdl.so.2 => /lib/libdl.so.2 (0xb7bfd000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7be6000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb7aff000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb7afc000)
/lib/ld-linux.so.2 (0x80000000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7af9000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb7ae2000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb7add000)


The most anoying problem is the sound, but the game is great, so it will not stop me from playing it! :)

I will continue to use homeworld withous librgl until xcb is more used and problems in sdl fixed.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 9:59 pm 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
why not move to a configuration that'd more likely work with HWSDL?

or do you have significant priorities that bind you to your current OS configuration?

Quote:
I get it working with original r341, but text menu is disapearing on the menu screen on mouse overing.


hmm, r340 fixed that for me and aunxx.
see here: http://homesource.nekomimicon.net/sourc ... .php?t=130

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 29, 2006 11:23 pm 
Offline

Joined: Tue Nov 28, 2006 8:52 am
Posts: 9
nova wrote:
why not move to a configuration that'd more likely work with HWSDL?

or do you have significant priorities that bind you to your current OS configuration?


I'm testing the new libraries for the X.org 7.2 release. Since the game is working with some minor modifications, I will continue to play with my current config.

Quote:
hmm, r340 fixed that for me and aunxx.
see here: http://homesource.nekomimicon.net/sourc ... .php?t=130


Ok, i was using the binaries found at : [url]http://www.whoc.org.uk/homeworldSDL/[/usr]. They must be too old! :P

I'm currently at mission 3. The game segfault sometime at beginning of mission 2... a problem with Mesh.c. Since this is probably my fault, I will not bother anybody any longer until I'm sure it's a real bug.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 4:42 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

In no particular order:

Quote:
SDL_GL_LoadLibrary(librgl.so): Failed loading DPMSDisable: /usr/lib/libX11.so.6: undefined symbol: DPMSDisable


I think I had this briefly, and I seem to remember that it went away, but in the file: src/SDL/main.c i replaced every reference to librgl.so with libGL.so (seven of them)
I think it made the problem go away but I didn't test it thoroughly, and my memory could be suspect. :)

The binaries you downloaded are now out of date as we will want the working menus on them. I'll recompile them later today if I get chance, but what happens if you compile the code yourself?

I can confirm that you can change which speakers you're using, but when you select the "change" button which is just for the EQ, it crashes when you exit the submenu. (Either by accept or cancel)
I'll have a look at this when I get time.
Workaround --> Don't click on change to alter the EQ. :)

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 5:25 am 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
Quote:
aunxx: "I can confirm that you can change which speakers you're using, but when you select the "change" button which is just for the EQ, it crashes when you exit the submenu. (Either by accept or cancel) "


hmm, doesn't crash for me.

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 5:39 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.
Are you using a debug build?

For me if it's a debug build it works fine, but if it's a normal build it crashes!

I'm thinking it's an odd compiler sequence thing again and the dbgMessage is stopping the problem. I'll keep looking. :)
(Or maybe not :( )
Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 8:31 am 
Offline

Joined: Tue Nov 28, 2006 8:52 am
Posts: 9
aunxx wrote:
I think I had this briefly, and I seem to remember that it went away, but in the file: src/SDL/main.c i replaced every reference to librgl.so with libGL.so (seven of them)


It's what I did first, but a config with the gl renderer in ~/.homeworld fixes the problem too. It seems to be a problem with the software renderer.

Quote:
The binaries you downloaded are now out of date as we will want the working menus on them. I'll recompile them later today if I get chance, but what happens if you compile the code yourself?


It is working! :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 11:25 am 
Offline

Joined: Tue Nov 28, 2006 8:52 am
Posts: 9
aunxx wrote:
Hi.
Are you using a debug build?

For me if it's a debug build it works fine, but if it's a normal build it crashes!

I'm thinking it's an odd compiler sequence thing again and the dbgMessage is stopping the problem. I'll keep looking. :)
(Or maybe not :( )
Aunxx


I'm using a debug build, but on gcc 4.1.
Maybe gcc 4.1 is just more predictable on crashing than old compilers :P

I've looked a little bit at the source code and there is a lot of things that may be sources of crashes... like directly assigning dword values to pointers (sometime using a pointer as a dword, sometimes as a pointer).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 30, 2006 2:22 pm 
Offline
coder
User avatar

Joined: Wed Oct 04, 2006 8:13 pm
Posts: 94
Location: UTC -0500
gcc3.3 debug build, no crash.

perhaps it crashes on release build, i'll check later

_________________
http://againsttcpa.com/what-is-tcpa.html
http://google.com/search?q=c+programming+faq
http://research.att.com/~bs
acronyms.ch, neworder.box.sk


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 5:29 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

I'm using 4.1 and compiling the code using HW_Release causes the crash, but using HW_Debug doesn't which means it shouldn't be too tricky to sort out. (Though I've thought that about things before :) )

I tried the HW_Release build using gcc 3.3 and it did crash but corroboration would be superb. :)

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 01, 2006 6:22 pm 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Hi.

I've been looking at this for most of today and my head is now in bits. :( Giving up on this for a bit and not think about it coz I don't think I'm going to get anywhere fast.

I've traced it to a memory allocation in FEFlow.c (I think it was )

in Memory.h set
MEM_ERROR_CHECKING 1
MEM_VERBOSE_LEVEL 9 // Too high but I wanted to see everything :)

and watch the output. There is a bad allocation cropping in as it creates the equaliser screen and the crash occurs when it attempts to free the memory.
(set MEM_ERROR_CHECKING 0 and see the crash as it tries to free the memory)

Anyway if anyone wants to have look please feel free, but I'm going to leave it for a few days. :)

Have a good weekend all. :) :)

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 03, 2006 4:07 am 
Offline
coder

Joined: Tue Nov 07, 2006 4:40 am
Posts: 236
Mornin'

Sorta found this in the end. Can't exactly put my finger on why it happens at the moment, but defining REG_ERROR_CHECKING as 1 fixes this.

It only seems to enable a validation key but I'll have another look later. :)

Aunxx


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 03, 2006 6:41 am 
Offline
coder

Joined: Wed Nov 15, 2006 8:15 am
Posts: 100
Works fine.

Great Aunxx :D


Top
 Profile  
 
 Post subject:
PostPosted: Sun Dec 03, 2006 3:03 pm 
Offline

Joined: Tue Nov 28, 2006 8:52 am
Posts: 9
It's working here too


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group