Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using with unity #20

Open
SashelI opened this issue Jan 17, 2024 · 0 comments
Open

Crash when using with unity #20

SashelI opened this issue Jan 17, 2024 · 0 comments

Comments

@SashelI
Copy link

SashelI commented Jan 17, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant