-
Notifications
You must be signed in to change notification settings - Fork 702
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
Crash on calling WebViewObject.SetVisibility(false) on Editor mode #11
Comments
Ok, within Xcode, with Product > Attach to process to Unity enables to deug Unity project. The problems is the line at glPixelStorei, samplesPerPixel is 0.
Any ideas? |
Actually, it also crashes when calling SetMargins... For SetMargins, I have a fix, but because it still crashes in some situations, I haven't done any pull request yet. For SetMargins the problem is that the texture is destroyed while it may still being used by the rendering thread, since the GL.IssuePluginEvent((int)webView); issues the command but it may not be rendered until the next frame. I fixed that by temporarily disabling rendering OnGUI with a flag that is set when SetMargins is called. I yield for a couple of frames, destroy the texture, create the new one, and set the flag back to normal, so OnGUI resumes execution. It may be unrelated to the SetVisibility crash, but I also get some texture errors when it crashes on SetVisibility. I'll try to investiga further... As a workaround, when I'm in the editor, instead of calling obj.SetVisibility(false) I do obj.enabled = false. #if UNITY_EDITOR
// SetVisibility(false) makes Unity Editor crash! :(
mWebViewObject.enabled = false;
#else
mWebViewObject.SetVisibility(false);
#endif |
I've tried the latest (should be very different from one caused crashes) and it seems to cause no crash. Please reopen the issue if you need any assistance further. |
Fix Java Null Bug
Hello,
Unity Editor crashes when WebViewObject.SetVisibility(false) is called.
I put a button and call Unity.call('close') in the html then make the webview to be closed when it received 'close' message.
The message is correctly arrived on Unity but it crashes when it calls WebViewObject.SetVisibility(false).:
The only differences what I've changed is putting code which check the message then change the visibility of the webviewObject.
I ran it on OSX 10.8.2.
I also tried to do clean build the OSX plugin with Xcode 4.6. Building 32bit bundle has no problem, but got bunch of errors with 64bit bundle.
Is there any way to debug OSX bundle when Unity is on play mode?
-Kim
The text was updated successfully, but these errors were encountered: