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

Trying to access a closed Dataset object results in an ugly warning #11

Open
mmomtchev opened this issue Aug 6, 2021 · 0 comments
Open
Labels
wontfix This will not be worked on

Comments

@mmomtchev
Copy link
Owner

The warning has no functional consequences and can be safely ignored.

It is caused by node-gdal-async using raw getters (as opposed to property getters) which allow console.log to print the actual value instead of geoTransform: [Function] - and in this case Node's internals do not like getting an exception.

AFAIK, it is not possible to have both.

> ds.close()
undefined
> console.log(ds)
Uncaught:
Error [ERR_INTERNAL_ASSERTION]: Error: Dataset object has already been destroyed
    at getOwnPropertyDescriptor (<anonymous>)
    at formatProperty (internal/util/inspect.js:1652:18)
    at formatRaw (internal/util/inspect.js:985:9)
    at formatValue (internal/util/inspect.js:772:10)
    at inspect (internal/util/inspect.js:317:10)
    at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
    at formatWithOptions (internal/util/inspect.js:1858:10)
    at console.value (internal/console/constructor.js:323:14)
    at console.log (internal/console/constructor.js:358:61)
    at REPL33:1:9
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at Function.fail (internal/assert.js:20:9)
    at handleMaxCallStackSize (internal/util/inspect.js:1349:10)
    at formatRaw (internal/util/inspect.js:992:12)
    at formatValue (internal/util/inspect.js:772:10)
    at inspect (internal/util/inspect.js:317:10)
    at formatWithOptionsInternal (internal/util/inspect.js:1976:40)
    at formatWithOptions (internal/util/inspect.js:1858:10)
    at console.value (internal/console/constructor.js:323:14)
    at console.log (internal/console/constructor.js:358:61)
    at REPL33:1:9 {
  code: 'ERR_INTERNAL_ASSERTION'
}
@mmomtchev mmomtchev added the wontfix This will not be worked on label Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant