Engine aborts when switching tasks in fullscreen

Think you found a bug ? This is where to go...

Moderator: Brume Dev Team

Engine aborts when switching tasks in fullscreen

Postby Bartman on Sun Jan 13, 2008 7:17 pm

Hi

There seems to be a problem when switching from a Brume app to another app in full screen. After switching twice, the engine aborts at:


> Brume.exe!Brume.DirectX9GraphicApi.ResetDevice() Line 155 C#
Brume.exe!Brume.DirectX9GraphicApi.AttemptGraphicCardRecovery() Line 106 + 0x8 bytes C#
Brume.exe!Brume.Brume.OnApplicationIdle(object sender = {System.Threading.Thread}, System.EventArgs e = {System.EventArgs}) Line 257 + 0xc bytes C#
[External Code]
Brume.exe!Brume.Brume.Play() Line 224 + 0x7 bytes C#
Brume.exe!Brume.Tests.Game.RunDemo() Line 2234 + 0x7 bytes C#
Brume.exe!Brume.Tests.Game.Main() Line 2242 + 0xa bytes C#

You can test it with the Brume showcase (but run it in fullscreen)
Switch back and forth to another app a couple of times -> crash

Could you please have a look, that would be great, thanks
Bart
User avatar
Bartman
Brume user
 
Posts: 23
Joined: Wed Oct 11, 2006 7:01 am
Location: The Netherlands

Re: Engine aborts when switching tasks in fullscreen

Postby Silmaryls on Tue Jan 15, 2008 8:47 pm

Hi Bart,

I checked the demo on my Vista Pro and I can switch between Fullscreen/windowed many times.
Can you tell me what OS you are using ?
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Re: Engine aborts when switching tasks in fullscreen

Postby Bartman on Wed Jan 16, 2008 8:46 am

Hi Sylmarils

I'm using XP SP2, it has been reproduced on several systems with this OS (with our app). I've added a screenshot of the messagebox that appears before it aborts. If I run it with the debugger, after the messagebox, the debugger breaks with:

System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Microsoft.DirectX.Direct3DX"
StackTrace:
at Microsoft.DirectX.Direct3D.Sprite.OnLostDevice()
at Microsoft.DirectX.Direct3D.Sprite.OnParentLost(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at Microsoft.DirectX.Direct3D.Device.raise_DeviceLost(Object i1, EventArgs i2)
at Microsoft.DirectX.Direct3D.Device.Finalize()

And than aborts, probably because there's no source for this location as it seems to be inside MS namespace

Hope this will give you a clue, but I guess you need XP to reproduce it...

Thanks
Bart
Attachments
brumeerror.JPG
Errormessage
User avatar
Bartman
Brume user
 
Posts: 23
Joined: Wed Oct 11, 2006 7:01 am
Location: The Netherlands

Re: Engine aborts when switching tasks in fullscreen

Postby Silmaryls on Mon Jan 21, 2008 10:07 pm

Hi Bart,

I finally managed to reproduce the problem once on XP. But then I wanted to test it in DX debug mode ... I never reproduced it again :x
What is sure is : there is a bug ! Because even if I didn't reproduce the problem, windows/fullscreen switch becomes very very long.
I think that this is linked to the VRAM size cause the PC I made my test on had a 8800 GTS with 640Mb VRAM. I think that on machines with less VRAM the bug may be easily reproduced.
I think the problem is that I do not release DEFAULT_POOL objects on device Reset as stated in the documentation. This is really a big issue and I will fix it for next release. I hope you can live without this feature for the moment.


By the way : I also found and fixed another bug. The window style was modified to "always on top" when switching from fullsreen to windowed mode. This one is already fixed for next release.
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Re: Engine aborts when switching tasks in fullscreen

Postby Bartman on Mon Oct 12, 2009 8:54 am

Bonjour!

After long time, a continuation of this question.

Will not releasing the video memory as described in the thread above lead to problems when starting/stopping a Brume based application many times without system boot?

I'm facing some issue that our tool, after a couple of days of development (and many runs), start acting weird... e.g the animations run slow, transparancy starts to fail/flicker in some places etc. A reboot solves this and everything runs smooth again. Strange thing is that framerate is still ok. I'v seen framerate of 1500 fps (NVIDIA GT280/2GB) while animations really look bad (as if its 4 fps...)

Any clues would be appreciated!

Thanks and regards

Bart
User avatar
Bartman
Brume user
 
Posts: 23
Joined: Wed Oct 11, 2006 7:01 am
Location: The Netherlands

Re: Engine aborts when switching tasks in fullscreen

Postby Silmaryls on Tue Oct 27, 2009 11:01 pm

Well it seems that dx leaks are never released after program completion.
The FPS/animation issue sounds strange : animations are on CPU so if the animations are slow, the FPS should go down accordingly.
I have no real solution for v1.6 as it needs a total rework of the resource managment.
If you have time for a port I can try to stabilize a version of v2.0 for you so you can work with it. But it will need a partial rewrite of your code.
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France


Return to Bugs In English

Who is online

Users browsing this forum: No registered users and 0 guests

cron