geometalab / Vector-Tiles-Reader-QGIS-Plugin

Vector Tiles Reader QGIS-Plugin - QGIS Python plugin which reads Mapbox Vector Tiles from a server, a local MBTiles file or a directory
http://plugins.qgis.org/plugins/vector_tiles_reader/
GNU General Public License v2.0
149 stars 30 forks source link

Native decoding - sometimes supported, sometimes not #259

Closed tomchadwin closed 5 years ago

tomchadwin commented 5 years ago

Sometimes the VTR log tells me that native decoding is supported, and sometimes it tells me it is not:

2019-10-03T09:29:49     WARNING    Native decoding supported!!! (Windows, 64bit)
2019-10-03T09:51:34     WARNING    Native decoding not supported. (Windows, 64bit)

Could the test mechanism be unreliable in any way?

mnboos commented 5 years ago

That's actually surprising. I would have thought, it's reliable in a sense, that it always either works or not but not, that it sometimes does and sometimes not on the same machine in the same environment.

tomchadwin commented 5 years ago

OK. Can you think of any manual checks I can do on my system to see whether I can find the issue? Will do some more investigation to see if any pattern for success/failure is apparent.

tomchadwin commented 5 years ago

How about this:

  1. Open QGIS
  2. Connect to a remote VT source and add layers
  3. "Native decoding supported"
  4. New QGIS project (discard changes)
  5. Connect to same remote VT source and add same layers
  6. "Native decoding not supported"

Can you recreate?

tomchadwin commented 5 years ago

It seems that after mp_helper.unload_lib() is called, _native_lib_handle is never reset. I guess this is because it only runs when mp_helper is imported, as it's not within any function/class def? Let me see if I can see where one could try to move it to see whether it might work.