Search Unity

Is IL2CPP going to solve the broken AOT compiler?

Discussion in 'General Discussion' started by arturaz, Jun 19, 2014.

  1. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    Hi there.

    We're currently experiencing that the AOT support in current version of Mono is pretty abysymal.

    For example, given this code:

    Code (CSharp):
    1. using com.tinylabproductions.TLPLib.Functional;
    2. using Smooth.Pools;
    3.  
    4. namespace com.tinylabproductions.TLPLib.Iter {
    5.   public interface ICtx {
    6.     void release();
    7.   }
    8.  
    9.   public static class Ctx {
    10.     public static ICtx a<P1>(P1 p1) {
    11.       return Ctx<P1, Unit, Unit>.pool.Borrow().set(p1, F.unit, F.unit);
    12.     }
    13.  
    14.     public static ICtx a<P1, P2>(P1 p1, P2 p2) {
    15.       return Ctx<P1, P2, Unit>.pool.Borrow().set(p1, p2, F.unit);
    16.     }
    17.  
    18.     public static ICtx a<P1, P2, P3>(P1 p1, P2 p2, P3 p3) {
    19.       return Ctx<P1, P2, P3>.pool.Borrow().set(p1, p2, p3);
    20.     }
    21.   }
    22.  
    23.   public class Ctx<P1, P2, P3> : ICtx {
    24.     public static Pool<Ctx<P1, P2, P3>> pool = new Pool<Ctx<P1, P2, P3>>(
    25.       () => new Ctx<P1, P2, P3>(),
    26.       ctx => ctx.reset()
    27.     );
    28.  
    29.     public P1 _1 { get; private set; }
    30.     public P2 _2 { get; private set; }
    31.     public P3 _3 { get; private set; }
    32.  
    33.     internal ICtx set(P1 p1, P2 p2, P3 p3) {
    34.       _1 = p1;
    35.       _2 = p2;
    36.       _3 = p3;
    37.       return this;
    38.     }
    39.  
    40.     public void reset() {
    41.       _1 = default(P1);
    42.       _2 = default(P2);
    43.       _3 = default(P3);
    44.     }
    45.  
    46.     public void release() { pool.Release(this); }
    47.   }
    48. }
    49.  
    We get:

    ExecutionEngineException: Attempting to JIT compile method 'com.tinylabproductions.TLPLib.Iter.Ctx:a<System.Collections.Generic.IList`1<string>, int, bool> (System.Collections.Generic.IList`1<string>,int,bool)' while running with --aot-only.


    at com.tinylabproductions.TLPLib.Iter.IterExts.iter[String] (IList`1 list, Boolean reverse) [0x00000] in <filename unknown>:0

    at com.tinylabproductions.TLPLib.Configuration.Config.getConcrete[JSONClass] (IList`1 parts, com.tinylabproductions.TLPLib.Configuration.Parser`1 parser) [0x00000] in <filename unknown>:0

    at com.tinylabproductions.TLPLib.Configuration.Config.fetchSubConfig (System.String key) [0x00000] in <filename unknown>:0

    at com.tinylabproductions.TLPLib.Configuration.Config.trySubConfig (System.String key) [0x00000] in <filename unknown>:0

    at com.tinylabproductions.TLPLib.Configuration.Config.getSubConfig (System.String key) [0x00000] in <filename unknown>:0

    at TLPConfig..ctor (com.tinylabproductions.TLPLib.Configuration.Config config) [0x00000] in <filename unknown>:0

    at TLPConfig.<apply>m__14A (com.tinylabproductions.TLPLib.Configuration.Config c) [0x00000] in <filename unknown>:0

    at com.tinylabproductions.TLPLib.Concurrent.FutureExts+<map>c__AnonStorey7B`2[com.tinylabproductions.TLPLib.Configuration.Config,TLPConfig].<>m__16E (com.tinylabproductions.TLPLib.Configuration.Config v) [0x00000] in <filename unknown>:0

    UnityEngine.Debug:Internal_LogException(Exception, Object)

    UnityEngine.Debug:LogException(Exception)

    com.tinylabproductions.TLPLib.Logger.Log:error(Exception)

    com.tinylabproductions.TLPLib.Functional.Option`1:each(Act`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:tryComplete(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:complete(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:completeError(Exception)

    com.tinylabproductions.TLPLib.Concurrent.<map>c__AnonStorey7B`2:<>m__16E(Config)

    com.tinylabproductions.TLPLib.Functional.Try`1:voidFold(Act`1, Act`1)

    com.tinylabproductions.TLPLib.Concurrent.<map>c__AnonStorey7B`2:<>m__16C(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:completed(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:tryComplete(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:complete(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:completeSuccess(Config)

    com.tinylabproductions.TLPLib.Concurrent.<map>c__AnonStorey7B`2:<>m__16E(JSONClass)

    com.tinylabproductions.TLPLib.Functional.Try`1:voidFold(Act`1, Act`1)

    com.tinylabproductions.TLPLib.Concurrent.<map>c__AnonStorey7B`2:<>m__16C(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:completed(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:tryComplete(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:complete(Try`1)

    com.tinylabproductions.TLPLib.Concurrent.FutureImpl`1:completeSuccess(JSONClass)

    com.tinylabproductions.TLPLib.Configuration.<getConfiguration>c__Iterator1E:MoveNext()


    (Filename: Line: -1)

    Practically it seems that AOT fails on it's head regarding everything but the most trivial cases.

    With the advent of IL2CPP and new mono coming up, can we expect that this situation will improve? Or will it actually worsen (given the case that AOT failures will eventually apply to MORE platforms than it does now)?
     
  2. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    3,964
    Most likelly yes. That's the idea.
    You can ask Ralph in this the official IL2CPP thread: here.
     
  3. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    12,312
    I believe there's an XML file somewhere you can specify stuff to explicitly include in a JIT compile. I'd suggest looking for/checking that out.
     
  4. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    Also I was wondering - does mono has an interpreted mode? I know interpreting is dog slow, but atleast it would work on iOS.
     
  5. joncham

    joncham

    Unity Technologies

    Joined:
    Dec 1, 2011
    Posts:
    251
    Can you post a full test case (or better yet file a bug) with this information? We could quickly test the current state of this with il2cpp.
     
    AndrewGrayGames and arturaz like this.
  6. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    Hey there.

    Great :) Let me just rewrite all those weird hacks I've done to try and comply with AOT compilers quirks and provide you with a standard version of C# code which should be compiled under il2cpp.

    Will get back in a few hours.
     
  7. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    By the way, you mentioned in Unite that generic virtual / interface generic methods are a problem for AOT.

    Why is it so? For example:

    Code (CSharp):
    1.   public interface Lazy<out A> {
    2.     bool initialized { get; }
    3.     A get { get; }
    4.     // For those cases where we want it happen as a side effect.
    5.     A getM();
    6.     B map<B>(Fn<A, B> mapper);
    7.   }
    8.  
    9.   public class LazyImpl<A> : Lazy<A> { ... }
    I know that you can't statically infer that Lazy#map call is something. However you can infer that if somewhere in the code `new LazyImpl<A>(func)` is being used, then LazyImpl#map will be used and generate code for that.

    Or am I missing something?
     
  8. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    OK. This is not much fun.

    I've tried to make the code regular C#, but Mono compiler died on me with:

    Code (csharp):
    1. Internal compiler error. See the console log for more information. output was:Assets/Code/Data/PlayerState.cs(347,17): warning CS0168: The variable `highScoreSharingDelay' is declared but never used
    2. Assets/Vendor/TLPGame/TLPCrossPromotion.cs(130,22): warning CS0618: `UnityEngine.Rect.left' is obsolete: `use xMin'
    3. Assets/Vendor/TLPGame/TLPCrossPromotion.cs(131,22): warning CS0618: `UnityEngine.Rect.top' is obsolete: `use yMin'
    4. Assets/Vendor/TLPLib/Concurrent/ASync.cs(29,37): warning CS0168: The variable `_' is declared but never used
    5.  
    6. Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
    7.  
    8. Parameter name: typeArguments
    9.  
    10.   at System.Type.MakeGenericType (System.Type[] typeArguments) [0x00000] in <filename unknown>:0
    11.  
    12.   at Mono.CSharp.TypeInferenceContext.InflateGenericArgument (System.Type parameter) [0x00000] in <filename unknown>:0
    13.  
    14.   at Mono.CSharp.LambdaExpression.ResolveParameters (Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeInferenceContext tic, System.Type delegateType) [0x00000] in <filename unknown>:0
    15.  
    16.   at Mono.CSharp.AnonymousMethodExpression.CompatibleMethod (Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeInferenceContext tic, System.Type return_type, System.Type delegate_type) [0x00000] in <filename unknown>:0
    17.  
    18.   at Mono.CSharp.AnonymousMethodExpression.InferReturnType (Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeInferenceContext tic, System.Type delegate_type) [0x00000] in <filename unknown>:0
    19.  
    20.   at Mono.CSharp.TypeInferenceContext.OutputTypeInference (Mono.CSharp.ResolveContext ec, Mono.CSharp.Expression e, System.Type t) [0x00000] in <filename unknown>:0
    21.  
    22.   at Mono.CSharp.TypeInference.DoSecondPhase (Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeInferenceContext tic, System.Type[] methodParameters, Boolean fixDependent) [0x00000] in <filename unknown>:0
    23.  
    24.   at Mono.CSharp.TypeInference.InferInPhases (Mono.CSharp.ResolveContext ec, Mono.CSharp.TypeInferenceContext tic, Mono.CSharp.AParametersCollection methodParameters) [0x00000] in <filename unknown>:0
    25.  
    26.   at Mono.CSharp.TypeInference.InferMethodArguments (Mono.CSharp.ResolveContext ec, System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
    27.  
    28.   at Mono.CSharp.TypeManager.InferTypeArguments (Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments arguments, System.Reflection.MethodBase& method) [0x00000] in <filename unknown>:0
    29.  
    30.   at Mono.CSharp.MethodGroupExpr.IsApplicable (Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& arguments, Int32 arg_count, System.Reflection.MethodBase& method, System.Boolean& params_expanded_form) [0x00000] in <filename unknown>:0
    31.  
    32.   at Mono.CSharp.MethodGroupExpr.OverloadResolve (Mono.CSharp.ResolveContext ec, Mono.CSharp.Arguments& Arguments, Boolean may_fail, Location loc) [0x00000] in <filename unknown>:0
    33.  
    34.   at Mono.CSharp.Invocation.DoResolveOverload (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
    35.  
    36.   at Mono.CSharp.Invocation.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
    37.  
    38.   at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0
    39.  
    40.   at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0
    41.  
    42.   at Mono.CSharp.Return.DoResolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0
    43.  
    44.   at Mono.CSharp.ExitStatement.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0
    45.  
    46.   at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0
    47.  
    48.   at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename unknown>:0
    49. (Filename:  Line: 0)
    Because it doesn't emit a line number I can't find it where it breaks... So no IL is generated here.

    Then I reverted to my last attempt to please AOT compiler. That works on iOS platform while running to editor, but as soon as I switch to web player, I get this runtime error:

    Code (csharp):
    1. BadImageFormatException: Error verifying com.tinylabproductions.TLPLib.Binding.DFBind/<clicksObservable>c__AnonStorey5A`1:<>m__F4 (com.tinylabproductions.TLPLib.Reactive.IObserver`1<System.Tpl`2<A, dfMouseEventArgs>>): Invalid generic type (!!!!0) (argument out of range or method is not generic) at 0x0032
    2. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[System.Tpl`2[dfSprite,dfMouseEventArgs]].<trySubscribe>m__234 () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:187)
    3. com.tinylabproductions.TLPLib.Functional.Option.fold[ISubscription,Boolean] (Option`1 opt, System.Fn`1 ifEmpty, System.Fn`2 ifNonEmpty) (at Assets/Vendor/TLPLib/Functional/Option.cs:59)
    4. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[System.Tpl`2[dfSprite,dfMouseEventArgs]].trySubscribe () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:185)
    5. com.tinylabproductions.TLPLib.Reactive.Observable`1[System.Tpl`2[dfSprite,dfMouseEventArgs]].<subscribe>m__209 (com.tinylabproductions.TLPLib.Reactive.SourceProperties _) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    6. com.tinylabproductions.TLPLib.Functional.Option`1[com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[System.Tpl`2[dfSprite,dfMouseEventArgs]]].each (System.Act`1 action) (at Assets/Vendor/TLPLib/Functional/Option.cs:118)
    7. com.tinylabproductions.TLPLib.Reactive.Observable`1[System.Tpl`2[dfSprite,dfMouseEventArgs]].subscribe (System.Act`1 onChange) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    8. com.tinylabproductions.TLPLib.Reactive.Observable`1+<mapImpl>c__AnonStoreyA1`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single],com.tinylabproductions.TLPLib.Reactive.IObservable`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<>m__20C (IObserver`1 obs) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:277)
    9. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]].<trySubscribe>m__234 () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:187)
    10. com.tinylabproductions.TLPLib.Functional.Option.fold[ISubscription,Boolean] (Option`1 opt, System.Fn`1 ifEmpty, System.Fn`2 ifNonEmpty) (at Assets/Vendor/TLPLib/Functional/Option.cs:59)
    11. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]].trySubscribe () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:185)
    12. com.tinylabproductions.TLPLib.Reactive.Observable`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]].<subscribe>m__209 (com.tinylabproductions.TLPLib.Reactive.SourceProperties _) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    13. com.tinylabproductions.TLPLib.Functional.Option`1[com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].each (System.Act`1 action) (at Assets/Vendor/TLPLib/Functional/Option.cs:118)
    14. com.tinylabproductions.TLPLib.Reactive.Observable`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]].subscribe (System.Act`1 onChange) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    15. com.tinylabproductions.TLPLib.Reactive.Observable`1+<bufferImpl>c__AnonStoreyA7`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single],com.tinylabproductions.TLPLib.Reactive.IObservable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]]].<>m__20F (IObserver`1 obs) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:311)
    16. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<trySubscribe>m__234 () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:187)
    17. com.tinylabproductions.TLPLib.Functional.Option.fold[ISubscription,Boolean] (Option`1 opt, System.Fn`1 ifEmpty, System.Fn`2 ifNonEmpty) (at Assets/Vendor/TLPLib/Functional/Option.cs:59)
    18. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].trySubscribe () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:185)
    19. com.tinylabproductions.TLPLib.Reactive.Observable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<subscribe>m__209 (com.tinylabproductions.TLPLib.Reactive.SourceProperties _) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    20. com.tinylabproductions.TLPLib.Functional.Option`1[com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]]].each (System.Act`1 action) (at Assets/Vendor/TLPLib/Functional/Option.cs:118)
    21. com.tinylabproductions.TLPLib.Reactive.Observable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].subscribe (System.Act`1 onChange) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    22. com.tinylabproductions.TLPLib.Reactive.Observable`1+<filterImpl>c__AnonStoreyA4`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]],com.tinylabproductions.TLPLib.Reactive.IObservable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]]].<>m__20E (IObserver`1 obs) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:297)
    23. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<trySubscribe>m__234 () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:187)
    24. com.tinylabproductions.TLPLib.Functional.Option.fold[ISubscription,Boolean] (Option`1 opt, System.Fn`1 ifEmpty, System.Fn`2 ifNonEmpty) (at Assets/Vendor/TLPLib/Functional/Option.cs:59)
    25. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].trySubscribe () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:185)
    26. com.tinylabproductions.TLPLib.Reactive.Observable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<subscribe>m__209 (com.tinylabproductions.TLPLib.Reactive.SourceProperties _) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    27. com.tinylabproductions.TLPLib.Functional.Option`1[com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]]].each (System.Act`1 action) (at Assets/Vendor/TLPLib/Functional/Option.cs:118)
    28. com.tinylabproductions.TLPLib.Reactive.Observable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].subscribe (System.Act`1 onChange) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    29. com.tinylabproductions.TLPLib.Reactive.Observable`1+<withinTimeframeImpl>c__AnonStoreyAE`1[System.Tpl`2[dfSprite,dfMouseEventArgs],com.tinylabproductions.TLPLib.Reactive.IObservable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]]].<>m__213 (IObserver`1 obs) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:387)
    30. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<trySubscribe>m__234 () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:187)
    31. com.tinylabproductions.TLPLib.Functional.Option.fold[ISubscription,Boolean] (Option`1 opt, System.Fn`1 ifEmpty, System.Fn`2 ifNonEmpty) (at Assets/Vendor/TLPLib/Functional/Option.cs:59)
    32. com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].trySubscribe () (at Assets/Vendor/TLPLib/Reactive/Observable.cs:185)
    33. com.tinylabproductions.TLPLib.Reactive.Observable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].<subscribe>m__209 (com.tinylabproductions.TLPLib.Reactive.SourceProperties _) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    34. com.tinylabproductions.TLPLib.Functional.Option`1[com.tinylabproductions.TLPLib.Reactive.Observable`1+SourceProperties[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]]].each (System.Act`1 action) (at Assets/Vendor/TLPLib/Functional/Option.cs:118)
    35. com.tinylabproductions.TLPLib.Reactive.Observable`1[com.tinylabproductions.TLPLib.Collection.ReadOnlyLinkedList`1[System.Tpl`2[System.Tpl`2[dfSprite,dfMouseEventArgs],System.Single]]].subscribe (System.Act`1 onChange) (at Assets/Vendor/TLPLib/Reactive/Observable.cs:254)
    36. PlayerState.Start () (at Assets/Code/Data/PlayerState.cs:72)
    Which is EH?

    If I switch it to PC standalone - it builds and runs fine within the editor. I'm attaching the code in a bug report - have fun with it.

    I've sent the project as a bug with Unity bug reporting tool. Waiting for an email to arrive to my inbox so I could link it here. The subject of bug contains "IL2CPP test case" in case you want to find it in fogbugz.

    In case you need a quick and responsive chat, you can IM me at skype: arturaz_. I live in GMT+2 (now GMT+3 because of DST) time zone.
     
  9. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    BTW, I noticed the scene was not saved, so project settings might not have been saved as well. In case it does not compile on PC standalone add GOTWEEN;DFGUI to scripting define symbols.
     
  10. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    wccrawford, StarManta and arturaz like this.
  12. arturaz

    arturaz

    Joined:
    Mar 28, 2013
    Posts:
    26
    It is good to hear that this issue is being worked on.

    Would you guys be interested in a even more c#ish version compiled by ms compiler? Mono crashes on type inference stage right now, so we are planning to use ms compiler, at least until mono is updated.
     
  13. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    Couldn't that not just be translated to C++ templates? Or are some infos missing in the IL (that would be the case in Java)?
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    Yes, I would be happy to see something else that breaks the Mono compiler but works in the Microsoft compiler. We're always looking for test cases. Let me continue to work through this bug first. Once we get it to a good place, we can have a look at more code.
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,203
    I merged another change to move toward making this projects compile with IL2CPP. We still have have a few more things to handle, but I wanted to let you know that we are continuing to work on it.