tesseract.js
tesseract.js copied to clipboard
Tesseractjs recognize Error: abort(undefined). Build with -s ASSERTIONS=1 for more info
Using tesseractjs in vue-cli 3
I use tesseractjs to recognize numbers with downloading language packages to local.
After some tests, i got the runtime error " abort(undefined). Build with -s ASSERTIONS=1 for more info ". I dont't konw what happened as I restart the project ang ran tesseract successfully.
Steps Steps to reproduce the behavior:
- start the project
- dev_environment: (checked means performed well)
- [ ] recognize some images on mobile(access by ip address)
- [x] recognize some images on pc(access by localhost)
- [ ] recognize some images on pc(access by ip address)
- see error - abort(undefingoued). Build with -s ASSERTIONS=1 for more info
- all is well
Expected behavior I want to know if this is a bug on Tesseractjs and what can I do to avoid the same situation.
Desktop (please complete the following information):
- Browser chrome
- Version 78.0.3904.97
Not sure about what happened as your description is pretty vague.
But you can try this offline example to see if the problem still exists: https://github.com/jeromewu/tesseract.js-offline
make sure http-server port is 8000
Getting same error on Oracle Mobile Hub
Nodejs version : v12.13.0 tesseract.js : "^2.1.1",
Error: RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info. at ChildProcess.onMessage (/u01/app/oracle/mobile/mobile_ccc/custom_code_modules/3aa4dac6-75eb-43c4-8086-86efa07ab658_46/bosexpensebackendapi/node_modules/tesseract.js/src/createWorker.js:173:15) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at emit (internal/child_process.js:772:12) at _combinedTickCallback (internal/process/next_tick.js:141:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Is there any solution for this?
It is causing in the createWorker.js file onMessage(worker, ({ workerId, jobId, status, action, data })
when data is undefined for the action initialize
After this action "recognize" with data {"workerId":"Worker-1-d5481","jobId":"Job-4-90dea","status":"recognizing text","progress":0} but after this it is getting reject reaponse and throwing the error
Is there any workaround for this?
Is this issue solved? I tried a lot but it's still happening
I still get this issue with iOS 15 safari browser. Tesseract can't resolve OCR image with same error log
I reproduced this error by passing an incorrect lang code as argument. So check your lang code.
having same issue on IOS 15.2 was working fine on 15.1 and android.not a lang issue as i only pass eng to it or no argument having same output
same thing here! And after that I get Tesseract.recognize(...).progress is not a function even though i've included all the libraries and files locally.
I also get the same error when using eng language but when using another language like ind it works fine
I'm seeing this error after running for about an hour or after processing 100+ images.
I tried trapping the error, but after an hour of processing, something is aborting recognition. A refresh of the browser continues normally. I'm setting images by reading the PNG file bytes and setting on the image source which I can see has loaded. when these errors are in the console.
One error before I added some error handling.
createWorker.js?73e0:173 Uncaught Error: RuntimeError: null function or function signature mismatch
at eval (createWorker.js?73e0:173:1)
at worker.onmessage (onMessage.js?7aa4:3:1)
eval @ createWorker.js?73e0:173
worker.onmessage @ onMessage.js?7aa4:3
asyncToGenerator.js?1da1:6 Uncaught (in promise) RuntimeError: null function or function signature mismatch
The error handling that I used.
process.on("uncaughtException", (err) => {
if (!err) {
console.error('process uncaughtException');
} else {
console.error('process uncaughtException stack', err.stack);
}
});
This is the error that I'm getting with the error handling.
createWorker.js?73e0:173 Uncaught Error: RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info.
at eval (createWorker.js?73e0:173:1)
at worker.onmessage (onMessage.js?7aa4:3:1)
eval @ createWorker.js?73e0:173
worker.onmessage @ onMessage.js?7aa4:3
asyncToGenerator.js?1da1:6 Uncaught (in promise) RuntimeError: abort(undefined). Build with -s ASSERTIONS=1 for more info.
Ran out of memory.
tesseract-core.wasm.js:9 Error in pixCreateNoInit: pix_malloc fail for data
put_char @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
doWritev @ tesseract-core.wasm.js:9
_fd_write @ tesseract-core.wasm.js:9
$func4727 @ 00a5edfa:0xe201c
$func2056 @ 00a5edfa:0x52cfb
$func1007 @ 00a5edfa:0x249e1
$func86 @ 00a5edfa:0x4973
$func58 @ 00a5edfa:0x3e1f
$func1200 @ 00a5edfa:0x2f40c
$func3050 @ 00a5edfa:0x993eb
$func839 @ 00a5edfa:0x1f4c8
$func188 @ 00a5edfa:0x7f99
$func5665 @ 00a5edfa:0x1718f3
$func5664 @ 00a5edfa:0x171521
$func5615 @ 00a5edfa:0x16b77e
$func2168 @ 00a5edfa:0x5fc74
$ud @ 00a5edfa:0x1e2afb
TessBaseAPI.SetImage.TessBaseAPI.SetImage @ tesseract-core.wasm.js:9
t.exports @ setImage.js:56
O @ index.js:198
e.dispatchHandlers @ index.js:297
(anonymous) @ index.js:20
tesseract-core.wasm.js:9 Error in pixCreateTemplateNoInit: pixd not made
put_char @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
doWritev @ tesseract-core.wasm.js:9
_fd_write @ tesseract-core.wasm.js:9
$func4727 @ 00a5edfa:0xe201c
$func2056 @ 00a5edfa:0x52cfb
$func1007 @ 00a5edfa:0x249e1
$func86 @ 00a5edfa:0x4973
$func58 @ 00a5edfa:0x3e1f
$func3050 @ 00a5edfa:0x99411
$func839 @ 00a5edfa:0x1f4c8
$func188 @ 00a5edfa:0x7f99
$func5665 @ 00a5edfa:0x1718f3
$func5664 @ 00a5edfa:0x171521
$func5615 @ 00a5edfa:0x16b77e
$func2168 @ 00a5edfa:0x5fc74
$ud @ 00a5edfa:0x1e2afb
TessBaseAPI.SetImage.TessBaseAPI.SetImage @ tesseract-core.wasm.js:9
t.exports @ setImage.js:56
O @ index.js:198
e.dispatchHandlers @ index.js:297
(anonymous) @ index.js:20
tesseract-core.wasm.js:9 Error in pixCreateTemplate: pixd not made
put_char @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
doWritev @ tesseract-core.wasm.js:9
_fd_write @ tesseract-core.wasm.js:9
$func4727 @ 00a5edfa:0xe201c
$func2056 @ 00a5edfa:0x52cfb
$func1007 @ 00a5edfa:0x249e1
$func86 @ 00a5edfa:0x4973
$func58 @ 00a5edfa:0x3e1f
$func839 @ 00a5edfa:0x1f4ee
$func188 @ 00a5edfa:0x7f99
$func5665 @ 00a5edfa:0x1718f3
$func5664 @ 00a5edfa:0x171521
$func5615 @ 00a5edfa:0x16b77e
$func2168 @ 00a5edfa:0x5fc74
$ud @ 00a5edfa:0x1e2afb
TessBaseAPI.SetImage.TessBaseAPI.SetImage @ tesseract-core.wasm.js:9
t.exports @ setImage.js:56
O @ index.js:198
e.dispatchHandlers @ index.js:297
(anonymous) @ index.js:20
tesseract-core.wasm.js:9 Error in pixCopy: pixd not made
put_char @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
doWritev @ tesseract-core.wasm.js:9
_fd_write @ tesseract-core.wasm.js:9
$func4727 @ 00a5edfa:0xe201c
$func2056 @ 00a5edfa:0x52cfb
$func1007 @ 00a5edfa:0x249e1
$func86 @ 00a5edfa:0x4973
$func58 @ 00a5edfa:0x3e1f
$func188 @ 00a5edfa:0x7fbf
$func5665 @ 00a5edfa:0x1718f3
$func5664 @ 00a5edfa:0x171521
$func5615 @ 00a5edfa:0x16b77e
$func2168 @ 00a5edfa:0x5fc74
$ud @ 00a5edfa:0x1e2afb
TessBaseAPI.SetImage.TessBaseAPI.SetImage @ tesseract-core.wasm.js:9
t.exports @ setImage.js:56
O @ index.js:198
e.dispatchHandlers @ index.js:297
(anonymous) @ index.js:20
tesseract-core.wasm.js:9 Error in pixGetData: pix not defined
put_char @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
doWritev @ tesseract-core.wasm.js:9
_fd_write @ tesseract-core.wasm.js:9
$func4727 @ 00a5edfa:0xe201c
$func2056 @ 00a5edfa:0x52cfb
$func1007 @ 00a5edfa:0x249e1
$func86 @ 00a5edfa:0x4973
$func58 @ 00a5edfa:0x3e1f
$func99 @ 00a5edfa:0x64cf
$func5665 @ 00a5edfa:0x171907
$func5664 @ 00a5edfa:0x171521
$func5615 @ 00a5edfa:0x16b77e
$func2168 @ 00a5edfa:0x5fc74
$ud @ 00a5edfa:0x1e2afb
TessBaseAPI.SetImage.TessBaseAPI.SetImage @ tesseract-core.wasm.js:9
t.exports @ setImage.js:56
O @ index.js:198
e.dispatchHandlers @ index.js:297
(anonymous) @ index.js:20
tesseract-core.wasm.js:9 Error in pixGetWpl: pix not defined
put_char @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
write @ tesseract-core.wasm.js:9
doWritev @ tesseract-core.wasm.js:9
_fd_write @ tesseract-core.wasm.js:9
$func4727 @ 00a5edfa:0xe201c
$func2056 @ 00a5edfa:0x52cfb
$func1007 @ 00a5edfa:0x249e1
$func86 @ 00a5edfa:0x4973
$func58 @ 00a5edfa:0x3e1f
$func103 @ 00a5edfa:0x670f
$func5665 @ 00a5edfa:0x17192b
$func5664 @ 00a5edfa:0x171521
$func5615 @ 00a5edfa:0x16b77e
$func2168 @ 00a5edfa:0x5fc74
$ud @ 00a5edfa:0x1e2afb
TessBaseAPI.SetImage.TessBaseAPI.SetImage @ tesseract-core.wasm.js:9
t.exports @ setImage.js:56
O @ index.js:198
e.dispatchHandlers @ index.js:297
(anonymous) @ index.js:20
createWorker.js?73e0:173 Uncaught Error: RuntimeError: memory access out of bounds
at eval (createWorker.js?73e0:173:1)
at worker.onmessage (onMessage.js?7aa4:3:1)
eval @ createWorker.js?73e0:173
worker.onmessage @ onMessage.js?7aa4:3
asyncToGenerator.js?1da1:6 Uncaught (in promise) RuntimeError: memory access out of bounds
Here is my repro project. https://github.com/tgraupmann/tesseract.js-vue-app
Set a folder with 100+ images, and start the auto processing. You should see the error. I'm processing 1920x1080 images with English text. I'm processing a bunch of high school screenshots from classes. Math, history, biology, and health.
I'm on Windows 10 64-bit. Chrome Version 102.0.5005.115 (Official Build) (64-bit) Desktop And browsing the Vue page with localhost.
I also get the same error when using English language other languages work fine. I think there is a problem with the English trained data
I'm closing this issue as abort(undefined) is an extremely generic error message with (as seen with the comments) many possible causes. It's basically the equivalent of a "this program is not responding" error in a desktop application. If anybody reading this encounters such an error, feel free to open a new issue with enough info to follow up (and ideally a reproducible example).
i meet this problem,because you transforinto imagestream, we must transerfor image addressi meet this problem,because you transforinto imagestream, we must transerfor image address . in node.js environment.
in js brower , it's no problem