Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-880

[Bug]: Possible issue with Fody IL

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      What happened?

      Getting a crash in release build

      > Attempting to JIT compile method '(wrapper delegate-invoke) TeamApp.Realm.TeamId <Module>:invoke_callvirt_TeamId_Team (TeamApp.Realm.Team)' while running in aot-only mode

      I got this once previously when using ReactiveUI's Fody weaver attributes, and was able to resolve by removing them. I started down the path of verifying if moving to SG would fix it here, but the current SG limitations make it hard to move over (e.g. #3085).

      Repro steps

      Similar to my issues with ReactiveUI, this came about pretty randomly after having done several release builds with Realm. The only thing I can think of that I added as an EmbeddedObject for the first time. Seemingly random, however.

      Version

      10.18.0

      What SDK flavour are you using?

      Local Database only

      What type of application is this?

      Other

      Client OS and version

      iOS 15.6.1

      Code snippets

      No response

      Stacktrace of the exception/crash you're getting

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      This is somewhat obfuscated by being the poorly symbolicated stacktrace in Crashlytics:
      
      > Fatal Exception: System.ExecutionEngineException
      Attempting to JIT compile method '(wrapper delegate-invoke) TeamApp.Realm.TeamId <Module>:invoke_callvirt_TeamId_Team (TeamApp.Realm.Team)' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information. (System.ExecutionEngineException) at System.Linq.Expressions.Interpreter.FuncCallInstruction`2[[TeamApp.Realm.Team, TeamApp, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null],[TeamApp.Realm.TeamId, TeamApp, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]].Run(InterpretedFrame ) at System.Linq.Expressions.Interpreter.Interpreter.Run(InterpretedFrame ) at System.Linq.Expressions.Interpreter.LightLambda.Run(Object[] ) at System.Dynamic.Utils.DelegateHelpers.FuncThunk1[EventGame,Boolean](Func`2 handler, EventGame t1) at System.Linq.Enumerable.WhereListIterator`1[[TeamApp.Realm.EventGame, TeamApp, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at System.Collections.Generic.EnumerableHelpers.ToArray[EventGame](IEnumerable`1 , Int32& ) at System.Linq.Buffer`1[[TeamApp.Realm.EventGame, TeamApp, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]..ctor(IEnumerable`1 ) at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__4[[TeamApp.Realm.EventGame, TeamApp, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() at System.Collections.Generic.List`1[[TeamApp.Realm.EventGame, TeamApp, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]..ctor(IEnumerable`1 ) at System.Linq.Enumerable.ToList[EventGame](IEnumerable`1 source) at TeamApp.GameCenterViewModel..ctor(IEventsRepository eventsRepository, IAppStateService appStateService, EventId eventId, TeamId teamId) at TeamApp.GameCenterView.LoadView()
      

      Relevant log output

      No response

            Assignee:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: