lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENENET-602) Error using Lucene.Net.Facet 4.8.0-beta00005 with Xamarin.iOS
Date Wed, 07 Aug 2019 22:32:00 GMT

    [ https://issues.apache.org/jira/browse/LUCENENET-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902515#comment-16902515
] 

Axel commented on LUCENENET-602:
--------------------------------

Hi Shad

I seem to have a slightly different error for what seems to be the same underlying problem.
Running the sample from Enrico works fine on Android and the IOS emulators, but break runtime
on a physical IOS device.

 
{code:java}
=================================================================
Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
Basic Fault Adddress Reporting
=================================================================
Memory around native instruction pointer (0x1065c77ac):0x1065c779c 21 00 02 8b 3e 00 80 d2
3e 00 00 39 e0 03 14 aa !...>...>..9....
0x1065c77ac 54 03 00 f9 40 ff 49 d3 fe ff 9f d2 fe 0f a0 f2 T...@.I.........
0x1065c77bc 00 00 1e 8a 30 6f 00 b0 10 e2 15 91 01 0a 40 f9 ....0o........@.
0x1065c77cc 00 00 01 8b 3e 00 80 d2 1e 00 00 39 b1 27 40 f9 ....>......9.'@.

=================================================================
Native stacktrace:
=================================================================
0x10706d1ec - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x107063794 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x107070e08 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x192ed09ec - /usr/lib/system/libsystem_platform.dylib : <redacted>
0x1 - Unknown
0x104eb5c9c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1070740a8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x10710b244 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x10705b09c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104eb9d18 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x106ab8ddc - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104efb0dc - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104efb75c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x106ab7e64 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104efb0dc - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1065baff0 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x106f305c0 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x106f47a14 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x106f2f644 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x105e9ecc8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x105dd4ad8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x105837b18 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1056c144c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104f73fe0 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104eb5c9c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1070740a8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x10710b244 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x10710e8b0 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x104ac9ce0 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104ac9bec - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1bf5c5040 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf06e1c8 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf06e4e8 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf06d554 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf5fc304 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf5fd52c - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf5dd59c - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf6a3714 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf6a5e40 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x1bf69f070 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : <redacted>
0x193252018 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x193251f98 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x193251880 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x19324c7bc - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : <redacted>
0x19324c0b0 - /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation : CFRunLoopRunSpecific
0x19544c79c - /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
: GSEventRunModal
0x1bf5c3978 - /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore : UIApplicationMain
0x104ff3920 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104f6f824 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104f6f77c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104aec6b8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x104eb5c9c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1070740a8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x10710b244 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x107110660 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: mono_pmip
0x107058244 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x1071ba5d8 - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: _Z9__isctypeim
0x104aec59c - /var/containers/Bundle/Application/53D607A6-CC8D-484C-95E5-7125828BF47E/AppTestLucene.iOS.app/AppTestLucene.iOS
: (null)
0x192d118e0 - /usr/lib/system/libdyld.dylib : <redacted>

=================================================================
Managed Stacktrace:
=================================================================
at Add2Info:CreateValue <0x000fc>
at System.Object:runtime_invoke_dynamic <0x0011b>
at <unknown> <0xffffffff>
at System.Object:__icall_wrapper_mono_gsharedvt_constrained_call <0x00007>
at Lucene.Net.Support.LurchTable`2:InternalInsert <0x00e7b>
at System.Object:gsharedvt_in <0x000db>
at System.Object:gsharedvt_out <0x000db>
at Lucene.Net.Support.LurchTable`2:Insert <0x002a3>
at System.Object:gsharedvt_in <0x000db>
at Lucene.Net.Support.LurchTable`2:AddOrUpdate <0x001ef>
at Lucene.Net.Facet.Taxonomy.LRUHashMap`2:Put <0x0026f>
at Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader:GetOrdinal <0x004c3>
at Lucene.Net.Facet.Taxonomy.Int32TaxonomyFacets:GetTopChildren <0x00243>
at Core.Lucene.CoreLucene:TestFaceting <0x01ca7>
at AppTestLucene.MainPage:Button_OnClicked <0x00087>
at Xamarin.Forms.Button:SendClicked <0x001a7>
at Xamarin.Forms.Platform.iOS.ButtonRenderer:OnButtonTouchUpInside <0x0019b>
at UIKit.UIControlEventProxy:Activated <0x0006f>
at System.Object:runtime_invoke_dynamic <0x0011b>
at <unknown> <0xffffffff>
at UIKit.UIApplication:UIApplicationMain <0x00007>
at UIKit.UIApplication:Main <0x00043>
at UIKit.UIApplication:Main <0x0005b>
at AppTestLucene.iOS.Application:Main <0x00097>
at System.Object:runtime_invoke_dynamic <0x0011b>
=================================================================

{code}
 

I found the cause of the problem to be the implementation of the LRUHashMap using LurchTable.
The LurchTable class is violating the restrictions in Mono for IOS. I simply replaced the 
LurchTable with a randomly selected LruCache - LruCacheNet https://www.nuget.org/packages/LruCacheNet/ and
this solved the problem.

 

Any chance you could fix this permanently?

> 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
>
>         Attachments: AppTestLucene.zip
>
>   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&lt;Lucene.Net.Facet.Taxonomy.FacetLabel,
Lucene.Net.Facet.Taxonomy.Directory.DirectoryTaxonomyReader/Int32Class&gt;:InternalInsert&lt;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&amp;
value) &lt;0x2570f48 + 0x000e0&gt; in &lt;063e095c95d945a4ace32ab83d1227eb#2ae0fea9ea4eacaef83bf2e9713bb8ea&gt;: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) &lt;0x232824c
+ 0x0013b&gt; in &lt;063e095c95d945a4ace32ab83d1227eb#2ae0fea9ea4eacaef83bf2e9713bb8ea&gt;: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) &lt;0x224add0 + 0x001bb&gt; in
&lt;8f49891e0f0546e185aba7424d294ef7#2ae0fea9ea4eacaef83bf2e9713bb8ea&gt;: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 [enrico.caltran@timegroup.it|mailto:enrico.caltran@timegroup.it]



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message