8000 ZXing crashes out after around 9 barcodes detected · Issue #38 · creatale/node-dv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ZXing crashes out after around 9 barcodes detected #38

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

Open
Brigadier1-9 opened this issue Jul 7, 2016 · 0 comments
Open

ZXing crashes out after around 9 barcodes detected #38

Brigadier1-9 opened this issue Jul 7, 2016 · 0 comments

Comments

@Brigadier1-9
Copy link
Brigadier1-9 commented Jul 7, 2016

I am using node-dv to look for barcodes on automatically acquired images (jpegs). As long as there are no recognised barcodes, the code (which, essentially, loops forever as files appear) will run without a problem over thousands of images.

However, on occasion I found that node was crashing out to the shell with no error message. Testing showed that this only happened when barcodes were detected; roughly speaking after around nine detections regardless of how many images were checked (although it would vary up or down a few).

This led me directly to 'ZXing::FindCode' in zxing.cc, specifically the 'NewBuffer' on line 266. Changing it to 'CopyBuffer' stops the crash, which I assume was down to a memory leak. I can now recognise hundreds of barcodes without an issue.

I realise that the C version of ZXing is in maintenance mode only, and therefore so is the barcode functionality of Node-DV. Again, just throwing this out there to see if it helps others in the same boat.

See this commit for the change:
Brigadier1-9@b2504d6

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
0