Unity4.3 Error on device, Type: System.Runtime.InteropServices.SEHException

I’m using Unity4.3.0 and getting the following exception in the UnityPlayer log every time I run the game on the WP8 device. Game doesn’t crash, but using the profiler it seems the memory starts to climb rapidly following the error.

Exception: External component has thrown an exception.
Type: System.Runtime.InteropServices.SEHException
Module: UnityEngineProxy
InnerException:
AdditionalInfo:Invoking UnityEngine.SendMouseEvents::smile:oSendMouseEvents method with argument count: 2
at UnityEngineProxy.InternalCalls.Component_CUSTOM_GetComponent(Object self, Object type)

at UnityEngine.SendMouseEvents.DoSendMouseEvents(Int32 mouseUsed, Int32 skipRTCameras)

at lambda_method(Closure , Object , Object[ ] , Int32 )

at WinRTBridge.MethodTools.InvokeMethod(Object instance, Int32 methodIndex, Object[ ] args)

Hello. This is a known issue and are working at getting a fix out ASAP. Until then, the best you can do it wait…

Is there any update on this error ? We’re seeing a similar error very regularly in our WP build.

What’s the origin of this error ; is this specific to Windows Store applications? i.e. what about Windows Desktop Apps?

Try switching to 4.3.1, it should have been fixed there.

I’m working on Unity 4.3.2f1 and got the same problema when I try to use the WebCam:

WebCamDevice[ ] devices = WebCamTexture.devices;

What happens exactly?

any update on this?
i still get the same error on Unity 4.3.2f1

Exception: External component has thrown an exception.
Type: System.Runtime.InteropServices.SEHException
Module: UnityEngineProxy
InnerException: <No Data>
AdditionalInfo:<No Data>
   at UnityEngineProxy.InternalCalls.Transform_CUSTOM_INTERNAL_get_position(Object self, Int32 paramValue)

   at UnityEngine.Transform.INTERNAL_get_position(Vector3 value)
..........................

*this error happens only in Master configuration when parenting transform via script

Hmm that’s strange, the issue that was really common and showed up everytime was fixed in 4.3.1. Can you report a bug?

Same problem, except with windows store apps. Haven’t had this before (I’ve deployed plenty of apps to the same device in question).

Unity version is 4.3.2f1

Can you report a bug with a repro project attached?

4.3.3 here.
Exception when trying to “GetComponent()” from a MonoBehaviour.

Exception: External component has thrown an exception.
Type: System.Runtime.InteropServices.SEHException
Module: UnityEngineProxy
InnerException: <No Data>
AdditionalInfo:<No Data>
   at UnityEngineProxy.InternalCalls.Component_CUSTOM_GetComponent(Object self, Object type)
   at UnityEngine.Component.GetComponent[T]()
.................................

The bug is occured occasionally when I build the game.
*Sometimes there’s no exception if i rebuild the game.

Well, the only thing I can advice is to fill a bug report. We still don’t have a repro and I have no idea what could cause this.

Has a bug for this been logged? I can not find one in the bug system we getting a similar error.

Exception: External component has thrown an exception.
Type: System.Runtime.InteropServices.SEHException
Module: UnityEngineProxy
InnerException:
AdditionalInfo:
at UnityEngineProxy.InternalCalls.PInvokeCalls.GameObject_CUSTOM_GetComponentByName(Int32 param_0, Int32 param_1)
at UnityEngineProxy.InternalCalls.GameObject_CUSTOM_GetComponentByName(Object self, String type)
at SpriteFactory.GetFromCache(String sprite)
at SpriteFactory.CachedGameObject(Int32 x, Int32 y, String scriptname)
at SpriteFactory.NewSplat(Int32 x, Int32 y)
at Goop.FixedUpdate()
at Goop.UnityFastInvoke_FixedUpdate()

This is invoked in the code below. We are fetching a game object from a cache list. I am evaluating if we have accidentally kept the cached list between levels and the gameObjects we are searching for are actually destroyed. I don’t suspect so though since we don’t see this all the time.

	public static GameObject GetFromCache(string sprite){
		if (cachedSprites.ContainsKey(sprite)){
			List<GameObject> list=cachedSprites[sprite];
			if (list.Count>0){
				GameObject gameObject=list[list.Count-1];
				list.RemoveAt(list.Count-1);
				if (sprite.EndsWith("Center")){
					sprite=sprite.Substring(0,sprite.Length-6);
				}
				Sprite s=(Sprite)gameObject.GetComponent(sprite);
				s.enabled=true;
				s.renderer.enabled=true;
				s.instantMove=true;
				s.currentSprite=-1;
				
				return gameObject;
			}
		}
#if UNITY_EDITOR
		Debug.Log ("Cache Miss "+sprite);
#endif
		return null;
	}

Hi,

we did not receive a bug report nor we were able to reproduce it ourselves. Please submit it if you can.

In the meanwhile, could you try using gameObject.GetComponent() instead of non generic version? It should perform better and since the exception is thrown on that line, it may be able to fix it.

Hi,
I using 4.5.3f get pretty same error message, for controller I use standard script from standard asset(mobile).

Hello, I’ve filled a bug report about this problem. You can vote on it here:

Thanks!

Hi,

thanks for reporting the issue! The fix should be included into next weeks patch release (it was too late to include it to tomorrows release).