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
Failed to read QR code. Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS. #74
Comments
We ran into the same issue. When trying to scan the 21st QR code, our app failed to start Instascan. We changed Instascan's Analyzer class to re-use the ZXing function pointer it created the first time it was initialised. The affected file:
I didn't do a PR as they seem to be not merged anyway and I have no Idea how this solution complies with the coding standards of Instascan. |
…stead of adding new ones.
Hello @schmich, we encounter issues and would be interested in this fix too. Could you please merge it and create a new tag for it? Thank you |
@adammcfadden Hello, could you please propose a pull request in order to get this fix merged? |
I opened a pull request with the change proposed above by @lnorbert . I am currently using a minified version of instascan with that implementation, and it has been working fine so far. I haven't vetted the solution any further than that, and am not sure of the performance implecations of this change. PR is at: #109 I created a release on the forked repo to provide minified source code that includes the patch. https://github.com/adammcfadden/instascan/releases/tag/1.0.0-patch%2374 Once the changes are merged into schmich/instascan I'll take down the forked repo, but until then I'll leave it up in case anyone needs this specific fix. @eko thanks for the reminder, this one fell off my radar for a while. @schmich if you have any ideas on improving this patch let me know, I would be happy to help out where I can. |
Thank you so much, I’ve also tried to send an email to @schmich. I hope he wiii find some time to have a look at this PR. |
Oh no, 1 year later and still nothing? :( I'm also experiencing this problem. Looks like Adam McFadden's fork is still up-to-date tho so I guess I'll try that. |
Not sure if anyone made any progress on this, but I ran into this problem also. This is apparently just that you must call removeFunction(ptr) once you are done with that callback registration. ZXing is apparently internally limited to 20 registered callback pointers (although this can apparently be adjusted somewhere). The callbacks however can be invoked an unlimited number of times. Not sure why one would need more than 20 callback handlers registered on a single page at a given time, so this is probably just a misunderstanding of how to use the zxing api. |
I'm getting this error on an application which is scanning multiple QR codes over long periods
Failed to read QR code. Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.
@schmich could you please recompile the script with more pointers as described here
The text was updated successfully, but these errors were encountered: