[
https://issues.apache.org/jira/browse/LUCENENET-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513542#comment-16513542
]
Enrico Caltran commented on LUCENENET-602:
------------------------------------------
Tank you for your support.
I downloaded and tested the update
[4.8.0-ci0000001189|https://www.myget.org/gallery/lucene-net-ci].
Unfortunately I have the same error:
{color:#d04437}_Attempting to JIT compile method
'Lucene.Net.Support.LurchTable`2<Lucene.Net.Facet.Taxonomy.FacetLabel,
Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class>:InternalInsert<Lucene.Net.Support.LurchTable`2/Add2Info<Lucene.Net.Facet.Taxonomy.FacetLabel,
Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class>>
(int,Lucene.Net.Facet.Taxonomy.FacetLabel,int&,Lucene.Net.Support.LurchTable`2/Add2Info<Lucene.Net.Facet.Taxonomy.FacetLabel,
Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class>&)'
while running in aot-only mode. See
https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more
information._{color}
_{color:#d04437}at Lucene.Net.Support.LurchTable`2[TKey,TValue].Insert[T]
(TKey key, T& value) <0x25c3094 + 0x000e0> in
<c3b44a6213204d3f84396aea6ad2a991#d92272f5edb622dd72704e9a69499a2e>:0{color}_
_{color:#d04437} at (wrapper unknown) System.Object.gsharedvt_in(){color}_
{color:#d04437} _at Lucene.Net.Support.LurchTable`2[TKey,TValue].AddOrUpdate
(TKey key, TValue addValue, Lucene.Net.Support.KeyValueUpdate`2[TKey,TValue]
fnUpdate) <0x23797ac + 0x0013b> in
<c3b44a6213204d3f84396aea6ad2a991#d92272f5edb622dd72704e9a69499a2e>:0_ {color}
{color:#d04437} _at Lucene.Net.Facet.Taxonomy.LRUHashMap`2[TKey,TValue].Put
(TKey key, TValue value) <0x2bc8c84 + 0x0015b> in
<58ed39aefbef4f31b3c1966c08148e92#d92272f5edb622dd72704e9a69499a2e>:0_ {color}
{color:#d04437} _at
Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader.GetOrdinal
(Lucene.Net.Facet.Taxonomy.FacetLabel cp) <0x2bd1df4 + 0x0019b> in
<58ed39aefbef4f31b3c1966c08148e92#d92272f5edb622dd72704e9a69499a2e>:0_ {color}
_{color:#d04437}at
Lucene.Net.Facet.Taxonomy.Int32TaxonomyFacets.GetTopChildren (System.Int32
topN, System.String dim, System.String[] path) <0x2bc862c + 0x0008f> in
<58ed39aefbef4f31b3c1966c08148e92#d92272f5edb622dd72704e9a69499a2e>:0{color}_
_{color:#d04437}at
Login.MyMB.Lucene.Client.LuceneArticoliSearcher.GetFacetingLivello1 ()
<0x2298fb8 + 0x0019b> in{color}
<5393a55987004eaab7058c58d8e8035a#d92272f5edb622dd72704e9a69499a2e>:0_
_at
MyMB.Forms.TestSearchLucene.RicercaArticoliViewModel+<>c__DisplayClass151_0.<LoadFacet_FirstLevel>b__0
() <0xcb49ec + 0x0004b> in
<ac8bb860c55947f998e94788be76d8a0#d92272f5edb622dd72704e9a69499a2e>:0_
_at System.Threading.Tasks.Task.InnerInvoke () <0x2d80b8 + 0x00063> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at System.Threading.Tasks.Task.Execute () <0x2d7700 + 0x0005b> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_--- End of stack trace from previous location where exception was thrown ---_
_at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x30caac
+ 0x00028> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess
(System.Threading.Tasks.Task task) <0x313b88 + 0x000bf> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification
(System.Threading.Tasks.Task task) <0x313adc + 0x00097> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd
(System.Threading.Tasks.Task task) <0x313a70 + 0x00057> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at System.Runtime.CompilerServices.TaskAwaiter.GetResult () <0x313a3c +
0x0001f> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at
MyMB.Forms.TestSearchLucene.RicercaArticoliViewModel+<LoadFacet_FirstLevel>d__151.MoveNext
() <0xcb4dc4 + 0x00437> in
<ac8bb860c55947f998e94788be76d8a0#d92272f5edb622dd72704e9a69499a2e>:0_
_--- End of stack trace from previous location where exception was thrown ---_
_at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x30caac
+ 0x00028> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0
(System.Object state) <0x313468 + 0x00053> in
<b238a3153e534349ad10ed0787f2157a#d92272f5edb622dd72704e9a69499a2e>:0_
_at UIKit.UIKitSynchronizationContext+<>c__DisplayClass1_0.<Post>b__0 ()
<0x1c3950c + 0x0002f> in
<fad458d293c44e7a93692a2914707133#d92272f5edb622dd72704e9a69499a2e>:0_
_at Foundation.NSAsyncActionDispatcher.Apply () <0x1c6c7b8 + 0x0002f> in
<fad458d293c44e7a93692a2914707133#d92272f5edb622dd72704e9a69499a2e>:0_
_at (wrapper managed-to-native)
UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)_
_at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal,
System.IntPtr delegate) <0x1c2e81c + 0x00033> in
<fad458d293c44e7a93692a2914707133#d92272f5edb622dd72704e9a69499a2e>:0_
_at UIKit.UIApplication.Main (System.String[] args, System.String
principalClassName, System.String delegateClassName) <0x1c2e748 + 0x000c7> in
<fad458d293c44e7a93692a2914707133#d92272f5edb622dd72704e9a69499a2e>:0_
_at MyMB_Forms_iOSu.Application.Main (System.String[] args) <0x121270 +
0x0004b> in
<5f1ae7ba2347472ba28a3147acb1a805#d92272f5edb622dd72704e9a69499a2e>:0_
The second part of message is different from the second part of the first
message because we changed our porgram but I think the problem is the same.
For the update of [Powershell build
script|https://github.com/apache/lucenenet/blob/master/build/build.ps1] i'm
studying ...
Thank you in advance, Enrico Caltran +393357485560
[[email protected]|mailto:[email protected]]
> Error using Lucene.Net.Facet 4.8.0-beta00005 with Xamarin.iOS
> --------------------------------------------------------------
>
> Key: LUCENENET-602
> URL: https://issues.apache.org/jira/browse/LUCENENET-602
> Project: Lucene.Net
> Issue Type: Bug
> Components: Lucene.Net.Facet
> Affects Versions: Lucene.Net 4.8.0
> Environment: Xamarin Forms 3.0.0.561731
> Ios 10.3.3 and Higher
> Lucene.Net.Facet 4.8.0-beta00005
> Reporter: Enrico Caltran
> Priority: Blocker
> Labels: AOT, Xamarin.iOS, lucene.net.facet
> Fix For: Lucene.Net 4.8.0
>
> Original Estimate: 120h
> Remaining Estimate: 120h
>
> I'm using Lucene.Net.Facet 4.8.0-beta00005 in a big Xamarin project.
> +With Xamarin.Android and Xamarin.UWP it's all right.+
> *+But With Xamarin.iOS on device (Ipad)+*, i'm receiving this error:
> _Attempting to JIT compile method
> 'Lucene.Net.Support.LurchTable2<Lucene.Net.Facet.Taxonomy.FacetLabel,
> Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class>:InternalInsert<Lucene.Net.Support.LurchTable2/Add2Info<Lucene.Net.Facet.Taxonomy.FacetLabel,
> Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class>>
> (int,Lucene.Net.Facet.Taxonomy.FacetLabel,int&,Lucene.Net.Support.LurchTable`2/Add2Info<Lucene.Net.Facet.Taxonomy.FacetLabel,
> Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class>&)'
> while running in aot-only mode. See
> [https://developer.xamarin.com/guides/ios/advanced_topics/limitations/] for
> more information._
> _{color:#d04437}at Lucene.Net.Support.LurchTable2[TKey,TValue].Insert[T]
> (TKey key, T& value) <0x2570f48 + 0x000e0> in
> <063e095c95d945a4ace32ab83d1227eb#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0
> at (wrapper unknown) System.Object.gsharedvt_in() at
> Lucene.Net.Support.LurchTable2[TKey,TValue].AddOrUpdate (TKey key, TValue
> addValue, Lucene.Net.Support.KeyValueUpdate2[TKey,TValue] fnUpdate)
> <0x232824c + 0x0013b> in
> <063e095c95d945a4ace32ab83d1227eb#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0
> at Lucene.Net.Facet.Taxonomy.LRUHashMap2[TKey,TValue].Put (TKey key, TValue
> value) <0x2c487f8 + 0x0015b> in
> <79d3a7b905954d0993025c09c5d087ce#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0 at
> Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader.GetOrdinal
> (Lucene.Net.Facet.Taxonomy.FacetLabel cp) <0x2c51970 + 0x0019b> in
> <79d3a7b905954d0993025c09c5d087ce#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0 at
> Lucene.Net.Facet.Taxonomy.Int32TaxonomyFacets.GetTopChildren{color}
> (System.Int32 topN, System.String dim, System.String[] path) <0x2c481dc +
> 0x0008f> in
> <79d3a7b905954d0993025c09c5d087ce#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0 at
> Login.MyMB.Lucene.Client.LuceneArticoliSearcher.GetListaArticoloXRicercaAvanzataConRicercaSemplice
> (System.Collections.Generic.List1[T] listParametri) <0x224add0 +
> 0x001bb> in
> <8f49891e0f0546e185aba7424d294ef7#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0
> at
> Login.MyMB.Lucene.Client.LuceneArticoliSearcher.GetListaArticoloConRicercaSemplice
> (System.Collections.Generic.List1[T] listParametri) <0x224afbc + 0x0009f> in
> <8f49891e0f0546e185aba7424d294ef7#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0 at
> MyMB.Forms.RicercaLucene.RicercaArticoloLucene.GetListaArticoliXRicercaSemplice
> (Login.MyMB.Interface.IAmbiente ambiente,
> Login.MyMB.Lucene.Client.LuceneArticoliSearcher las,
> System.Collections.Generic.List`1[T] ListParametri, System.Boolean
> isAbilitataRicercaBarcode) <0xe47fc0 + 0x000e7> in
> <f1bb3149abe145459612794f1a096634#2ae0fea9ea4eacaef83bf2e9713bb8ea>:0
> ..............................._
> At the link
> [https://docs.microsoft.com/it-it/xamarin/ios/internals/limitations] , I
> found the problem cause (I suppose...):
> _Value types as Dictionary Keys Using a value type as a Dictionary<TKey,
> TValue> key is problematic, as the default Dictionary constructor attempts to
> use EqualityComparer<TKey>.Default. EqualityComparer<TKey>.Default, in turn,
> attempts to use Reflection to instantiate a new type which implements the
> IEqualityComparer<TKey> interface. This works for reference types (as the
> reflection+create a new type step is skipped), but for value types it crashes
> and burns rather quickly once you attempt to use it on the device.
> Workaround: Manually implement the IEqualityComparer<TKey> interface in a new
> type and provide an instance of that type to the Dictionary<TKey, TValue>
> (IEqualityComparer<TKey>) constructor._
> So, what can I do? Thank you in advance, Enrico Caltran +393357485560
> [[email protected]|mailto:[email protected]]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)