Crash when using with unity
SashelI opened this issue · 0 comments
SashelI commented
Hi,
As this lib supports .netstandard 2.1, i figured i could use it with unity. But i encounter two errors :
If I just install the nuget package, i have this error when calling "loadMemDocument" : DllNotFoundException: pdfium assembly:<unknown assembly> type:<unknown type> member:(null)
So I imported the necessary dlls for Unity editor (winx64 pdfium), but then anotehr issue : Unity crashes completely with this trace :
=================================================================
Native Crash Reporting
=================================================================
Got a UNKNOWN while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at __Internal:FPDF_LoadMemDocument <0x00116>
at PDFiumCore.fpdfview:FPDF_LoadMemDocument <0x00022>
at PdfToolkit:LoadDocument <0x00062>
at PdfToolkit:GetDocument <0x0006a>
at <LoadAsync>d__15:MoveNext <0x00092>
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start <0x000ca>
at Astrolabe.Core.Framework.Pdf.AndroidPdfGenerator:LoadAsync <0x000ca>
Received signal SIGSEGV
Obtained 112 stack frames
0x00007ffeb24239eb (pdfium) FORM_OnKeyUp
0x00007ffeb2427590 (pdfium) FORM_OnKeyUp
0x00007ffeb24f68ea (pdfium) FPDF_LoadDocument
0x00007ffeb24f6b1e (pdfium) FPDF_LoadMemDocument
0x000002022491b997 (Mono JIT Code) (wrapper managed-to-native) PDFiumCore.fpdfview/__Internal:FPDF_LoadMemDocument (intptr,int,string)
0x0000020224916313 (Mono JIT Code) PDFiumCore.fpdfview:FPDF_LoadMemDocument (intptr,int,string)
0x0000020224915eb3 (Mono JIT Code) PdfToolkit:LoadDocument (byte[]) (at D:/Astrolabe/RunTime/Astrolabe.Foundation/Assets/Astrolabe/Scripts/Tools/PdfToolkit.cs:72)
0x0000020224915a9b (Mono JIT Code) PdfToolkit:GetDocument (System.IO.Stream) (at D:/Astrolabe/RunTime/Astrolabe.Foundation/Assets/Astrolabe/Scripts/Tools/PdfToolkit.cs:24)
0x00000202249135a3 (Mono JIT Code) Astrolabe.Core.Framework.Pdf.AndroidPdfGenerator/<LoadAsync>d__15:MoveNext () (at D:/Astrolabe/RunTime/Astrolabe.Foundation/Assets/Astrolabe/Scripts/AndroidPdfGenerator.cs:95)
0x000002022491310b (Mono JIT Code) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Astrolabe.Core.Framework.Pdf.AndroidPdfGenerator/<LoadAsync>d__15> (Astrolabe.Core.Framework.Pdf.AndroidPdfGenerator/<LoadAsync>d__15&)
Do you know where this is coming from ? Thanks.