Segfault - problem caused by the Shader::Uniform class

Found a bug? Report it here.

Moderator: PPS-Leaders

Post Reply
User avatar
Nowic
Thanathon, God of the lower Planes
Posts: 186
Joined: Tue Oct 03, 2006 7:53 pm
Location: Zürich
Contact:

Segfault - problem caused by the Shader::Uniform class

Post by Nowic » Fri Oct 06, 2006 3:50 pm

Once again my bug Report.

SVN: Revision 9879

My systems:

=================
Desktop:
=================
OS: Debian GNU/Linux Etch (testing)
Gfx: Nvidia Geforce 3 Ti 200
Driver: nvidia-glx 1.0.8762

=================
Thinkpad T42:
=================
OS: Ubuntu Dapper Drake
Gfx: ATI Mobility Radeon 9600
Driver: Open Source X.org "ati" drivers 1:6.5.7.3 (yes, this driver has 3D acceleration, other 3D games work fine)

BTW: On this system Orxonox only runs with:

Code: Select all

env R300_SPAN_DISABLE_LOCKING="true" ./orxonox
otherwise the X-server freezes and I can only reboot the system.

On both systems I can only load "Multiplayer Arena" and "Terrain". All the other levels crash while loading because of the following segmentation fault:

Code: Select all

simon@simonpc:~/orxonox/trunk/src$ ./orxonox
>>> Starting Orxonox <<<
(WW)::story_entities/campaign.cc:81:Starting Campaign nr. 0
story_entities/campaign.cc:141::Campaign is starting StoryEntity nr:0
story_entities/campaign.cc:141::Campaign is starting StoryEntity nr:1
(WW)::static_model_data.cc:829:This model (/home/simon/orxonox/data/trunk//worlds/lake.obj) got over 4 vertices per face <=> conflicts in the CD engine!
recieved signal SIGSEGV
try to write backtrace to file orxonox.backtrace
orxonox.backtrace

Code: Select all

=======================================================
= time: Fri Oct  6 16:42:39 2006
=======================================================
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1511909664 (LWP 29219)]
0x00000000 in ?? ()
(gdb) 
#0  0x00000000 in ?? ()
#1  0x080e1b17 in MappedWater::initShaders (this=0x90d89f8)
    at ./lib/graphics/shader.h:24
#2  0x080e2b8d in MappedWater (this=0x90d89f8, root=0x9fe3b738)
    at world_entities/environments/mapped_water.cc:66
#3  0x080e8989 in tFactory<MappedWater>::fabricateObject (this=0x83d2260, 
    root=0x9fe3b738) at ./lib/util/loading/factory.h:110
#4  0x082bc630 in Factory::fabricate (root=0x9fe3b738) at loading/factory.cc:93
#5  0x08141465 in GameWorldData::loadWorldEntities (this=0x84d9638, 
    root=0x9fe39ef0) at story_entities/game_world_data.cc:209
#6  0x081484b0 in SinglePlayerWorldData::loadWorldEntities (this=0x84d9638, 
    root=0x9fe39ef0) at story_entities/single_player_world_data.cc:79
#7  0x08142ebd in GameWorldData::loadData (this=0x84d9638, root=0x9fe39ef0)
    at story_entities/game_world_data.cc:131
#8  0x0813e0fa in GameWorld::loadData (this=0x84dc420)
    at story_entities/game_world.cc:184
#9  0x0813918d in Campaign::run (this=0x84d58f0)
    at story_entities/campaign.cc:153
#10 0x08138e94 in Campaign::start (this=0x84d58f0)
    at story_entities/campaign.cc:85
#11 0x082b874c in GameLoader::start (this=0x84d5608)
    at loading/game_loader.cc:163
#12 0x0815faf4 in Orxonox::start (this=0x83f5aa0) at orxonox.cc:417
#13 0x08161b02 in startOrxonox (argc=1, argv=0xafc529a4, name=@0xafc528b0, 
    port=-1) at orxonox.cc:573
#14 0x081634bc in main (argc=1, argv=0xafc529a4) at orxonox.cc:481
(gdb) 
(gdb)
Last edited by Nowic on Sat Aug 04, 2007 9:39 pm, edited 1 time in total.
"I've always lived cheaply. I live like a student, basically. And I like that because it means that money is not telling me what to do. I can do what I think is important for me to do. It freed me to do what seemed worth doing." -- Richard Stallman

User avatar
patrick
Baron Vladimir Harkonnen
Posts: 350
Joined: Mon Oct 02, 2006 6:03 pm
Location: Bern

Post by patrick » Sat Oct 07, 2006 8:45 pm

Hi nowic

This error actually isn't caused by the CD engine (because of the last debug output), but it's a shader problem. I'm not yet sure about what is causing this segfault.

I will check this after my exams and report back.

User avatar
bensch
Admiral Alexi Sarkhov
Posts: 101
Joined: Tue Oct 03, 2006 2:28 pm
Contact:

Post by bensch » Thu Oct 12, 2006 6:12 am

This is a problem caused by the Shader::Uniform class

The bug is that glUniform may not be called if shaders are not active!

This problem can be solved by adding a check for support-shaders on every access to uniforms, but I do not exactly know, when one has to check this.

chrigi
Human Space Navy Major
Posts: 40
Joined: Tue Oct 24, 2006 5:52 pm
Contact:

Post by chrigi » Fri Nov 24, 2006 11:13 am

Code: Select all

env R300_SPAN_DISABLE_LOCKING="true" ./orxonox 
A hack to solve this is to disable lense flare. Uncomment it in data/trunk/worlds/Menu.oxw:

Code: Select all

<!--
  <GraphicsEngine>
    <GraphicsEffect>
        <LenseFlare>
          <name>lense flare</name>
          <add-flare-texture>pictures/lense_flare/sun.png</add-flare-texture>
          <add-flare-texture>pictures/lense_flare/lens2.png</add-flare-texture>
          <add-flare-texture>pictures/lense_flare/lens1.png</add-flare-texture>
          <add-flare-texture>pictures/lense_flare/lens3.png</add-flare-texture>
          <add-flare-texture>pictures/lense_flare/lens4.png</add-flare-texture>
          <add-flare-texture>pictures/lense_flare/lens1.png</add-flare-texture>
          <add-flare-texture>pictures/lense_flare/lens3.png</add-flare-texture>
        </LenseFlare>
    </GraphicsEffect>
  </GraphicsEngine>
  -->

Homer_J
Noxonian Pryllgnothor
Posts: 1
Joined: Wed Nov 29, 2006 3:08 pm

Post by Homer_J » Thu Nov 30, 2006 10:03 pm

I have the same problem as nowic and can't load all the maps. Disabling lens flares like chrigi proposed didn't help.

User avatar
Nowic
Thanathon, God of the lower Planes
Posts: 186
Joined: Tue Oct 03, 2006 7:53 pm
Location: Zürich
Contact:

Post by Nowic » Mon Dec 04, 2006 7:00 pm

Thx chrigi.
Disabling lense flares solved the "R300_SPAN_DISABLE_LOCKING" problem. The other problem still exists. And.... I miss the lense flares :(
"I've always lived cheaply. I live like a student, basically. And I like that because it means that money is not telling me what to do. I can do what I think is important for me to do. It freed me to do what seemed worth doing." -- Richard Stallman

Edrundor
Noxonian Warkmrghon
Posts: 17
Joined: Sat Nov 25, 2006 3:29 pm
Location: Wohlen
Contact:

Post by Edrundor » Thu Dec 07, 2006 5:03 pm

I have the same Problem and I know a lot of people who have that error too.

With the fglrx driver it was no Problem to play all the levels of orxonox and I could also start it without any workaround or special parameters

Then I changed to the radeon driver because I wanted to have a free driver. Since than that problem occoured. Maybe that information helps you to fix the bug.

I hope you can do that soon, because I plan to do a menu entree with the next version of the ubuntu package and than the start should be stable for all the users.

chrigi
Human Space Navy Major
Posts: 40
Joined: Tue Oct 24, 2006 5:52 pm
Contact:

Post by chrigi » Thu Dec 07, 2006 6:04 pm

I commited (trunk rev 10034) a patch which could solve this problem, as I can run all levels with r300 ATI driver. It would be cool if someone with shaders (fglrx, windows, ...) could test mapped water since I am not sure if it still works...

Edrundor
Noxonian Warkmrghon
Posts: 17
Joined: Sat Nov 25, 2006 3:29 pm
Location: Wohlen
Contact:

Post by Edrundor » Thu Dec 07, 2006 6:50 pm

First of all, thx for the work. The water level now starts and I can fly in it.

But there's still another bug (see code). There isn't any lake in this level. It's actually the same bug as I had before just that the level worked.

Code: Select all

(WW)::static_model_data.cc:829:This model (/usr/share/orxonox-data//worlds/lake.obj) got over 4 vertices per face <=> conflicts in the CD engine!

chrigi
Human Space Navy Major
Posts: 40
Joined: Tue Oct 24, 2006 5:52 pm
Contact:

Post by chrigi » Thu Dec 07, 2006 10:47 pm

I believe there is no lake because I deactivated it :D The lake only works with shaders, no shaders -> no lake :(

I am not the right man to create a lake for nonshader users since I have no experience at all with graphics.

Edrundor
Noxonian Warkmrghon
Posts: 17
Joined: Sat Nov 25, 2006 3:29 pm
Location: Wohlen
Contact:

Post by Edrundor » Thu Dec 07, 2006 11:12 pm

Ok, that may be the problem ;-)

So I hope someone can fix the shader problem soon.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests