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

Running out of reserved function pointers #175

Open
brenmous opened this issue Nov 3, 2021 · 0 comments
Open

Running out of reserved function pointers #175

brenmous opened this issue Nov 3, 2021 · 0 comments

Comments

@brenmous
Copy link

brenmous commented Nov 3, 2021

I'm using leaflet-geopackage in the browser (via https://unpkg.com/@ngageoint/leaflet-geopackage/dist/leaflet-geopackage.js).

I have a service that generates new data as a geopackage, and browser code that consumes and displays it with leaflet-geopackage. When new data arrives I refresh the map by creating a new geoPackageFeatureLayer and removing the old one from the map. After enough cycles, I get the error Uncaught (in promise) Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.

The culprits are SqliteAdapter.prototype.registerFunction/SqljsAdapter.prototype.registerFunction, eventually throwing here function va(a){for(var b=0;64>b;b++)if(!t[b])return t[b]=a,ra+b;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";} in the emscripten code.

I'm a novice with JS, so my workaround so far is to refresh the page entirely to update the data. I'm not sure if this is something that can be fixed on the geopackage-js end, or is upstream with the SQL libraries. If you have any advice about how to get around this, or if it can be fixed, that would be much appreciated.

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