Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional crash in away3d.stereo.StereoView3D.as / away3d.stereo.StereoRenderer.as (stereofeature branch) #466

Closed
bibeks opened this issue Jan 23, 2013 · 1 comment
Labels

Comments

@bibeks
Copy link

bibeks commented Jan 23, 2013

Hi,

In StereoView3D / StereoRenderer, if you call StereoView3D.render() before context3D is fully set up, it causes a "null reference error" and the program crashes (unless you're catching null pointer refs). This works fine with the normal View3D.

The problem is in StereoRenderer.as, line 141:
_program3D = stage3DProxy.context3D.createProgram();

If you call render() too early, then "context3D" is null.

Given the setup of this system, I'm not sure where the appropriate place to check is, or what error to throw if context3D is null.

The best I could figure out is to add the following code to StereoView3D.as, at line 74:
//if context3D not active, don't render at this frame
if (!stage3DProxy.context3D) {
return;
}

(View3D does a similar sanity check - for something different - so I followed that model for my quick patch.)

All the best, and thanks for all the hard work.

  • Bibek
@ghost ghost assigned richardolsson Jan 23, 2013
gonchar pushed a commit that referenced this issue Jan 6, 2014
@gonchar
Copy link
Member

gonchar commented Jan 6, 2014

thank you for the issue!

@gonchar gonchar closed this as completed Jan 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants