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

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal. #48

Open
ugurcanalyuz opened this issue Aug 23, 2023 · 2 comments
Open

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal. #48

ugurcanalyuz opened this issue Aug 23, 2023 · 2 comments

Comments

@ugurcanalyuz
Copy link

ugurcanalyuz commented Aug 23, 2023

Hello my friend. When I want to load a PDF file with 208 pages, the project stands as in the code given below.

How can we move forward?

I would also like to point out that it actually translated another 240-page PDF file well. It doesn't always give this error.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
 1: 00007FF644B807BF node_api_throw_syntax_error+175823
 2: 00007FF644B05796 EVP_MD_meth_get_input_blocksize+59654
 3: 00007FF644B0758C node::OnFatalError+252
 4: 00007FF6455B6745 v8::api_internal::ToLocalEmpty+53
 5: 00007FF9E9FFA059 Canvas::getHeight+87113
 6: 00007FF9E9FE4308 Backend::getHeight+1512
 7: 00007FF64556687D v8::internal::Builtins::code+248221
 8: 00007FF645566489 v8::internal::Builtins::code+247209
 9: 00007FF64556674C v8::internal::Builtins::code+247916
10: 00007FF6455665B0 v8::internal::Builtins::code+247504
11: 00007FF64564B2F1 v8::internal::SetupIsolateDelegate::SetupHeap+558449
@ugurcanalyuz
Copy link
Author

Hello mate, I discovered that the problem is with the corresponding PDF file. Now I am sharing with you both working and non-working PDF files that look alike. Finding the problem here will help many people.

I'm also looking forward to the update.

Good luck.

Failed PDF: https://drive.google.com/file/d/1y766b3bAX61N8VtHf-iEucE-79imuVM2/view?usp=sharing
Success PDF: https://drive.google.com/file/d/1qsWlu6QBcRKnVuiqaUDlbdmd4E2jio4b/view?usp=sharing

@pathikrit
Copy link

pathikrit commented Mar 4, 2024

I am having the same issue on a 1 page PDF!

PDF

NewIndianExpress.pdf

Code

const pdf2img = require('pdf-img-convert')
pdf2img.convert('NewIndianExpress.pdf')

Error

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal
 1: 0x1001713ac node::Abort() [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
 2: 0x1001714a4 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
 3: 0x1002ce954 v8::api_internal::ToLocalEmpty() [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
 4: 0x10571417c Context2d::CreateImageData(Nan::FunctionCallbackInfo<v8::Value> const&) [/Users/pbhowmick/workspace/newswall/node_modules/canvas/build/Release/canvas.node]
 5: 0x1057020a0 Nan::imp::FunctionCallbackWrapper(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/pbhowmick/workspace/newswall/node_modules/canvas/build/Release/canvas.node]
 6: 0x1003378f0 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
 7: 0x100337060 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
 8: 0x100bb33ec Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
 9: 0x100b30064 Builtins_InterpreterEntryTrampoline [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
10: 0x100b30064 Builtins_InterpreterEntryTrampoline [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
11: 0x100b30064 Builtins_InterpreterEntryTrampoline [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
12: 0x105bc9aec 
13: 0x105c4ffe8 
14: 0x100c06e38 Builtins_PromiseFulfillReactionJob [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
15: 0x100b56834 Builtins_RunMicrotasks [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
16: 0x100b2e3c4 Builtins_JSRunMicrotasksEntry [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
17: 0x100404ca4 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
18: 0x100405194 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
19: 0x100405370 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
20: 0x10042d2e8 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
21: 0x10042db84 v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
22: 0x1000b8c50 node::InternalCallbackScope::Close() [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
23: 0x1000b8fd8 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
24: 0x1000cf06c node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
25: 0x100176c8c node::fs::FSReqCallback::Resolve(v8::Local<v8::Value>) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
26: 0x1001773b8 node::fs::AfterNoArgs(uv_fs_s*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
27: 0x10016d5e0 node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
28: 0x100b0b550 uv__work_done [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
29: 0x100b0ecf8 uv__async_io [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
30: 0x100b2149c uv__io_poll [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
31: 0x100b0f1c8 uv_run [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
32: 0x1000b96f4 node::SpinEventLoopInternal(node::Environment*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
33: 0x1001ae484 node::NodeMainInstance::Run() [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
34: 0x10013e5d8 node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResultImpl const*) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
35: 0x10013e840 node::Start(int, char**) [/Users/pbhowmick/.nvm/versions/node/v19.9.0/bin/node]
36: 0x18bac10e0 start [/usr/lib/dyld]

Why is this happening? I can't even catch this since it's a fatal error!

Could it be related to this: Automattic/node-canvas#2349 ?

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

2 participants