Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
sunkas85 #1
Member since Aug 2012 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: ExecutionEngineException in iOS build
Hi

Building a facebook chat client for iOS using Unity/MonoDevelop/C# I get the following error when running:

ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native)
System.Threading.Interlocked:CompareExchange 
(System.EventHandler`1<Matrix.EventArgs>&,System.EventHandler`1<Matrix.EventArgs>,
System.Eve ntHandler`1<Matrix.EventArgs>)' while running with --aot-only.

  at Matrix.Net.BaseSocket.add_OnConnect (System.EventHandler`1 value) [0x00000]
in <filename unknown>:0
  at Matrix.XmppStream..ctor (StreamType type) [0x00000] in <filename unknown>:0
  at Matrix.Xmpp.Client.XmppClient..ctor () [0x00000] in <filename unknown>:0
  at TestFacebook.setup () [0x00000] in <filename unknown>:0
  at TestFacebook.Start () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

Originating from the line:

xmppClient.OnBeforeSasl += this.xmppClient_OnBeforeSasl;

which is mandatory for connect to facebook according to http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope…

The custom delegate method is declared as:
public void xmppClient_OnBeforeSasl(object sender, Matrix.Xmpp.Sasl.SaslEventArgs e)
    { ... }

According to http://forum.unity3d.com/threads/113750-ExecutionEngineExc… "it is not possible to hook up a C# event handler on iOS if that event resides in a 3rd party C# DLL" which is what I am trying to do. They post a workaround on the page but get the feeling that you need to modify the library code to get it working.

It is working fine in Unity, but once deployed on a iOS device it fails.

Any ideas anyone?
Avatar
Alex #2
Member since Feb 2003 · 4308 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

I studied the link you posted. I think the solution is in post #758362.
This would require lots of changes in MatriX because its using events everywhere.
And do be honest I am not keen to make these changes. Also because we don't know if this is the only problem, or more problem arise after the first one is fixed.

Is there no compiler flag which does this automatically?
Is this really the only solution?

Alex
This post was edited on 2012-08-22, 14:13 by Alex.
Avatar
Alex #3
Member since Feb 2003 · 4308 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This is solved an MatriX works fine on iOS in the meantime.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS