Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

TypeError: Cannot read properties of undefined (reading 'offset') #374

Open
altundag opened this issue Jul 12, 2023 · 3 comments
Open

TypeError: Cannot read properties of undefined (reading 'offset') #374

altundag opened this issue Jul 12, 2023 · 3 comments

Comments

@altundag
Copy link

Hello,

I get the following error when I try to load ce24e6fd-d4aa-4922-a91b-06c327a5c99b.tiff:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'offset')
    at blockedsource.js:271:29
    at Array.map (<anonymous>)
    at BlockedSource.readSliceData (blockedsource.js:259:19)
    at BlockedSource._callee$ (blockedsource.js:160:17)
    at tryCatch (blockedsource.js:2:1)
    at Generator.<anonymous> (blockedsource.js:2:1)
    at Generator.next (blockedsource.js:2:1)
    at asyncGeneratorStep (blockedsource.js:2:1)
    at _next (blockedsource.js:2:1)

The version that I am using is v2.0.7. Here is a code snippet to reproduce the issue:

let tiff = await GeoTIFF.fromUrl("./data/ce24e6fd-d4aa-4922-a91b-06c327a5c99b.tiff");

// throws """TypeError: Cannot read properties of undefined (reading 'offset')"""
let ifd = await tiff.requestIFD(0);

I am not 100% sure, but the current < top condition here might be the cause (should it be current <= top?). Could you please help me fix the issue?

The following issues might be related to this one:

@zipporaSay
Copy link

I met the problem too

@wtlovzjj
Copy link

wtlovzjj commented Aug 9, 2023

V2.0.7 still has this bug

@altundag
Copy link
Author

I created pull request #394 to implement the proposed fix. Please review it.

@altundag altundag changed the title Offset aritmetic bug(?): TypeError: Cannot read properties of undefined (reading 'offset') TypeError: Cannot read properties of undefined (reading 'offset') Oct 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants