Go Back   Champions of Regnum > English > Technical Support > Linux

Linux Technical issues under Linux platform

Reply
 
Thread Tools Display Modes
Old 10-18-2009, 05:48 AM   #1
Arafails
Baron
 
Arafails's Avatar
 
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
Arafails will become famous soon enough
Lightbulb Solving startup segfault issues on recent Mesa (with a cluebit for NGD)

In the most recent version of Regnum Online, the issue causing this crash ahs been patched, so this workaround should be no longer necessary

Because people with newer cards can't use the chroot workaround, here's an alternative (hopefully to be obsoleted soon. Clue to NGD: Don't call glFlush until you have a working context!).

Anyhow, a workaround. Download from clanigi.net.

Instructions for use:

Untar the file. This will create a glworkaround directory

glwa64.so and glwa32.so are prebuilt libraries for 64-bit and 32-bit systems respectively. You should be able to use them directly, no guarantees for glwa32.so. I'd suggest copying one of these to your regnum directory (from herein assumed to be ~/regnum), although it's not necessary.

Alternatively running make will compile glwa.so from the included source code, and you can copy that.

Run rolauncher (or the game client directly, whichever you prefer) with the correct .so preloaded. Remember you must use an absolute pathname if the .so is not in a standard library directory. So for example if you'd copied the 64-bit library to your ~/regnum directory, you'd run

Code:
LD_PRELOAD=~/regnum/glwa64.so ~/regnum/rolauncher
and everything should be hunky-dory, but mileage will vary (bash expansion converts ~ in the contents of ${HOME} , you may wish to put the full path to your home directoy in instead, eg /home/fudje/regnum/glwa.so for me).

Extra overhead is only one stack frame (using function pointers it skips past the check once it's found a context), so there shouldn't be a noticeable performance penalty.

Only tested on Radeon r600 with kernel 2.6.32-rc5 + airlied's drm-next and mesa git from of Oct 17, which gives interesting results thanks to texture compression bugs (screenshot attached, but don't expect this kind of corruption unless you have a recent ATi card and very recent opensource drivers).
Attached Images
File Type: jpg screenshot 2009-10-18 16_23_34.jpg (66.1 KB, 58 views)
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'gerSoul Taker, Imperial Guard of Ignis

Last edited by Arafails; 11-04-2009 at 03:12 AM. Reason: Replace link to updated tarball
Arafails no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 07:05 AM   #2
FUCKITYFUCK
Pledge
 
FUCKITYFUCK's Avatar
 
Join Date: Jun 2007
Posts: 1
FUCKITYFUCK is on a distinguished road
Default

Thank you! It solved the SIGSEGV problem for me! (:
FUCKITYFUCK no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 09:53 AM   #3
w_larsen
Initiate
 
Join Date: Oct 2008
Posts: 111
w_larsen is an unknown quantity at this point
Default

Code:
dmd@dmd-desktop:~/Desktop/hh$ LD_PRELOAD=~/regnum/glwa32.so ~/regnum/rolauncher
/home/dmd/regnum/rolauncher: symbol lookup error: /home/dmd/regnum/glwa32.so: undefined symbol: _glapi_Context
will look into it after short break.

Last edited by w_larsen; 10-18-2009 at 10:14 AM.
w_larsen no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 12:07 PM   #4
Arafails
Baron
 
Arafails's Avatar
 
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
Arafails will become famous soon enough
Default

Quote:
Originally Posted by w_larsen View Post
Code:
dmd@dmd-desktop:~/Desktop/hh$ LD_PRELOAD=~/regnum/glwa32.so ~/regnum/rolauncher
/home/dmd/regnum/rolauncher: symbol lookup error: /home/dmd/regnum/glwa32.so: undefined symbol: _glapi_Context
will look into it after short break.
Did you use the included binary? Sounds like the sort of error I'd expect; Compiling 32-bit libraries on a 64-bit system can be somewhat dubious;

Having said which, it looks like I may have uploaded an incorrect source version. Unfortunately I can't re-upload right now, so.... Even if it works there'll be a better version up tomorrow.
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'gerSoul Taker, Imperial Guard of Ignis
Arafails no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 01:49 PM   #5
w_larsen
Initiate
 
Join Date: Oct 2008
Posts: 111
w_larsen is an unknown quantity at this point
Default

i used the included binary and compiled from source too. both gave same error.
w_larsen no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 08:37 PM   #6
Arafails
Baron
 
Arafails's Avatar
 
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
Arafails will become famous soon enough
Default

Quote:
Originally Posted by w_larsen View Post
i used the included binary and compiled from source too. both gave same error.
Can you run `nm -D /usr/lib/libGL.so.1 | grep _glapi_' and post the results here? Also your libgl / mesa version (If you're not using mesa's libGL you won't have any _glapi_* symbols, and this is moot anyway).
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'gerSoul Taker, Imperial Guard of Ignis
Arafails no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 09:49 PM   #7
onemyndseye
Master
 
onemyndseye's Avatar
 
Join Date: Jul 2008
Location: South Central USA
Posts: 260
onemyndseye is on a distinguished road
Default

You fkn rock mate!!! Will try this out on my old lappy.
__________________
RA/Syrtis Hunter LVL50: Elusis
RA/Syrtis Barba LVL50: Artemisia
RA/Syrtis Conju Lvl45: Nellas Miriel
onemyndseye no ha iniciado sesión   Reply With Quote
Old 10-18-2009, 10:59 PM   #8
Arafails
Baron
 
Arafails's Avatar
 
Join Date: Nov 2007
Location: Not where it looks like, to either of us.
Posts: 706
Arafails will become famous soon enough
Default

Okay download is available again at http://www.clanigi.net/downloads/glworkaround.tar.gz with correct version. You will need a Mesa3D libGL (or there will be no _glapi_* symbols, and the nvidia and ati ones seem to not care about contexts not being open anyway), and due to the somewhat hackish nature of this workaround that it'll help is a matter of chance. Especially on 32-bit systems with the precompiled version.

If you know you have Mesa3D libGL and you're still getting errors resolving _glapi_get_context it may help to install debugging symbols (on debian or ubuntu, `apt-get install libgl1-mesa-glx-dbg libgl1-mesa-dri-dbg').

Any which way the ultimate solution in this instance is for NGD to review their libopengl_api.so and remove calls to context-dependent OpenGL functions where there is no context, like this one (that causes the startup crash):

Code:
#0  glFlush () at ../../../src/mesa/x86-64/glapi_x86-64.S:7663
#1  0x00007ffff5fc8d05 in Engine3D::RenderizerGL::change_videomode(int, int, int, bool) () from libs/libopengl_api.so
#2  0x00007ffff5fa33aa in Engine3D::RenderizerGL::init_graphics_system(int, int, int, bool, bool) () from libs/libopengl_api.so
#3  0x00007ffff6fca0fb in DisplayEntity::creation_notify(Message*) ()
   from libs/libcommon_entities.so
#4  0x00007ffff580da76 in EntityManager::initialize_entity_as_custom_type(char const*, int, char const*, Message*, Entity*) () from libs/libentity_system.so
#5  0x00007ffff7e8ce6f in GameClient::initialize_entities() ()
   from libs/libregnum_client.so
#6  0x00007ffff7e8fa97 in GameClient::init(int, char**) ()
   from libs/libregnum_client.so
#7  0x00007ffff7e90f49 in GameClient::GameClient(int, char**) ()
   from libs/libregnum_client.so
#8  0x000000000040126e in main ()
Probably for that one it's a simple case of initializing OpenGL before the call to Engine3D::RenderizerGL::change_videomode()
__________________
If you can't detect sarcasm yourself, please pay attention when it's pointed out to you.
Arathael :: Wyrd Sceote :: Gwn M'gerSoul Taker, Imperial Guard of Ignis
Arafails no ha iniciado sesión   Reply With Quote
Old 10-19-2009, 12:14 AM   #9
surak
Legend
 
surak's Avatar
 
Join Date: Mar 2006
Location: Oslo
Posts: 2,176
surak has a spectacular aura aboutsurak has a spectacular aura about
Default

Wow. Nice. I don't think that glFlush has anything to do there. Must be a really ooooooooooold line of code. It's not like there is no context, but it's not currently active.

Blah. I'm removing it.
Expect a little patch soon ^^
__________________
Surak Remember... this is just a game! - Xephandor existe y Miriya es su profeta!
surak no ha iniciado sesión   Reply With Quote
Old 10-19-2009, 01:32 AM   #10
onemyndseye
Master
 
onemyndseye's Avatar
 
Join Date: Jul 2008
Location: South Central USA
Posts: 260
onemyndseye is on a distinguished road
Default

Hail Surak, Executioner of acient bugs!!! :P
__________________
RA/Syrtis Hunter LVL50: Elusis
RA/Syrtis Barba LVL50: Artemisia
RA/Syrtis Conju Lvl45: Nellas Miriel
onemyndseye no ha iniciado sesión   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:06 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
NGD Studios 2002-2024 © All rights reserved