mfkl / libvlc-nuget

NuGet packaging setup for LibVLC
GNU Lesser General Public License v2.1
63 stars 10 forks source link

Problem when using together with SkiaSharp - iOS - only real device #12

Closed michaldobrodenka closed 4 years ago

michaldobrodenka commented 6 years ago

I'm using VideoLAN.LibVLC.iOS in one app with SkiaSharp. When I try to use SkiaSharp HarfBuzz application freezes or crashes. It seems that maybe SkiaSharp.HarfBuzz is trying to use native harfbuzz from DynamicFramework from DynamicMobileVLCKit. How to prevent this crash? When I remove VideoLAN.LibVLC.iOS from app, everything works normally.

What application outputs (there is no exception, only stacktrace):

2018-09-11 10:59:12.575 MyApplication[954:466113] critical:   at <unknown> <0xffffffff>
2018-09-11 10:59:12.575 MyApplication[954:466113] critical:   at (wrapper managed-to-native) HarfBuzzSharp.HarfBuzzApi.hb_shape (intptr,intptr,intptr,uint) <0x00007>
2018-09-11 10:59:12.575 MyApplication[954:466113] critical:   at HarfBuzzSharp.Font.Shape (HarfBuzzSharp.Buffer,HarfBuzzSharp.Feature[]) [0x00027] in <6749cfd53a6b42819d78f7b3330ebbe7#BE8A05E5-AF2C-7372-CAB4-BB17059F954E>:0
2018-09-11 10:59:12.575 MyApplication[954:466113] critical:   at SkiaSharp.HarfBuzz.SKShaper.Shape (string,single,single,SkiaSharp.SKPaint) [0x0005e] in <7f99c9f4307c45d4819055684265e1c1#BE8A05E5-AF2C-7372-CAB4-BB17059F954E>:0
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SLabel.DrawTextOnLine2 (string,int,single,SkiaSharp.SKPaint,SkiaSharp.SKCanvas) [0x000a7] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/Label2.cs:568
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SLabel.DrawInternal (SkiaSharp.SKCanvas) [0x000e5] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/Label2.cs:527
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SControl.Draw (SkiaSharp.SKCanvas) [0x0000e] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/Control.cs:492
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SLinearLayout.DrawInternal (SkiaSharp.SKCanvas) [0x00021] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/LinearLayout.cs:129
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SControl.Draw (SkiaSharp.SKCanvas) [0x0000e] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/Control.cs:492
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SLinearLayout.DrawInternal (SkiaSharp.SKCanvas) [0x00021] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/LinearLayout.cs:129
2018-09-11 10:59:12.576 MyApplication[954:466113] critical:   at SkeletUI.SControl.Draw (SkiaSharp.SKCanvas) [0x0000e] in /Users/mixal11/Projects/MyApplication2/PaintCodeResources/SkeletUI/Control.cs:492
2018-09-11 10:59:12.578 MyApplication[954:466113] critical:   at Com.MyApplication.iOS.Views.iOSSkeletUIContainer.DrawInSurface (SkiaSharp.SKSurface,SkiaSharp.SKImageInfo) [0x0016e] in /Users/mixal11/Projects/MyApplication2/MyApplication.iOS/Views/iOSSkiaUIContainer.cs:395
2018-09-11 10:59:12.578 MyApplication[954:466113] critical:   at SkiaSharp.Views.iOS.SKCanvasView.Draw (CoreGraphics.CGRect) [0x0004b] in <bf39c54c7e114c18891138c2778b079f#BE8A05E5-AF2C-7372-CAB4-BB17059F954E>:0
2018-09-11 10:59:12.578 MyApplication[954:466113] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) [0x0001e] in <b238a3153e534349ad10ed0787f2157a#BE8A05E5-AF2C-7372-CAB4-BB17059F954E>:0
2018-09-11 10:59:12.578 MyApplication[954:466113] critical:   at <unknown> <0xffffffff>
2018-09-11 10:59:12.578 MyApplication[954:466113] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00007>
2018-09-11 10:59:12.579 MyApplication[954:466113] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/UIKit/UIApplication.cs:79
2018-09-11 10:59:12.579 MyApplication[954:466113] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.12.0.4/src/Xamarin.iOS/UIKit/UIApplication.cs:63
2018-09-11 10:59:12.579 MyApplication[954:466113] critical:   at Com.MyApplication.iOS.Program.Main (string[]) [0x00000] in /Users/mixal11/Projects/MyApplication2/MyApplication.iOS/Main.cs:12
2018-09-11 10:59:12.579 MyApplication[954:466113] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) [0x0001e] in <b238a3153e534349ad10ed0787f2157a#BE8A05E5-AF2C-7372-CAB4-BB17059F954E>:0
2018-09-11 10:59:12.579 MyApplication[954:466113] critical: 
Native stacktrace:

2018-09-11 10:59:12.583 MyApplication[954:466113] critical:     0   MyApplication                             0x0000000103bb4ce8 _ZN2OT19CmapSubtableFormat413accelerator_t14get_glyph_funcEPKvjPj + 255088
2018-09-11 10:59:12.583 MyApplication[954:466113] critical:     1   MyApplication                             0x0000000103bc1844 mono_pmip + 13636
2018-09-11 10:59:12.583 MyApplication[954:466113] critical:     2   libsystem_platform.dylib            0x0000000182f14b58 _sigtramp + 52
2018-09-11 10:59:12.583 MyApplication[954:466113] critical:     3   DynamicMobileVLCKit                 0x00000001047f57b8 hb_shape_plan_create_cached2 + 448
2018-09-11 10:59:12.583 MyApplication[954:466113] critical:     4   DynamicMobileVLCKit                 0x00000001047f4b90 hb_shape + 60
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     5   MyApplication                             0x0000000102fa35b8 MyApplication + 44021176
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     6   MyApplication                             0x0000000102f97c4c MyApplication + 43973708
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     7   MyApplication                             0x0000000102f8577c MyApplication + 43898748
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     8   MyApplication                             0x0000000102856258 MyApplication + 36364888
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     9   MyApplication                             0x0000000102855b0c MyApplication + 36363020
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     10  MyApplication                             0x000000010283536c MyApplication + 36229996
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     11  MyApplication                             0x000000010285a61c MyApplication + 36382236
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     12  MyApplication                             0x000000010283536c MyApplication + 36229996
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     13  MyApplication                             0x000000010285a61c MyApplication + 36382236
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     14  MyApplication                             0x000000010283536c MyApplication + 36229996
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     15  MyApplication                             0x00000001009320e4 MyApplication + 3711204
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     16  MyApplication                             0x00000001031025f0 MyApplication + 45458928
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     17  MyApplication                             0x0000000101a8b468 MyApplication + 21902440
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     18  MyApplication                             0x0000000103bc493c mono_pmip + 26172
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     19  MyApplication                             0x0000000103c41df4 mono_pmip + 539380
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     20  MyApplication                             0x0000000103c45610 mono_pmip + 553744
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     21  MyApplication                             0x00000001005bd618 MyApplication + 87576
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     22  MyApplication                             0x00000001005dfdf0 MyApplication + 228848
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     23  UIKit                               0x000000018cf56f60 <redacted> + 536
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     24  QuartzCore                          0x000000018747ba10 <redacted> + 296
2018-09-11 10:59:12.584 MyApplication[954:466113] critical:     25  QuartzCore                          0x0000000187372274 <redacted> + 256
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     26  QuartzCore                          0x00000001874817d0 <redacted> + 52
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     27  QuartzCore                          0x000000018747b43c <redacted> + 1684
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     28  QuartzCore                          0x00000001873ec78c <redacted> + 516
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     29  QuartzCore                          0x00000001874141b0 <redacted> + 580
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     30  UIKit                               0x000000018d2f0680 <redacted> + 140
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     31  CoreFoundation                      0x000000018329b2bc <redacted> + 20
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     32  CoreFoundation                      0x000000018329aa7c <redacted> + 264
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     33  CoreFoundation                      0x00000001832987b0 <redacted> + 1224
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     34  CoreFoundation                      0x00000001831b8da8 CFRunLoopRunSpecific + 552
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     35  GraphicsServices                    0x000000018519e020 GSEventRunModal + 100
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     36  UIKit                               0x000000018d1d8758 UIApplicationMain + 236
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     37  MyApplication                             0x0000000101bb3190 MyApplication + 23114128
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     38  MyApplication                             0x0000000101b4453c MyApplication + 22660412
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     39  MyApplication                             0x0000000101b444fc MyApplication + 22660348
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     40  MyApplication                             0x0000000100690d14 MyApplication + 953620
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     41  MyApplication                             0x0000000101a8b468 MyApplication + 21902440
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     42  MyApplication                             0x0000000103bc493c mono_pmip + 26172
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     43  MyApplication                             0x0000000103c41df4 mono_pmip + 539380
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     44  MyApplication                             0x0000000103c47b6c mono_pmip + 563308
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     45  MyApplication                             0x0000000103ba73fc _ZN2OT19CmapSubtableFormat413accelerator_t14get_glyph_funcEPKvjPj + 199556
2018-09-11 10:59:12.585 MyApplication[954:466113] critical:     46  MyApplication                             0x0000000103d316a0 _Z9__isctypeim + 55620
2018-09-11 10:59:12.586 MyApplication[954:466113] critical:     47  MyApplication                             0x00000001005f9118 MyApplication + 332056
2018-09-11 10:59:12.586 MyApplication[954:466113] critical:     48  libdyld.dylib                       0x0000000182c49fc0 <redacted> + 4
2018-09-11 10:59:12.586 MyApplication[954:466113] critical: 
=================================================================
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.
=================================================================
michaldobrodenka commented 6 years ago

In the problem output it seems that HarfBuzzSharp.Font.Shape jumps into DynamicMobileVLCKit?!?

Using text search I discovered HarfBuzz also in DynamicMobileVLCKit, maybe some version mismatch?

mfkl commented 6 years ago

Hi @michaldobrodenka,

Wow thats weird... Yes Harfbuzz is included in DynamicMobileVLCKit.

Can you provide a sample repo so I can reproduce?

michaldobrodenka commented 6 years ago

Hi mfkl,

HarfBuzzDemo.zip

I've created minimalistic sample. On simulator it writes "Hello World!" on screen. On real device crash after I added VideoLAN.libVLC.iOS package. Only adding package is enough, I even don't have to use it:

2018-09-11 16:33:22.991 HarfBuzzDemo.iOS[1032:554401] critical: Stacktrace:

2018-09-11 16:33:22.991 HarfBuzzDemo.iOS[1032:554401] critical:   at <unknown> <0xffffffff>
2018-09-11 16:33:22.991 HarfBuzzDemo.iOS[1032:554401] critical:   at (wrapper managed-to-native) HarfBuzzSharp.HarfBuzzApi.hb_shape (intptr,intptr,intptr,uint) <0x00007>
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at HarfBuzzSharp.Font.Shape (HarfBuzzSharp.Buffer,HarfBuzzSharp.Feature[]) [0x00027] in <6749cfd53a6b42819d78f7b3330ebbe7#C1EFC438-5227-9BB8-19DF-B1DBA840BF1C>:0
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at SkiaSharp.HarfBuzz.SKShaper.Shape (string,single,single,SkiaSharp.SKPaint) [0x0005e] in <7f99c9f4307c45d4819055684265e1c1#C1EFC438-5227-9BB8-19DF-B1DBA840BF1C>:0
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at ClassLibrary1.PaintClass.SayHello (SkiaSharp.SKCanvas) [0x00059] in /Users/mixal11/Downloads/HarfBuzzDemo/ClassLibrary1/PaintClass.cs:42
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at HarfBuzzDemo.iOS.ViewController.PaintSurface (object,SkiaSharp.Views.iOS.SKPaintSurfaceEventArgs) [0x00001] in /Users/mixal11/Downloads/HarfBuzzDemo/HarfBuzzDemo.iOS/ViewController.cs:29
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at SkiaSharp.Views.iOS.SKCanvasView.DrawInSurface (SkiaSharp.SKSurface,SkiaSharp.SKImageInfo) [0x00013] in <bf39c54c7e114c18891138c2778b079f#C1EFC438-5227-9BB8-19DF-B1DBA840BF1C>:0
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at SkiaSharp.Views.iOS.SKCanvasView.Draw (CoreGraphics.CGRect) [0x0004b] in <bf39c54c7e114c18891138c2778b079f#C1EFC438-5227-9BB8-19DF-B1DBA840BF1C>:0
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) [0x0001e] in <287924bfcd764fda9061b733b0262652#C1EFC438-5227-9BB8-19DF-B1DBA840BF1C>:0
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at <unknown> <0xffffffff>
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x00007>
2018-09-11 16:33:22.992 HarfBuzzDemo.iOS[1032:554401] critical:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.11/src/Xamarin.iOS/UIKit/UIApplication.cs:79
2018-09-11 16:33:22.993 HarfBuzzDemo.iOS[1032:554401] critical:   at UIKit.UIApplication.Main (string[],string,string) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.11/src/Xamarin.iOS/UIKit/UIApplication.cs:63
2018-09-11 16:33:22.993 HarfBuzzDemo.iOS[1032:554401] critical:   at HarfBuzzDemo.iOS.Application.Main (string[]) [0x00001] in /Users/mixal11/Downloads/HarfBuzzDemo/HarfBuzzDemo.iOS/Main.cs:12
2018-09-11 16:33:22.993 HarfBuzzDemo.iOS[1032:554401] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) [0x0001e] in <287924bfcd764fda9061b733b0262652#C1EFC438-5227-9BB8-19DF-B1DBA840BF1C>:0
2018-09-11 16:33:22.993 HarfBuzzDemo.iOS[1032:554401] critical: 
Native stacktrace:

2018-09-11 16:33:23.003 HarfBuzzDemo.iOS[1032:554401] critical:     0   HarfBuzzDemo.iOS                    0x0000000100d4f3fc mono_handle_native_crash + 224
2018-09-11 16:33:23.003 HarfBuzzDemo.iOS[1032:554401] critical:     1   HarfBuzzDemo.iOS                    0x0000000100d5adf4 mono_sigsegv_signal_handler + 316
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     2   libsystem_platform.dylib            0x0000000182f14b58 _sigtramp + 52
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     3   DynamicMobileVLCKit                 0x00000001019d97b8 hb_shape_plan_create_cached2 + 448
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     4   DynamicMobileVLCKit                 0x00000001019d8b90 hb_shape + 60
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     5   HarfBuzzDemo.iOS                    0x0000000100d0c038 wrapper_managed_to_native_HarfBuzzSharp_HarfBuzzApi_hb_shape_intptr_intptr_intptr_uint + 232
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     6   HarfBuzzDemo.iOS                    0x0000000100d02eec HarfBuzzSharp_Font_Shape_HarfBuzzSharp_Buffer_HarfBuzzSharp_Feature__ + 380
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     7   HarfBuzzDemo.iOS                    0x0000000100cf46ec SkiaSharp_HarfBuzz_SKShaper_Shape_string_single_single_SkiaSharp_SKPaint + 764
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     8   HarfBuzzDemo.iOS                    0x0000000100cce94c ClassLibrary1_PaintClass_SayHello_SkiaSharp_SKCanvas + 828
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     9   HarfBuzzDemo.iOS                    0x0000000100aa912c HarfBuzzDemo_iOS_ViewController_PaintSurface_object_SkiaSharp_Views_iOS_SKPaintSurfaceEventArgs + 188
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     10  HarfBuzzDemo.iOS                    0x0000000100c6d7b4 SkiaSharp_Views_iOS_SKCanvasView_DrawInSurface_SkiaSharp_SKSurface_SkiaSharp_SKImageInfo + 308
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     11  HarfBuzzDemo.iOS                    0x0000000100c6cf80 SkiaSharp_Views_iOS_SKCanvasView_Draw_CoreGraphics_CGRect + 1104
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     12  HarfBuzzDemo.iOS                    0x0000000100bd2d08 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 248
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     13  HarfBuzzDemo.iOS                    0x0000000100d5deb4 mono_jit_runtime_invoke + 904
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     14  HarfBuzzDemo.iOS                    0x0000000100dc5c70 mono_runtime_invoke_checked + 148
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     15  HarfBuzzDemo.iOS                    0x0000000100dc92a0 mono_runtime_invoke + 84
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     16  HarfBuzzDemo.iOS                    0x0000000100aa651c _ZL31native_to_managed_trampoline_11P11objc_objectP13objc_selectorPP11_MonoMethod6CGRectj + 272
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     17  HarfBuzzDemo.iOS                    0x0000000100aa6400 -[SKCanvasView drawRect:] + 92
2018-09-11 16:33:23.004 HarfBuzzDemo.iOS[1032:554401] critical:     18  UIKit                               0x000000018cf56f60 <redacted> + 536
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     19  QuartzCore                          0x000000018747ba10 <redacted> + 296
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     20  QuartzCore                          0x0000000187372274 <redacted> + 256
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     21  QuartzCore                          0x00000001874817d0 <redacted> + 52
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     22  QuartzCore                          0x000000018747b43c <redacted> + 1684
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     23  QuartzCore                          0x00000001873ec78c <redacted> + 516
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     24  QuartzCore                          0x00000001874141b0 <redacted> + 580
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     25  UIKit                               0x000000018d2f0680 <redacted> + 140
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     26  CoreFoundation                      0x000000018329b2bc <redacted> + 20
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     27  CoreFoundation                      0x000000018329aa7c <redacted> + 264
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     28  CoreFoundation                      0x00000001832987b0 <redacted> + 1224
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     29  CoreFoundation                      0x00000001831b8da8 CFRunLoopRunSpecific + 552
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     30  GraphicsServices                    0x000000018519e020 GSEventRunModal + 100
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     31  UIKit                               0x000000018d1d8758 UIApplicationMain + 236
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     32  HarfBuzzDemo.iOS                    0x0000000100c4bc44 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 324
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     33  HarfBuzzDemo.iOS                    0x0000000100c325ac UIKit_UIApplication_Main_string___intptr_intptr + 44
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     34  HarfBuzzDemo.iOS                    0x0000000100c3256c UIKit_UIApplication_Main_string___string_string + 172
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     35  HarfBuzzDemo.iOS                    0x0000000100aa8710 HarfBuzzDemo_iOS_Application_Main_string__ + 128
2018-09-11 16:33:23.005 HarfBuzzDemo.iOS[1032:554401] critical:     36  HarfBuzzDemo.iOS                    0x0000000100bd2d08 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 248
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     37  HarfBuzzDemo.iOS                    0x0000000100d5deb4 mono_jit_runtime_invoke + 904
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     38  HarfBuzzDemo.iOS                    0x0000000100dc5c70 mono_runtime_invoke_checked + 148
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     39  HarfBuzzDemo.iOS                    0x0000000100dcaf60 mono_runtime_exec_main_checked + 120
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     40  HarfBuzzDemo.iOS                    0x0000000100d45920 mono_jit_exec + 272
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     41  HarfBuzzDemo.iOS                    0x0000000100e65f90 xamarin_main + 2220
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     42  HarfBuzzDemo.iOS                    0x0000000100aa8614 main + 96
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical:     43  libdyld.dylib                       0x0000000182c49fc0 <redacted> + 4
2018-09-11 16:33:23.006 HarfBuzzDemo.iOS[1032:554401] critical: 
mfkl commented 6 years ago

Have you tried different linker options?

michaldobrodenka commented 6 years ago

No :( Will try first thing in the morning. My iPhone test device just left :)

mfkl commented 6 years ago

Also, you reference SkiaSharp.HarfBuzz version 1.60.1 in ClassLibrary1. But your HarfBuzzDemo.iOS project, which references the class library project, has a harfbuzz reference on 1.60.3. Not sure how much of an impact that may cause, if any.

mfkl commented 6 years ago

Probably an issue on our side: https://code.videolan.org/videolan/VLCKit/issues/200

michaldobrodenka commented 6 years ago

Ok, I have workaround for this demo. I have extracted from ipa libHArfBuzz.a fat binary library used by SkiaSharp and added it as a native library reference. Then everything worked on iPhone, but not on iPhoneSimulator. After adding condition it works now:

  <ItemGroup>
    <NativeReference Condition=" '$(Platform)' == 'iPhone' " Include="lib\libHarfBuzzSharp.a">
      <Kind>Static</Kind>
      <SmartLink>False</SmartLink>
      <ForceLoad>True</ForceLoad>
    </NativeReference>
  </ItemGroup>

HarfBuzzDemo.zip

mfkl commented 6 years ago

Ok, good job on the work around. I'll leave this issue open until it's fixed on our side.

mfkl commented 4 years ago

Ima close this for now, it's been stale for too long and the next libvlc iOS version will be dynamic.