dev7355608 / perfect-vision

Foundry VTT Module: Lighting Drawings and Vision Limitation.
https://foundryvtt.com/packages/perfect-vision
MIT License
53 stars 10 forks source link

The map is not shown. #287

Closed Mathias2803 closed 2 years ago

Mathias2803 commented 2 years ago

Expected Behavior

I should see my map like I have done before the update to Foundry version 10.

Current Behavior

The map is not shows, all is black even as the gamemaster.

Steps to Reproduce

  1. enable the module
  2. restart the system after enabeling ==> black map is shown.

Context

No response

Version

v4.0.7

Foundry VTT Version

v10.284

Operating System

Linux

Browser / App

Chrome

Game System

dnd5e

Relevant Modules

too many

dev7355608 commented 2 years ago

Please check the console for error messages: F12 (or Option+Command+I on Mac) and then navigate to the Console tab. Let me know what you find.

Mathias2803 commented 2 years ago

foundry.js:711 TypeError: Canvas drawing failed: Cannot set property drawMode of # which has only a getter. Cannot set property drawMode of # which has only a getter at LightSource._createMesh (foundry.js:47819:19) at LightSource._createMeshes (foundry.js:48113:28) at LightSource._initializeMeshes (foundry.js:47803:12) at LightSource.initialize (foundry.js:48079:10) at AmbientLight.updateSource (foundry.js:42285:19) at AmbientLight._draw (foundry.js:42205:10) at AmbientLight.draw (foundry.js:24869:16) at foundry.js:30447:26 at EmbeddedCollection.map (commons.js:2869:26) at LightingLayer._draw (foundry.js:30445:32)

onError @ foundry.js:711 foundry.js:58303 Canvas drawing failed: Cannot set property drawMode of # which has only a getter

fetch @ foundry.js:58303 foundry.js:4950 Foundry VTT | Rendering HeadsUpDisplay

foundry.js:711 TypeError: Failed to render WebGL canvas. Cannot set properties of null (setting 'visible') at NotesLayer._deactivate (foundry.js:30510:26) at NotesLayer._deactivate (foundry.js:35625:11) at NotesLayer.deactivate (foundry.js:30096:10) at TokenLayer.activate (foundry.js:30061:76) at #initializeCanvasLayer (foundry.js:23575:11) at #initialize (foundry.js:23525:32) at Canvas.draw (foundry.js:23419:29) at async Scene.view (foundry.js:20727:7) at async Game.initializeCanvas (foundry.js:7909:20) at async Game.setupGame (foundry.js:7747:5) onError @ foundry.js:711

foundry.js: 6752 Foundry VTT | Retrieved and compiled template templates/hud/hud.html

Mathias2803 commented 2 years ago

I see these 2 errors at the End but the F12 is very very long and there have been many more bugs! I disabled all other modules and I created a new word with DnD5e with just 2 maps. I guess you can reproduce maybe, too?

If I disable your module, the F12 console is without any errors and warnings.

Mathias2803 commented 2 years ago

I also get an error message each time I change the map: "Canvas drawing failed: Cannot read properties of # with has only a getter" or at another map: "Canvas drawing failed: Cannot read properties of null (reading 'refCount')

dev7355608 commented 2 years ago

It must be one of the earlier error messages that contains the clue. Those that you've shown me can only occur if something else has gone wrong. Could you show me the rest of all of them?

Did you try CTRL+F5 yet? (Reload that clears the cache)

Does it occur in a new scene as well or only particular scenes? If it's only particular scenes, please export one of them and attach it here (I don't need the assets).

Mathias2803 commented 2 years ago

It appears in a new created map with the standard map. Nothing was made there. Just one standard empty figure. But it also appears in my huge world.

Mathias2803 commented 2 years ago

I'm very sorry, suddenly it is working again if all modules are disables.

But if Light/Sound Mask is enabled it has a conflict with your module. Then there is no map shown. But when yours is disabled the map is shown.

(https://github.com/caewok/fvtt-light-mask)

Mathias2803 commented 2 years ago

Foundry VTT | Rendering HeadsUpDisplay libWrapper-wrapper.js:673 Uncaught TypeError: Cannot read properties of undefined (reading 'document') [Detected 2 packages: perfect-vision, lib-wrapper] at GlobalLightSource.updateCommonUniforms (point-source-uniforms.js:22:42) at 🎁LightSource.prototype._updateCommonUniforms#0 (libWrapper-wrapper.js:187:52) at GlobalLightSource._updateBackgroundUniforms (foundry.js:48493:10) at GlobalLightSource._updateUniforms (foundry.js:48345:10) at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:511:22) at GlobalLightSource.updateUniforms (delimiter-effects.js:80:9) at 🎁LightSource.prototype._updateUniforms#0 (libWrapper-wrapper.js:187:52) at GlobalLightSource._initializeShaders (foundry.js:48192:10) at GlobalLightSource.initialize (foundry.js:48083:31) at EffectsCanvasGroup._updateGlobalLightSource (foundry.js:38275:28) at EffectsCanvasGroup.initializeLightSources (foundry.js:38253:47) at 🎁call_wrapped [as call_wrapped] (libWrapper-wrapper.js:511:22) at 🎁CONFIG.Canvas.groups.effects.groupClass.prototype.initializeLightSources#perfect-vision (lighting.js:82:13) at 🎁call_wrapper [as call_wrapper] (libWrapper-wrapper.js:620:16) at 🎁CONFIG.Canvas.groups.effects.groupClass.prototype.initializeLightSources#0 (libWrapper-wrapper.js:189:20) at #update (foundry.js:41016:52) at t.emit (ticker.min.mjs:8:622) at e.update (ticker.min.mjs:8:3473) at _tick (ticker.min.mjs:8:1482)

Mathias2803 commented 2 years ago

Before I disabled all modules only yours was enabled, but your module need the "libWrapper" so it was not working. When yours, the "libWrapper" is only enabled all is working. But when yours, the "libWrapper" and the "Light/Sound Mask" it is also not working.

dev7355608 commented 2 years ago

Fixed in 4.0.8. Thanks for the report!

Mathias2803 commented 2 years ago

Yes, the problem is solved. Thanks a lot!! And sorry for my first mistake.