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

Windows: Cannot use anymore d&d in DB Manager to import a layer from Spatialite in PostGIS #24206

Closed
qgib opened this issue Mar 6, 2017 · 19 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin High Priority Regression Something which used to work, but doesn't anymore
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Mar 6, 2017

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 16296
Affected QGIS version: 2.18.13
Redmine category:db_manager
Assignee: Luigi Pirelli


This seems to happen only on Windows (both Standalone and osgeo4w) as on other platforms (Linux, macOS) seems ok.

The error is always like

"unable to load the layer LAYERNAME"

Unless I'm wrong this used to work as expected in the past.

The same layer once loaded in the canvas can be imported using the "import layer/file" tool in DB Manager.


@qgib
Copy link
Contributor Author

qgib commented Mar 6, 2017

Author Name: Giovanni Manghi (@gioman)


The same error shows when trying to import from GPKG to SL or PostGIS (and again only on Windows).

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • regression was configured as 1

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • priority_id was changed from Severe/Regression to High

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 5, 2017

Author Name: Giovanni Manghi (@gioman)


  • version was changed from 2.18.4 to 2.18.7
  • description was changed from This seems to happen only on Windows (both Standalone and osgeo4w) as on other platforms (Linux, macOS) seems ok.

The error is always like

"unable to load the layer LAYERNAME"

Unless I'm wrong this used to work as expected in the past.

The same layer once loaded in the canvas can be imported using the "import layer/file" tool in DB Manager. to This seems to happen only on Windows (both Standalone and osgeo4w) as on other platforms (Linux, macOS) seems ok.

The error is always like

"unable to load the layer LAYERNAME"

Unless I'm wrong this used to work as expected in the past.

The same layer once loaded in the canvas can be imported using the "import layer/file" tool in DB Manager.

@qgib
Copy link
Contributor Author

qgib commented Sep 26, 2017

Author Name: Giovanni Manghi (@gioman)


  • subject was changed from Cannot use anymore d&d to import a layer from Spatialite in PostGIS to Windows: Cannot use anymore d&d in DB Manager to import a layer from Spatialite in PostGIS
  • version was changed from 2.18.7 to 2.18.13

@qgib
Copy link
Contributor Author

qgib commented Sep 29, 2017

Author Name: Luigi Pirelli (@luipir)


  • assigned_to_id was configured as Luigi Pirelli

@qgib
Copy link
Contributor Author

qgib commented Sep 29, 2017

Author Name: Luigi Pirelli (@luipir)


setting up a win 2.18 build to debug... in the meantime verifying on linux env

@qgib
Copy link
Contributor Author

qgib commented Sep 29, 2017

Author Name: Luigi Pirelli (@luipir)


please @giovanni add an exact procedure to replicate.

e.g. from what panel do you do d&d? from the same db manager? from layer panel? from a file? more datail and procedural steps are necessary

@qgib
Copy link
Contributor Author

qgib commented Sep 29, 2017

Author Name: Giovanni Manghi (@gioman)


screencast attached. The same operation works on Linux.



@qgib
Copy link
Contributor Author

qgib commented Sep 29, 2017

Author Name: Luigi Pirelli (@luipir)


Giovanni Manghi wrote:

screencast attached. The same operation works on Linux.

not confirmed on OSGeo4W qgis-rel-dev (2.18.13) dragging a spatialite layer... on what disk the layer is available? a network disk?

@qgib
Copy link
Contributor Author

qgib commented Oct 2, 2017

Author Name: Francisco Raga (@All4Gis)


Confirmed using qgis-rel-dev (2.18.13-8) on windows 10.

video attached.

the .sqlite used : https://www.gaia-gis.it/spatialite-2.3.1/test-2.3.zip
and gpkg : http://www.geopackage.org/data/sample1_2.gpkg

the source for the exmaple gpkg is:
u'G:/16296/sample1_2.gpkg'

if load it from dbmanager:
u'D:/test/16296/sample1_2.gpkg|layername=counties'


  • 11504 was configured as record16286.mp4

@qgib
Copy link
Contributor Author

qgib commented Oct 2, 2017

Author Name: Luigi Pirelli (@luipir)


From a log done by Giovanni Manghi the error is the QgsMimeDataUtils::decodeUriList method
..........\src\core\qgsmimedatautils.cpp(111) : (QgsMimeDataUtils::decodeUriList) [15234ms] vector:ogr:counties:C:/Users/gio/Desktop/sample1_2.gpkg|layername=counties
..........\src\core\qgsmimedatautils.cpp(47) : (QgsMimeDataUtils::Uri::Uri) [16ms] encData: vector:ogr:counties:C:/Users/gio/Desktop/sample1_2.gpkg|layername=counties
..........\src\core\qgsmimedatautils.cpp(71) : (QgsMimeDataUtils::Uri::Uri) [15ms] type:vector key:ogr name:counties uri:C supportedCRS: supportedFormats:


  • 11505 was configured as qgislog.txt

@qgib
Copy link
Contributor Author

qgib commented Oct 2, 2017

Author Name: Luigi Pirelli (@luipir)


the log is different in my case:
..........\src\core\qgsmimedatautils.cpp(111) : (QgsMimeDataUtils::decodeUriList) [36333ms] vector:spatialite:prova_giovanni:dbname='//vmware-host/Shared Folders/Desktop/data/issue_16296/prova_giovanni.sqlite' table="prova_giovanni" (geometry) sql=
..........\src\core\qgsmimedatautils.cpp(47) : (QgsMimeDataUtils::Uri::Uri) [15ms] encData: vector:spatialite:prova_giovanni:dbname='//vmware-host/Shared Folders/Desktop/data/issue_16296/prova_giovanni.sqlite' table="prova_giovanni" (geometry) sql=
..........\src\core\qgsmimedatautils.cpp(71) : (QgsMimeDataUtils::Uri::Uri) [0ms] type:vector key:spatialite name:prova_giovanni uri:dbname='//vmware-host/Shared Folders/Desktop/data/issue_16296/prova_giovanni.sqlite' table="prova_giovanni" (geometry) sql= supportedCRS: supportedFormats:

due the fact that Desktop points to the host desktop in my VM

@qgib
Copy link
Contributor Author

qgib commented Oct 2, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


@luigi: not sure if it is related, but in current master the Drag&Drop in the browser (also) segfaults my QGIS.

Test:

  • load 2 shapefiles
  • save one of them as gpkg in /tmp (all fine untill now)
  • now in browser (or actually in the 'datamanager/onebutton') drag another shape into the gpkg
  • with me it segfaults then

(not sure if it is related though)

Warning 6: creation option '' is not formatted with the key=value format
Warning 6: layer creation option '' is not formatted with the key=value format
ERROR 6: The PNG driver does not support update access to existing datasets.

ERROR 6: The PNG driver does not support update access to existing datasets.

ERROR 6: The PNG driver does not support update access to existing datasets.

ERROR 1: Random access not supported for /vsizip
ERROR 1: posix_spawnp() failed
QGIS died on signal 11[New LWP 18384]
[New LWP 18385]
[New LWP 18386]
[New LWP 18387]
[New LWP 18388]
[New LWP 18389]
[New LWP 18392]
[New LWP 18393]
[New LWP 18394]
[New LWP 18395]
[New LWP 18396]
[New LWP 18397]
[New LWP 18407]
[New LWP 18420]
[New LWP 18421]
[New LWP 18438]

warning: td_ta_new failed: generic error

warning: File "/usr/lib/x86_64-linux-gnu/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /usr/lib/x86_64-linux-gnu/libthread_db-1.0.so
line to your configuration file "/home/richard/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/richard/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Cannot access memory at address 0x7f26d5724148

warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

warning: td_ta_new failed: generic error

warning: File "/usr/lib/x86_64-linux-gnu/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Failed to read a valid object file image from memory.
Couldn't get registers: No such process.
[Current thread is 1 (LWP 18383)]
Couldn't get registers: No such process.
Couldn't get registers: No such process.
Python Exception <class 'gdb.error'> Couldn't get registers: No such process.: 
Couldn't get registers: No such process.
/home/richard/bin/qgis: line 5: 18383 Killed                  /home/richard/bin/qgis_all/master/debug/bin/qgis "$@"


@qgib
Copy link
Contributor Author

qgib commented Oct 2, 2017

Author Name: Luigi Pirelli (@luipir)


Richard, I can't say, btw Browser is completely different code respect Db Manager. Try to notify this issue to Alessando Pasotti or Even Rouault

Richard Duivenvoorde wrote:

@luigi: not sure if it is related, but in current master the Drag&Drop in the browser (also) segfaults my QGIS.

Test:

  • load 2 shapefiles
  • save one of them as gpkg in /tmp (all fine untill now)
  • now in browser (or actually in the 'datamanager/onebutton') drag another shape into the gpkg
  • with me it segfaults then

(not sure if it is related though)

[...]

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2017

Author Name: Luigi Pirelli (@luipir)


preparing PR

@qgib
Copy link
Contributor Author

qgib commented Oct 3, 2017

Author Name: Luigi Pirelli (@luipir)


PR #5290


  • pull_request_patch_supplied was changed from 0 to 1

@qgib
Copy link
Contributor Author

qgib commented Oct 11, 2017

Author Name: Luigi Pirelli (@luipir)


Applied in changeset 378ab23.


  • status_id was changed from Open to Closed
  • done_ratio was changed from 0 to 100

@qgib qgib closed this as completed Oct 11, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore labels May 25, 2019
@qgib qgib added this to the Version 2.18 milestone May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin High Priority Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

No branches or pull requests

1 participant