caewok / fvtt-elevation-ruler

Modifies Foundry VTT ruler to display when dragging tokens, add token speed highlighting, do pathfinding, calculate elevation
MIT License
9 stars 9 forks source link

Pathfinding stops working after first use #101

Open revilowaldow opened 1 week ago

revilowaldow commented 1 week ago

image TypeError: Cannot read properties of undefined (reading 'upperIds') at mergeHulls (cdt2d_bundle.js:587:26) at monotoneTriangulate (cdt2d_bundle.js:641:7) at cdt2d (cdt2d_bundle.js:128:15) at cdt2dConstrainedGraph (cdt2d_access_functions.js:50:21) at Pathfinder._buildTriangles (pathfinding.js:197:23) at Pathfinder.initialize (pathfinding.js:181:10) at Pathfinder.runPath (pathfinding.js:288:52) at calculatePathPointsForSegment (segments.js:97:19) at Ruler._getMeasurementSegments (segments.js:57:7) at 🎁CONFIG.Canvas.rulerClass.prototype._getMeasurementSegments#0 (libWrapper-wrapper.js:187:52) at Ruler.measure (foundry.js:35789:26) at Ruler._onMouseMove (foundry.js:36402:10) at Token5e._onDragLeftMove (Token.js:54:33) at 🎁CONFIG.Token.objectClass.prototype._onDragLeftMove#0 (libWrapper-wrapper.js:187:52) at MouseInteractionManager.callback (foundry.js:30532:17) at #handleDragMove (foundry.js:30911:26) at #handlePointerMove (foundry.js:30876:64) at vh.notifyListeners (EventBoundary.ts:1464:33) at vh.notifyTarget (EventBoundary.ts:658:14) at vh.propagate (EventBoundary.ts:310:18) at vh.dispatchEvent (EventBoundary.ts:210:14) at vh.mapPointerMove (EventBoundary.ts:815:64) at vh.mapEvent (EventBoundary.ts:231:28) at ra.onPointerMove (EventSystem.ts:396:31)

caewok commented 6 days ago

I am going to need a bit more here. What version of Foundry, what system/version are you using, and what version of Elevation Ruler? Is it specific to a single scene or does it do the same thing everywhere? If it is a specific scene, can you upload a json export of that scene so I can see what the walls look like? Thanks!

revilowaldow commented 6 days ago

Foundry Virtual Tabletop: Version 12 Stable, 12.327 Game System: dnd5e, 3.2.1 Active Modules: 3 Performance Mode: 3

OS: Windows 15.0.0 x86 (64-bit) Client: Not/A)Brand/8.0.0.0 GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 2080 SUPER (0x00001E81) Direct3D11 vs_5_0 ps_5_0, D3D11) Max Texture Size: 16384

Scene: 6040 x 4632 | Grid Size: 102 | Padding Percentage: 0.25 Walls: 528 | Ambient Lights: 0 | Ambient Sounds: 0 | Tiles: 0 | Tokens: 5 Largest Texture: 4000 x 3000

Actors: 5 | Items: 0 | Journal Entries: 0 | Rollable Tables: 0 | Playlists: 0 | Compendium Packs: 13 | Chat Messages: 5

World Scripts:

/ -------------------------------------------- / / World Data / / -------------------------------------------- /

Actors: 5 | 52 kB CardStacks: 0 | 764 B Messages: 5 | 17 kB CombatEncounters: 3 | 13 kB FogExplorations: 2 | 2 MB Folders: 4 | 2 kB Items5e: 0 | 764 B Journal: 0 | 764 B Macros: 0 | 764 B Playlists: 0 | 764 B RollTables: 0 | 764 B Scenes: 3 | 2 MB WorldSettings: 8 | 10 kB Users: 1 | 2 kB

/ -------------------------------------------- / / Compendium Data / / -------------------------------------------- /

"dnd5e.heroes": 12 Actors | 415 kB "dnd5e.monsters": 331 Actors | 2 MB "dnd5e.items": 872 Items | 843 kB "dnd5e.tradegoods": 23 Items | 13 kB "dnd5e.spells": 319 Items | 409 kB "dnd5e.backgrounds": 3 Items | 6 kB "dnd5e.classes": 12 Items | 60 kB "dnd5e.subclasses": 12 Items | 19 kB "dnd5e.classfeatures": 235 Items | 201 kB "dnd5e.races": 34 Items | 47 kB "dnd5e.monsterfeatures": 252 Items | 172 kB "dnd5e.rules": 20 Journal Entries | 373 kB "dnd5e.tables": 31 Rollable Tables | 45 kB

/ -------------------------------------------- / / Active Modules / / -------------------------------------------- /

elevationruler | 0.9.4 | "Elevation Ruler" | "https://github.com/caewok/fvtt-elevation-ruler/releases/latest/download/module.json" find-the-culprit | 2.0.3 | "Find the Culprit" | "https://github.com/esheyw/find-the-culprit/releases/latest/download/module.json" lib-wrapper | 1.12.13.1 | "libWrapper" | "https://github.com/ruipin/fvtt-lib-wrapper/releases/latest/download/module.json"


image image image image


revilowaldow commented 6 days ago

I've recreated the relevant aspects of the scene in a fresh world, which seem to include hostile actors in the relevant positions. And one neutral disposition NPC (the 'wolf'). I've included the wall data and the attempted movement is from A to B or vice versa, you may need to try multiple times to trip the error. fvtt-Scene-test2-nDzITWL9hmAacRkr.json

Regretfully I am unable to include the original scene or the map image as they are confidential playtest material subject to NDA.

Hopefully this helps, its a tricky one to reproduce

image

caewok commented 2 days ago

I messed around with this quite a bit but could not replicate any error. I even tried re-adding the actors to the scene. I must be missing something, but not quite sure what.