-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
What happened?
I try to build unity project to iOS App. But I found a bug and I can reproduce it. If I use ".Count()" method on IQueryable object, I will met a NotSupportedException exception.
Repro steps
- using the code I show
- build it to ios project
- run it on my iphone with Xcode
- see the exception on Xcode console
Version
"io.realm.unity": "10.14.0"
What SDK flavour are you using?
Local Database only
What type of application is this?
Unity
Client OS and version
iPhone 15.3.1
Code snippets
Unable to find source-code formatter for language: csharp. 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
IQueryable<ConversationData> matchedConvs = findConvs(conversType, convID); Debug.Log("matchedConvs is " + matchedConvs.ToString()); Debug.Log("matchedConvs count " + matchedConvs.ToList().Count); Debug.Log("After find Convs"); **if (matchedConvs!= null && matchedConvs.Count() > 0) // it will exception here** { Debug.Log("try to insert exist conv, conv count="+ matchedConvs.Count()); insertMsgToExistConv(matchedConvs.First(), message); }
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
NotSupportedException: The rhs of the binary operator 'Extension' should be a constant or closure variable expression. Unable to process 'PartialEvalException (NullReferenceException ("Object reference not set to an instance of an object."), value(RealmManager+<>c__DisplayClass22_0).conversType)'. at Realms.RealmResultsVisitor.VisitBinary (System.Linq.Expressions.BinaryExpression node) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsVisitor.VisitCombination (System.Linq.Expressions.BinaryExpression b, System.Action`1[T] combineWith) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsVisitor.VisitBinary (System.Linq.Expressions.BinaryExpression node) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsVisitor.VisitMethodCall (System.Linq.Expressions.MethodCallExpression node) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsVisitor.RecurseToWhereOrRunLambda (System.Linq.Expressions.MethodCallExpression m) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsVisitor.VisitMethodCall (System.Linq.Expressions.MethodCallExpression node) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsProvider.Execute (System.Linq.Expressions.Expression expression) [0x00000] in <00000000000000000000000000000000>:0 at Realms.RealmResultsProvider.Execute[T] (System.Linq.Expressions.Expression expression) [0x00000] in <00000000000000000000000000000000>:0 at RealmManager.insertNotificationMsg (System.Int32 conversType, System.String convID, System.String convName, System.String ConvImageURL, MessageData message) [0x00000] in
Relevant log output
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
Log1(Success): matchedConvs is Realms.RealmResults`1[ConversationData] Log2(Success): matchedConvs count 0 Log3(Success): After find Convs