Author Topic: Weirdness w/ latest CrystalSpace (and Linux GeForce Drivers)  (Read 2300 times)

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Weirdness w/ latest CrystalSpace (and Linux GeForce Drivers)
« on: February 22, 2004, 08:17:11 pm »
Does anyone else notice any weirdness with the latest CVS of CrystalSpace & PlaneShift?

Bear in mind I\'m using SuSE 9.0 and the latest GeForce drivers from Nvidia (which have a reputation for being in a whack state).

Most of the time I get segfaulted. But if I do a cautious -relight or -recalc here and there, I\'ll get in but have odd clipping problems, sprites being displayed incorrectly (or not at all), weird level blending. This might be to some sectors or polygons not being closed (and so things bleed), but even weirder is that if I get out and then get back in things improve. And so it goes with each iteration.

For example, at first I logged in and noticed that transparent textures still had masks drawn with \'em (i.e. pink boxes around the tree tops). Sprites were also bleeding - move an image or look at your avatar at a weird angle and you\'d see the column map that the sprite previews in when at the character selection screen. No NPC\'s in npcroom. Logged out, logged back in and NPC\'s appeared and trees were fine, but fonts didn\'t show above the NPC\'s heads. Logged out, logged back in and fonts were back. Logged out, logged back in and the PS menubar at the top finally blitted on, dialog boxes were now present along with the shortcut bar.

I\'m *guessing* this might have something to do with CrystalSpace\'s latest version from CVS (since Joritt et al are rewriting how portals work). But it might also be due to the overall weirdness of the current NVidia drivers. So I\'m left scratching my head if it\'s a hardware problem or engine problem. Or if there are open sectors in the maps (& meshes) that cause funkiness. -recalc noticed a few that weren\'t closed.

If anyone else has noticed such weirdness let me know. No worries - I\'m more or less just looking for a show of hands for others with the same weirdness.

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Confirmed and reproduceable CS crash
« Reply #1 on: February 23, 2004, 07:54:53 pm »
Aight... I can reproduce the error now:
1) get the latest version of Crystal Space from CVS
2) Jambuild it all
3) Run walktest (i tried without recalculating the lightmap, with --relight, with --relight --recalc and with --relight --recalc --video=opengl)
4) Stroll over to the transparent texture on the floor (the one right behind the stick figure that rotates around). Notice that the magenta transp. mask is still there?
5) Look up until the texture is outside of your viewplane
6) Segfault!

Using make actually causes walktest to segfault right away.

I\'ve tried this on two machines (both with NVidia hardware) with the same results.

galatnm

  • Traveller
  • *
  • Posts: 20
    • View Profile
(No subject)
« Reply #2 on: February 23, 2004, 11:37:20 pm »
if it s a crystalspace problem, it s better to post these information to their forums, to fix it :)
\"In this world, there are no obvious, only assumptions.\" --- Norhawk :: Chief enchanter in blitzers ---

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
PSClient Problems
« Reply #3 on: February 24, 2004, 12:55:50 pm »
I actually don\'t think it\'s a CS problem, I\'m just trying to diagnose what it could be. I did post the problem to cs-main, but the walktest problem seems to be a separate issue.

Take a look at http://www.cs.indiana.edu/~joellis/PS/rendering_errors1.jpg and http://www.cs.indiana.edu/~joellis/PS/rendering_errors2.jpg. There you can see what weirdness was happening before the psclient did nothing but segfault.

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Just segfaults
« Reply #4 on: February 24, 2004, 01:10:55 pm »
Now it just segfaults. Backtrace:
0  0x0804b7fe in csString::operator char const*() const ()
#1  0x08141dfe in pawsMultiLineTextBox::Draw() ()
#2  0x0813548b in pawsWidget::DrawChildren() ()
#3  0x08135082 in pawsWidget::Draw() ()
#4  0x0813548b in pawsWidget::DrawChildren() ()
#5  0x0810d7d8 in PawsManager::Draw() ()
#6  0x080637ee in psEngine::HandleEvent(iEvent&) ()
#7  0x0806783c in psEngine::EventHandler::HandleEvent(iEvent&) ()
#8  0x08182048 in csEventQueue::Notify(unsigned) ()
#9  0x00000001 in ?? ()
#10 0xffffffff in ?? ()
#11 0x085da998 in ?? ()
#12 0xbffff138 in ?? ()
#13 0x0818299a in csEvent::DecRef() ()
#14 0x082003b8 in ?? ()
#15 0x082003b8 in ?? ()
#16 0xbffff030 in ?? ()
#17 0xbffff184 in ?? ()
#18 0x081820e8 in csEventQueue::Process() ()
« Last Edit: February 24, 2004, 01:11:19 pm by Chuckles »

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #5 on: February 25, 2004, 12:15:17 am »
Well, current CVS of CS has given me weird clipping problems in walktest (flarge) ever since Jorrit did the portal change, but never crashes
Quidquid latine dictum sit, altum sonatur.

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
SuSE 9.0 Personal = AIEEE
« Reply #6 on: February 26, 2004, 04:16:51 am »
I thought it was related to the portal changes also, maybe even to the new polygon primitives that are being phased in. Maybe it is in some weird way, but here\'s what I\'ve found out:

This seems to be a problem with alpha blending (given the weirdness in walktest), which makes me wonder if it\'s a problem with the OpenGL libs installed on my machines.

I installed SuSE 8.2 Pro instead of SuSE 9.0 Personal which made the problem *magically* go away. I don\'t think that should be the solution to backport one\'s distro... I\'m more worried that this is an indicator of things to come.

One big difference between 8.2 and 9 is the XFree86-Mesa package, which didn\'t exist in 8.2 but appears in 9. Either something has changed in that XFree86 Mesa package (4.3.0.1) that adversely affects CrystalSpace or the GL packages (5.0.1) are changed. Either way it might be worth looking in to...

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
It's a Problem with GCC
« Reply #7 on: April 28, 2004, 09:59:55 pm »
It\'s a problem with GCC in SuSE 9.0. The CS mailing list has been covering this recently. The problem is with the O3 optimization level and how it handles renaming registers. If you add this as a parameter to GCC:
-fno-rename-registers

Then things should turn out fine.

Chuckles

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
It's a Problem with GCC
« Reply #8 on: April 28, 2004, 10:15:05 pm »
D\'oh...
« Last Edit: April 28, 2004, 10:15:39 pm by Chuckles »

Fextina

  • Traveller
  • *
  • Posts: 27
    • View Profile
(No subject)
« Reply #9 on: May 01, 2004, 06:15:55 am »
/me glad to read this thread before trying to compile CB on SUSE 9.0

I\'m currently building the whole thing. I\'m not sure if this problem will resurface in SUSE 9.1 (which I will receive in about a week). I\'ll test that when it comes.

Fextina

  • Traveller
  • *
  • Posts: 27
    • View Profile
(No subject)
« Reply #10 on: May 01, 2004, 07:25:59 am »
Ok, walktest still crashes.

I\'m not very familiar with Jam, where should I place the -fno-rename-register?

I placed it under the CFLAGS in Jamconfig, but I\'m not sure if that\'s the place.

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #11 on: May 01, 2004, 11:26:18 am »
yeah, CFLAGS or CCFLAGS or something like that :)  If it doesn\'t work, complain loudly here or on #crystalspace... actually, better yet let me check my Crystal-main inbox...

Ah, I think they suggest CXXFLAGS, so I\'d try that first off.

EDIT: hm, you said \"-fno-rename-register\", you have to be careful to make sure that there\'s an \'s\' at the end, as in \"-fno-rename-registers\"
« Last Edit: May 01, 2004, 11:27:47 am by dfryer »
Quidquid latine dictum sit, altum sonatur.

Fextina

  • Traveller
  • *
  • Posts: 27
    • View Profile
(No subject)
« Reply #12 on: May 01, 2004, 07:06:41 pm »
well, I made sure it\'s -fno-rename-registers AND I change the optimization to O2, but it still crashes after a while.

I\'m upgrading to GCC 3.4.0 now, and I\'ll try it on that.

Fextina

  • Traveller
  • *
  • Posts: 27
    • View Profile
(No subject)
« Reply #13 on: May 02, 2004, 08:42:56 am »
Well, this is hell. I spent two days trying to get CS NOT to crash without any progress.

I disabled optimization (-O0) and I disabled the new renderer, I used GCC 3.3.1, 3.3.2, 3.4.0 and 3.5.0 (experimental), the last two have some silly bug that caused walktest to crash right on, the first two make it crash when I go to the snow area.

I _really_ want to get involved somehow with PS development, but I guess I\'ll have to wait for my SUSE 9.1 and try again. This is most frustrating.