Bug report #6058
GPS Tools freeze QGIS
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | C++ Plugins | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | Yes | Copied to github as #: | 15420 |
Description
I'm trying to download data from a Garmin GPSMAP 60CS with the GPS Tools and I'm faced with a strange and erratic behavior.
I leave here a screencast: http://goo.gl/lofgh
With gpsbabel, from the command line or from GUI, everything works fine.
With the GPS Tools, using the arguments %in and %out, it does not work, as you can see in the screencast, or because it freezes QGIS, or because it shows the message "The layer (...) is not a valid layer and can not be added to the map".
Putting the full command on the "Waypoint download" field (gpsbabel -w -i garmin -o gpx -f usb: -F /home/pedro/waypoints/wpt2.gpx), it works sometimes, while other times it downloads the data and creates the .gpx file, but freezes and the only option is to force close the tool, which makes QGIS crash.
After a huge set of tests, I found what might be a pattern, although sometimes there are attempts that fail this pattern.
The tool works most of the time, downloading or uploading data, with the commands:
Waypoint download: %babel -w -i garmin -o gpx -f /dev/ttyUSB0 -F "%out"
Track upload: %babel -t -i gpx -f "%in" -o garmin -F /dev/ttyUSB0
since, previously, I delete the quotes on "%out"/"%in" and then click Update (which puts again the quotes).
In addition, I noticed that it gives much more errors (freezing), using Tab and Enter to click the buttons (Save as and OK). Using the mouse for that, worked in most of the attempts.
So, if you do not delete the "", in most cases it shows the message: "The layer (...) is not a valid layer and can not be added to the map", and moreover, if not using the mouse, the errors are much more frequent.
I made these attempts in both Xubuntu 12.04 and Windows 7, with similar results, although in Win freezing is somewhat less common.
As I said, using gpsbabel directly, both from CLI and GUI, everything works smoothly.
This behavior has already been confirmed by several people, with the same GPS and others (Garmin GPSMap, Magellan 330M), in this thread: http://osgeo-org.1560.n6.nabble.com/GPS-Tools-strange-behavior-td4988361.html
History
#1 Updated by Paolo Cavallini about 12 years ago
- Target version changed from Version 1.8.0 to Version 2.0.0
#2 Updated by Giovanni Manghi about 12 years ago
- Crashes QGIS or corrupts data changed from No to Yes
- Priority changed from Normal to High
- Category set to C++ Plugins
- Subject changed from GPS Tools strange behavior to GPS Tools freeze QGIS
This can be somehow related to #6318, an issue that affects Windows and that I still have to check under Linux.
Regarding this specific ticket: in many places (for example the Gpsbabel site) is referred that is needed to manually fix a permission problem regarding the access to usb gps units.
In my case for example (Ubuntu 12.04), gpsbabel from the CLI works only if I "sudo" the command, otherwise I get a
Claim interfaced failed: could not claim interface 0: Operation not permitted
message.
So if I launch QGIS with sudo it works, if not it freezes.
Also in my case under Ubuntu, happens that the with a Garmin usb unit, the GPS plugin never works with the "garmin_gps" kernel module loaded (and so using the /dev/ttyUSB0). I have first to unload it
sudo modprobe -r garmin_gps
and then use "usb:" as device in gpsbabel CLI command or QGIS.
On the other hand the live tracking tool works only with that kernel module loaded.
#3 Updated by mlennert - about 12 years ago
Giovanni Manghi wrote:
This can be somehow related to #6318, an issue that affects Windows and that I still have to check under Linux.
I can confirm this issue with Ubuntu 12.04 using a Garmin GPS76 with a serial/usb adapter. I can also confirm the somewhat erratic behavior of QGIS in this.
Regarding this specific ticket: in many places (for example the Gpsbabel site) is referred that is needed to manually fix a permission problem regarding the access to usb gps units.
In my case for example (Ubuntu 12.04), gpsbabel from the CLI works only if I "sudo" the command, otherwise I get a
Claim interfaced failed: could not claim interface 0: Operation not permitted
message.
So if I launch QGIS with sudo it works, if not it freezes.
On Debian-based systems (i.e. also Ubuntu) adding the user to the dialout group should be enough. At least that's what allows me to use gpsbabel as normal user to access the /dev/ttyUSB0 device.
Also in my case under Ubuntu, happens that the with a Garmin usb unit, the GPS plugin never works with the "garmin_gps" kernel module loaded (and so using the /dev/ttyUSB0). I have first to unload it
gpsbabel (& GRASS v.in.gpsbabel) works fine for me using /dev/ttyUSB0 without the garmin_gps module loaded.
sudo modprobe -r garmin_gps
and then use "usb:" as device in gpsbabel CLI command or QGIS.
usb: doesn't work in my case because of the serial/usb adapter.
This used to work perfectly, but I don't have the time to test different version to see when the issue came up.
Moritz
#4 Updated by mlennert - about 12 years ago
mlennert - wrote:
Giovanni Manghi wrote:
This can be somehow related to #6318, an issue that affects Windows and that I still have to check under Linux.
I can confirm this issue with Ubuntu 12.04 using a Garmin GPS76 with a serial/usb adapter. I can also confirm the somewhat erratic behavior of QGIS in this.
Forgot to mention: this is with 1.8.0.
Moritz
#5 Updated by Paolo Cavallini almost 11 years ago
- Target version changed from Version 2.0.0 to Future Release - High Priority
#6 Updated by Giovanni Manghi over 10 years ago
- Status changed from Open to Feedback
I suggest to close this, see #6318
#7 Updated by Pedro Venâncio over 10 years ago
- Status changed from Feedback to Closed
Closing this Giovanni.