Open GL error on OSX, wheel of death on System entry

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Open GL error on OSX, wheel of death on System entry

Post by Cmdr James »

Sometimes when I hyperspace to a system, I get the osx spinning wheel of death.
It seems to always occur when the hud is painted and nothing else (specifically the planet doesnt seem to be drawn yet).

The error is EXC_BAD_ACCESS.

I do have detailed planets:On, and I believe this error is related.

The line it occurs at is PlanetEntity.m 1138 (trunk) subdivide level is (at least this time) 3 and displaylistNames contains 6 entries (all are zero, except 3, which is 9)

Code: Select all

glCallList(displayListNames[subdivideLevel]);
The backtrace looks like this:

Code: Select all

#0	0x900c5f30 in glgConvertTo_32<GLGConverter_EndianSwap, (GLGMemory)2>
#1	0x900c3f8f in glgProcessPixelsWithProcessor
#2	0x1493d0fa in gldGetQueryInfo
#3	0x14929f4d in gldUpdateDispatch
#4	0x1479b32c in gleSetupAndDrawArraysOrElementsOutOfLine_ListExec
#5	0x14796c2c in gleCallList
#6	0x96efea3b in glCallList
#7	0x00109103 in -[PlanetEntity drawEntity::] at PlanetEntity.m:1138
#8	0x00109777 in -[PlanetEntity drawEntity::] at PlanetEntity.m:1252
#9	0x0004514d in -[Universe drawUniverse] at Universe.m:3577
#10	0x0005a985 in -[MyOpenGLView drawRect:] at MyOpenGLView.m:204
#11	0x9227a29c in -[NSView _drawRect:clip:]
#12	0x92278d93 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
#13	0x922776e9 in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
#14	0x92273b4f in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#15	0x921b4523 in -[NSView displayIfNeeded]
#16	0x00013496 in -[GameController doPerformGameTick] at GameController.m:324
#17	0x00013341 in -[GameController performGameTick:] at GameController.m:282
#18	0x93dc4ea7 in __NSFireTimer
#19	0x9561cb25 in CFRunLoopRunSpecific
#20	0x9561ccd8 in CFRunLoopRunInMode
#21	0x91e982c0 in RunCurrentEventLoopInMode
#22	0x91e980d9 in ReceiveNextEventCommon
#23	0x91e97f4d in BlockUntilNextEventMatchingListInMode
#24	0x921b1d7d in _DPSNextEvent
#25	0x921b1630 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#26	0x921aa66b in -[NSApplication run]
#27	0x921778a4 in NSApplicationMain
#28	0x000039b5 in main at main.m:13
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Intriguing. What happens when you comment out glCallList?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Then the planets are not drawn at all. Not sure if it still crashes, it didnt while I was testing.

I thought another_commander had fixed this, with some memory management changes in PlanetEntity yesterday, but unfortunately not :(
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6631
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The crash I hope to have fixed was occuring on my system in PlanetEntity.m, dealloc method and it looked like Oolite was trying to free already deallocated memory. I have not seen any crashes on my system after this, but it could well be that Cmdr James' bug is due to some completely different and obscure reason.

Intriguing indeed.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I have done a little searching with google for

Code: Select all

glgConvertTo_32
and it seems to me that this may well just be an openGL or video driver bug on OSX.

For example, there is a discussion of a similar problem http://www.horde3d.org/forums/viewtopic.php?f=3&t=373

My video details, if anyone is interested

Code: Select all

ATI Radeon X1600:

  Chipset Model:	ATY,RadeonX1600
  Type:	Display
  Bus:	PCIe
  PCIe Lane Width:	x16
  VRAM (Total):	256 MB
  Vendor:	ATI (0x1002)
  Device ID:	0x71c5
  Revision ID:	0x0000
  ROM Revision:	113-xxxxxx-158
  EFI Driver Version:	01.00.158
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

vurlix on that forum says

Code: Select all

It runs fine ONCE from Xcode. After the sample is closed, it doesn't work anymore if I try to relaunch it. But it does seem to work fine when launched from Finder multiple times. Sigh.
If that's the case for you too, that would mean some weird interaction between the debugger & your video driver.
While making it virtually impossible for you to debug oolite the normal way, at least it would mean that the release version shouldn't crash - at least from this bug...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Its possible, Ill try running outside xcode. To be honest, now that it doesnt seem to be an oolite bug, I am not too worried any more, I dont mind the odd crash :D
Post Reply