3D objects disappear after waking up from sleep mode

Software: Away3D 4.x

GaryLai, Newbie
Posted: 10 May 2012 09:01 AM   Total Posts: 2

Hi Guys,

I was working on my Away3d project and accidentally discovered that when my computer waking up from sleep mode all the 3d objects disappear. After googling a bit, I found that we have to send the objects to RAM again after sleep mode. I followed the guideline, but without success.

Does anyone has a clue?

Best,
GaryLai

   

John Brookes, Moderator
Posted: 10 May 2012 10:20 AM   Total Posts: 732   [ # 1 ]

Use activate deactivate listeners to pause the enterframe/physics step when the swf loses focus.

   

GaryLai, Newbie
Posted: 11 May 2012 03:41 AM   Total Posts: 2   [ # 2 ]

Still not working…Does it have something to do with AIR? I use AIR to package my project.

   

Avatar
Fabrice Closier, Administrator
Posted: 11 May 2012 08:45 AM   Total Posts: 1265   [ # 3 ]

It is not AIR related I think, at least not on mac side. I have often Prefab open when mac goes to sleepmode, it continues to run/behave/display all normally once awake. Same behavior in adl or app.

   

Avatar
Cheng Liao, Administrator
Posted: 11 May 2012 08:52 AM   Total Posts: 116   [ # 4 ]

This will happen on windows(using graphics card) or android system.
Please get the particlesfeature branch,and have a try. smile

   

claudeNW, Newbie
Posted: 11 May 2012 10:13 AM   Total Posts: 7   [ # 5 ]

HI

I have noticed the same issue after changing the mobile orientation (Smartphone or Tablet) apart in emulation mode for which the scene is preserved and adapted to the new screen orientation.
The scene simply disappears. At this stage you have no other choice than stop the application to reload it.
Any idea?

Claude

   

joe3d, Newbie
Posted: 15 May 2012 01:56 AM   Total Posts: 2   [ # 6 ]

I have a customer with this problem. I can’t replicate it, however, on win7 x64 or winxp x64, radeon or nvidia. Could someone suffering from this problem please post their system details, eg., os, graphics card, so I can have a look at what might cause this?

(Not that I’m ‘on the team’ - so to speak, just wanna help!)

Thanks in advance,

Joe

   

Avatar
Cheng Liao, Administrator
Posted: 15 May 2012 03:47 AM   Total Posts: 116   [ # 7 ]

Hi all,
In Adobe flash player 11.2 release note,it said
  “Applications need to handle device loss. Device loss occurs when the underlying gpu rendering context becomes unavailable to the application. The easiest ways to trigger device loss are to hit control+alt+delete on a Windows machine, or rotate an Android device while running an AIR app whose app descriptor includes <autoOrients>true</autoOrients>. You may experience device loss after navigating away from an application and then coming back to it. For testing purposes, you can also explicitly call context3D.dispose() to trigger device loss. In all of these cases, the underlying gpu context must be recreated and all your existing gpu resources become invalid. Event.CONTEXT3D_CREATE will be fired when device loss occurs. The application should handle this event by re-uploading textures and reconstructing vertex and index buffers. This will allow the application to resume rendering with texture, vertex, and index buffer objects that are valid for the new gpu context.”
So I try to sovle it on https://github.com/away3d/away3d-core-fp11/tree/particlesfeature.

   

joe3d, Newbie
Posted: 15 May 2012 04:20 AM   Total Posts: 2   [ # 8 ]

Thankyou! I should have done as instructed, and got the branch you mentioned. The customer must have gone to a lock screen or something when the screen saver came on, whereas I didn’t. The ol’ three-finger-salute caused the loss for me, however.

Now, with the particlesfeature branch it works for me.

Thanks

Joe

   

Jonathan, Newbie
Posted: 27 August 2012 05:52 AM   Total Posts: 7   [ # 9 ]

Has there been any progress on this?
liaocheng branch seems to fix the device loss problem in specific case such as ctrl + alt + del but when awakening from sleep mode under windows I still get the black/white screen in flex/AIR.

Here is a demo:
http://jonathanpl.com/testing/deviceloss/

Under windows click on start>sleep and when coming back the application will be fronzen.

This as been tested under Windows 7 64bit with a an nvidia GTX 480

private var view:View3D
   
private var sphere:Mesh = new Mesh(new SphereGeometry())
   
   private function 
addedToStage(e:Event):void{
    view 
= new View3D()
    
view.width 800;
    
view.height 600;
    
comp.addChild(view);
    
view.scene.addChild(sphere);
    
this.addEventListener(Event.ENTER_FRAME,enterFrame);
   
}
    
   
private function enterFrame(e:Event):void{
    
if(view)
     
view.render();
     
sphere.rotationY++;
   

Can others confirm the bug or is it just me?

   

laurent, Newbie
Posted: 28 August 2012 03:24 PM   Total Posts: 29   [ # 10 ]

When coming back from sleep mode it works for me : the sphere rotation continues (Windows 7 64 bit + chrome with native flash plugin + Nvidia GT 555M)

   

Jonathan, Newbie
Posted: 28 August 2012 05:16 PM   Total Posts: 7   [ # 11 ]

Interesting.
What seems to happen for me is that the context3d.driverinfo never changes to “Disposed” when going into sleep mode. However it will change when using ctrl + alt + del.

The problem will happen in AIR as well as flex tested in every browser. My drivers are up to date on the GTX 480.

Can anyone else try on a GTX 480?

   

laurent, Newbie
Posted: 29 August 2012 08:54 AM   Total Posts: 29   [ # 12 ]
liaocheng - 15 May 2012 03:47 AM

So I try to sovle it on https://github.com/away3d/away3d-core-fp11/tree/particlesfeature.

@liaocheng: can you tell what is the commit / code doing that? I am using a modified version of away3D and I cannot upgrade to your branch.

Thanks a lot!

   

Avatar
Cheng Liao, Administrator
Posted: 29 August 2012 01:58 PM   Total Posts: 116   [ # 13 ]

You can see this commit:
https://github.com/away3d/away3d-core-fp11/commit/e561777edf244ecf5b6e553612d4359839d260c1

   

laurent, Newbie
Posted: 29 August 2012 04:26 PM   Total Posts: 29   [ # 14 ]

It works like a charm now, thanks again liaocheng!

   

Raj, Newbie
Posted: 10 September 2012 12:42 PM   Total Posts: 9   [ # 15 ]
laurent - 29 August 2012 04:26 PM

It works like a charm now, thanks again liaocheng!

Hey laurent,

what you did to make it work?? i’m too having this issue on Android-AIR during orientation change…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X