L3DT users' community
Large 3D terrain generator

Sapphire crash (ATI cards)

Please report software faults here.

Postby Marnoch » Sun Jan 11, 2009 1:21 am

I think there's still a small problem with the install. I first got errors in finding all kinds of resource files so I looked at the L3DT subfolders in My Documents and found that the folder under 'Resources' name ended in .12 instead of .13. Once I renamed it to .13 everything worked fine, so no biggie.

The order of messages the Sapphire debugger generated were:
HideWND
Pausing Renderer
Killing Timer
calling set MouseMode
deleting WGL Render Context

and then it hangs.

Hope this helps.
Marnoch
New member
 
Posts: 7
Joined: Tue Jan 06, 2009 4:03 am

Postby Aaron » Sun Jan 11, 2009 6:31 am

Hi Marnoch,

Thanks for the feedback.

I think there's still a small problem with the install. I first got errors in finding all kinds of resource files so I looked at the L3DT subfolders in My Documents and found that the folder under 'Resources' name ended in .12 instead of .13. Once I renamed it to .13 everything worked fine, so no biggie.


Oops, I was in a bit of a hurry when I put that installer together, and I forgot to set the correct build number on the installer. If the build numbers on the executable and installer don't match, bad things happen to resource paths &c.

I've updated the installer again to fix this problem.

The order of messages the Sapphire debugger generated were:
HideWND
Pausing Renderer
Killing Timer
calling set MouseMode
deleting WGL Render Context

and then it hangs.


Ah, that nails it; the call to 'wglDeleteContext' is throwing an exception, which means it's an OpenGL implementation fault, and more specifically, an ATI driver fault. A quick browse of the ATI support forums indicates many people are having trouble with crashes caused by ATI's OpenGL drivers. They seem to suggest flashing the card's BIOS, but I'd recommend you speak to ATI support before you try that.

Unfortunately, I don't have any way to fix this bug, since it's not in my code. The best I can do is try to catch the exception raised in 'wglDeleteContext' and handle it gracefully. I've done just this this in this updated version of Sapphire:

http://www.bundysoft.com/L3DT/downloads/plugins/bin/Sapphire-bin.zip

With any luck, this version will just throw one error message and won't crash. However, it could be that some part of the internal state of the card is being messed up, in which case catching the exception merely delays the inevitable crash.

Anyway, if the above version doesn't 'hide' the exception, I think the only course of action is to report the OpenGL driver error to ATI.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Marnoch » Sun Jan 11, 2009 2:51 pm

Hmm... Looks like it's still going to crash. I'll go see what I can do from the ATI side of things then because L3DT is too good of a tool to give up without a fight ;)

Thanks for the help Aaron. If I manage to get it all sorted out I'll report back how I did it.
Marnoch
New member
 
Posts: 7
Joined: Tue Jan 06, 2009 4:03 am

Postby Marnoch » Sun Jan 11, 2009 11:30 pm

I've tried a number of things (clear out all copies of drivers and re-install, turn off Aero interface in vista, turn off various ATI specific settings, etc) and read a lot about the OpenGL issues that others have been having but still haven't had any luck in making the problem go away from that side. From all I've read ATI has been less than helpful for those who've put in trouble tickets so I haven't gone there yet.


But... I had an old copy of L3DT 2.5B on my HD. I installed it and Sapphire exits normally. The only problem I can see is that I sometimes have to force a refresh of the heightmap after editing it or I can't see the changes. (Rolling the mouse over the map seems to show that the changes were made, but they don't show up on the screen until refresh)

Any idea why the version of Sapphire that came with 2.5B would work while the latest versions don't? I tried tossing that version of Sapphire into the 2.7 beta of L3DT but it caused a crash when loading. I kind of expected that but thought it was worth a shot. ;)
Marnoch
New member
 
Posts: 7
Joined: Tue Jan 06, 2009 4:03 am

Postby Aaron » Tue Jan 13, 2009 3:45 pm

Hi Marnoch,

Marnoch wrote:Any idea why the version of Sapphire that came with 2.5B would work while the latest versions don't?


I've written/changed many thousands of lines of code since then, but I can't think of any change that would cause a call to 'wglDeleteContext' to fail on ATI cards and still succeed on NVIDIA cards. It all depends on the nature of the driver bug, and that I don't know.

This is not a solution I'm proud of, and indeed may not be a solution at all, but this version of Sapphire skips the call to wglDeleteContext:

http://www.bundysoft.com/L3DT/downloads/plugins/bin/Sapphire-bin-debug2.zip

It seems to still function normally on my NVIDIA card, but I expect there will be some sort of memory leak in there as a result of an un-deleted rendering context. Nevertheless, it may be sufficient to get you going again whilst we wait for the fix from ATI.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Marnoch » Wed Jan 14, 2009 2:32 am

It does basically the same thing except the sapphire window doesn't close.

Thanks for bearing with me. I'll go see what ATI has to say for themselves... :)

In the meantime I can get by with a combination of 2.5B and 2.7 to do what I need with water maps
Marnoch
New member
 
Posts: 7
Joined: Tue Jan 06, 2009 4:03 am

Postby Deathsong » Thu Jan 22, 2009 6:37 pm

Any news on a fix for this, either from l3dt, or from ATI?
Deathsong
Member
 
Posts: 10
Joined: Tue Dec 16, 2008 11:55 pm

Postby Aaron » Fri Jan 23, 2009 11:27 pm

Hi Deathsong,

Sorry, I don't have a solution just yet. However, I've done some reading on this bug, and other developers have reported that is problem can be related to texture usage.

My plan is to build an updated version of Sapphire to test the different textures to see which one causes the crash. Once I know where to look, I should then be able to fix the problem. I expect to have this ready for testing later this weekend.

Please accept my apologies for the delay.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Aaron » Sat Jan 24, 2009 5:16 am

Hi Guys,

Can I ask you to download and install this version of L3DT Standard:

http://www.bundysoft.com/L3DT/downloads/standard/dev/L3DT_SE_dev-2.6.0.19.exe

After you've installed this version, please load or create a map project that contains (at least) a heightfield, water map and texture map. Note that since this is the standard edition, it won't load projects from the L3DT Pro that contain large mosaic maps.

Anyway, once you've got your project ready, please select the 'Scripts->1 - Sapphire Texture Test' menu item. This will run a sequence of 7 tests, in which each usage of texture maps in Sapphire is tested one-by-one. The Sapphire window will open and close for each test, and at each stage it will pop-up a message box stating what it is doing.

If/when L3DT crashes, please reply back here with the text from the last message box shown (e.g "Closing test 2: skybox").

Your help is greatly appreciated.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Deathsong » Sat Jan 24, 2009 4:08 pm

Crashes right after the first test when sapphire exits for the first time.
Deathsong
Member
 
Posts: 10
Joined: Tue Dec 16, 2008 11:55 pm

Postby Aaron » Sun Jan 25, 2009 4:16 am

Hi Deathsong,

Okay, I guess that means the crash is not related to textures, since they're all disabled in the first test.

I should have done this a long time ago, but I've now sprinkled Sapphire with calls to 'glGetError' to check for any OpenGL error states. This has already shown that I was making an error in my water map rendering code, by calling glFog between glBegin and glEnd (which is not allowed). Anyway, these extra error checks might be able to identify errors in the OpenGL state that cause the crash.

Please download this update to Sapphire:

http://www.bundysoft.com/L3DT/downloads/plugins/bin/Sapphire-bin.zip

To install it, extract the plugin from the zip file, and copy it over the one at:

Code: Select all
C:\Program Files (x86)\Bundysoft\L3DT Standard 2.6.0.19\Extensions\Sapphire.zeo


Once you've done this, please run the 'Sapphire Texture Test' script again. If/when it crashes, please send me the 'log.txt' logfile, which you can get from the start menu under:

Code: Select all
All programs\Bundysoft\L3DT Standard 2.6.0.19\L3DT logs


Thank-you again for your patience and help with debugging.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Deathsong » Mon Jan 26, 2009 10:37 pm

Still crashes when saphire closes after the first test.
Deathsong
Member
 
Posts: 10
Joined: Tue Dec 16, 2008 11:55 pm

Postby Aaron » Tue Jan 27, 2009 9:19 am

Hi Deathsong,

Thank-you for trying that test. This means the ATI driver is crashing without having flagged any OpenGL errors to indicate that Sapphire has done something wrong.

I guess the next step is to de-activate more OpenGL components to see if we can get anything to work. Could you please try to open and close the 'Azurite' OpenGL mesh viewer plugin? It's available in the menu under 'Extensions->Azurite->View heightfield mesh' (description/screenshots here). Azurite uses a very basic subset of OpenGL, and doesn't include textures, fog or transparency. Thus, if it runs, it might indicate a workaround to the driver bug may be to disable textures, fog or transparency in Sapphire. Please let me know how it goes.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Deathsong » Thu Jan 29, 2009 5:51 am

That seems to work without a hiccup.
Deathsong
Member
 
Posts: 10
Joined: Tue Dec 16, 2008 11:55 pm

Postby Aaron » Thu Jan 29, 2009 12:17 pm

Hi Deathsong,

Deathsong wrote:That seems to work without a hiccup.


Ah, the plot thickens! My (tentative) guess now is that the driver crash happens in response to the fog and/or transparency in Sapphire. Can you please load up a project in L3DT, then select the 'Extensions->ZeoScript->Run script' menu option, then copy the following code into the window, and click OK:

Code: Select all
new bool "TempBool"
set TempBool false
Sapphire.SetParam "Atmosphere.FogEnabled" bool TempBool
Sapphire.SetParam "WaterMap.IsShown" bool TempBool
Sapphire.ShowWndEx <map:HF> NULL NULL 8
MessageBox "Prepare to close" 64
Sapphire.HideWnd
MessageBox "Sapphire closed OK" 64


Please let me know how it goes.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

PreviousNext

Return to Bug reports

Who is online

Users browsing this forum: No registered users and 5 guests

cron