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

Bug: DOMException: signal is aborted without reason #561

Closed
Nmzik opened this issue May 20, 2024 · 2 comments · Fixed by #564
Closed

Bug: DOMException: signal is aborted without reason #561

Nmzik opened this issue May 20, 2024 · 2 comments · Fixed by #564
Milestone

Comments

@Nmzik
Copy link
Contributor

Nmzik commented May 20, 2024

I've encountered a bug related to external tilesets. It appears that the tile somehow was aborted before. However, I have no idea how that's possible, considering an AbortController instance is created per each load. Therefore, at this point, I need to check additionally if the signal was aborted before (signal.aborted). It seems to happen randomly (but only if you have externals tilesets defined in the main Tileset.json).

Screenshot 2024-05-20 143649

Screenshot 2024-05-20 144303

{
    "stack": "Error: signal is aborted without reason\n    at http://localhost:3000/node_modules/3d-tiles-renderer/src/base/TilesRendererBase.js?v=02784ebd:439:19\n    at LRUCache.unloadUnusedContent (http://localhost:3000/node_modules/3d-tiles-renderer/src/utilities/LRUCache.js?v=02784ebd:162:26)\n    at http://localhost:3000/node_modules/3d-tiles-renderer/src/utilities/LRUCache.js?v=02784ebd:180:10"
}

Update: I'm unable to check the status of the variable signal.aborted

if (t.__loadAbort.signal.aborted === false)
   t.__loadAbort.abort(); //Bypasses the if statement and throws an exception. What's going on?
@Nmzik Nmzik added the bug Something isn't working label May 20, 2024
@gkjohnson gkjohnson removed the bug Something isn't working label May 21, 2024
@gkjohnson gkjohnson added this to the v0.3.33 milestone May 21, 2024
@gkjohnson
Copy link
Contributor

gkjohnson commented May 21, 2024

Aborting tilesets and tiles is done when the tile cache is full and a tile that has started loading is no longer needed - so aborting is correct. Both tiles and internal tilesets are aborted if needed. So this isn't a bug in the sense that it will cause any problems but I agree the error log is not desired. It looks like the thrown abort signal error isn't being caught in one of the fetch promises causing it to print.

If you'd like to investigate and make a PR we can get it merged. Otherwise I'll have to take a look when I get a chance.

@gkjohnson
Copy link
Contributor

I just look a brief look at the TilesRenderer class and it's possible that this is the promise path where the abort is not getting caught: https://github.com/NASA-AMMOS/3DTilesRendererJS/blob/master/src/three/TilesRenderer.js#L341-L363

It's possible that just adding an empty "catch" statement to that promise chain will prevent the log if you'd like to give that a try.

@Nmzik Nmzik mentioned this issue May 22, 2024
gkjohnson pushed a commit that referenced this issue May 22, 2024
@gkjohnson gkjohnson modified the milestones: v0.3.34, v0.3.33 May 31, 2024
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

Successfully merging a pull request may close this issue.

2 participants