QGIS Application - Bug report #17043 Browser keeps scanning directory with gpkg file

Similar documents
QGIS Application - Bug report #18988 QGIS Server rendering different from Desktop rendering

QGIS Application - Bug report #8332 QGIS uses comma as decimal separator for shapefile attribute data

QGIS Application - Bug report #5475 Problem to insert splitted geometries in postgis

QGIS Application - Bug report #16462 QGIS Server lost the ability to cascade WMS layers published using HTTPS

QGIS Application - Bug report #13592 Processing: `r.to.vect` and `v.generalize` fail

QGIS Application - Bug report #7080 Master version crashes when loads 1.8 project

QGIS Application - Bug report #8942 R6034 runtime error

QGIS Application - Bug report #7643 Empty console Output on R, under SEXTANTE

QGIS Application - Bug report #3497 [OsX] Crash when changing font and color in Style manager on OS X

QGIS Application - Bug report #295 rendering vectors got tremendously slow

QGIS Application - Bug report #83 Strange polygon fill rendering

Usability Test Report: Bento results interface 1

Arduino IDE Friday, 26 October 2018

QGIS Application - Bug report #418 QGIS fails to read undefined projection from user datum in shape.prj file

QGIS Application - Bug report #15752 Degradation of rendering performances in MSSQL provider

ET: Legacy Development - Bug #44 Remove SMP code

CMSC/BIOL 361: Emergence Cellular Automata: Introduction to NetLogo

It s possible to get your inbox to zero and keep it there, even if you get hundreds of s a day.

User Feedback. Report Details. QGIS Application - Bug report #18736 Crash when aborting geometry check. C++ plugins/geometry Checker

CHIRP - New Model # 5825

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement

Is this a known issue? Seems to affect only recurring events. I have some of them and all are shifted. Non-recurring events show properly.

ET: Legacy Development - Bug #123 Building Omnibot with ET: Legacy fails

CHIRP - Bug # Cannot upload to Yaesu FT-897D (US) Mac OS X Description

"Missing log" in edit viewer, all media gone Posted by prodeuser - 17 Aug :14

Lesson 9 Transcript: Backup and Recovery

Enhance InfoPath form with Validation, Formatting and Lookups

============================================================================

Adding content to your Blackboard 9.1 class

Post Experiment Interview Questions

MITOCW watch?v=se4p7ivcune

related to Bug # 3211: Kenwood TK-260G bug Closed 01/24/2016 related to Bug # 3213: Kenwood TK-270G Closed 01/24/2016

REVIEW: A LOOK AT A PORTABLE USB3 NETWORK TAP WIRESHARK HEROES SERIES VISIT

How to skin Rainlendar 2 Posted by he_the_great /11/01 16:03

Windows 7 Will Not Load On My Computer Says Its

MITOCW watch?v=flgjisf3l78

Register FAQ Calendar Today's Posts Search

CHIRP - Bug # Description. When trying to download from radio, recieve "Incorrect Model Selected" error, Associated revisions.

GSAK (Geocaching Swiss Army Knife) GEOCACHING SOFTWARE ADVANCED KLASS GSAK by C3GPS & Major134

(Refer Slide Time: 06:01)

Lesson 3 Transcript: Part 1 of 2 - Tools & Scripting

CHIRP - Bug # Description

MITOCW watch?v=9h6muyzjms0

Detailed instructions for adding (or changing) your Avatar (profile picture next to your

Blog post on updates yesterday and today:

Usability Test Report: Requesting Library Material 1

The Definitive Guide to Fractal Awesomeness with J-WildFire!

CHIRP - New Model # 1343

QGIS Application - Bug report #14822 QGIS Server : segmentation fault in GetProjectSettings

CHIRP - New Model # 217

UKNova s Getting Connectable Guide

Essbase Installation Tutorial Tim Tow, President and Oracle ACE Director. Applied OLAP, Inc

Helping the Compiler Help You. Thomas Dy

Customize Your Environment

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Automating Digital Downloads

Review of the Stable Realtime Release Process

MITOCW watch?v=w_-sx4vr53m

Re: Shirk Family Gift to BCPA Jim Mack to: Jo-Anna Ramsay

MITOCW watch?v=zm5mw5nkzjg

Chamilo LMS - Bug #6044 AICC import - "The package you are trying to upload has an unknown format."

How to Get Your Inbox to Zero Every Day

Contents. What's New. Upcoming new version. Newsletter #43 (Aug 6, 2017) A couple quick reminders:

CHIRP - Bug # 359. Unable to clone from FT8800 Description. MacOS , Python 2.5.4, CHIRP 0.2.3

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek

Summer Assignment for AP Computer Science. Room 302

Artificial Intelligence Prof. Deepak Khemani Department of Computer Science and Engineering Indian Institute of Technology, Madras

Week - 03 Lecture - 18 Recursion. For the last lecture of this week, we will look at recursive functions. (Refer Slide Time: 00:05)

IT 220 Course Notes. Don Colton Brigham Young University Hawaii

Lesson 8 Transcript: Database Security

Shell Script Not Running Via Cron Runs Fine Manually

Programming Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science Indian Institute of Technology, Madras

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at

Guide to Installing Fldigi and Flmsg with Red Cross Templates

Q&A Session for Connect with Remedy - CMDB Best Practices Coffee Break

APPENDIX B. Fortran Hints

Usability Test Report: Tool for Books & More Bento Box 1

I Want To Wipe My Computer Clean And Start Over Windows 7

Printing Drafts in Outlook Showing Date sent Asked by: OntarioMedicalAssociatin

Getting started with Python

Exiv2 - Support #1151 Small raw images size

Excel Vba Manually Update Links Automatically On Open File Ignore

Subversion was not there a minute ago. Then I went through a couple of menus and eventually it showed up. Why is it there sometimes and sometimes not?

Create Automatic Deployment Rule In SCCM 2012 R2

Week - 01 Lecture - 04 Downloading and installing Python

Out for Shopping-Understanding Linear Data Structures English

QGIS Application - Bug report #246 QGIS Preview 1 crashes on loading a shapefile

Browsing the World Wide Web with Firefox

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules

Register FAQ Calendar Today's Posts Search

Data Reduction Helpdesk First Responder Guidelines

Trying To Uninstall Norton 360 Wont Let Me Connect

And that is why Marcus was a firm believer in the importance of version control.

QGIS Application - Bug report #277 Problem viewing PostGIS views of views

MITOCW watch?v=kz7jjltq9r4

Hi Bob, I got this from my colleagues near the end of last week and unfortunately lost track of it in my inbox to send you.

Photoshop Tutorial: Basic Selections

Manual Removal Norton Internet Security Won't Open Or

TA Kathryn s Tips for Library Searching and Saving Information for Reference Lists Kathryn Bell, November 2012

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

Transcription:

QGIS Application - Bug report #17043 Browser keeps scanning directory with gpkg file 2017-08-21 12:50 PM - Richard Duivenvoorde Status: Closed Priority: High Assignee: Alessandro Pasotti Category: Browser Affected QGIS version:master Regression?: No Operating System: Easy fix?: No Debian Testing Pull Request or Patch supplied: Yes Resolution: Crashes QGIS or corrupts No data: Description Using 2.99 / current master (20 aug 2017) running self compiled QGIS on Debian Testing, when I run QGIS from cli the following messages keep flying over my (debug) terminal: src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [29ms] [thread:0x7f4fb4002620] GDALOpen error # 4 : src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [15ms] [thread:0x7f4fb4002620] GDALOpen error # 4 : `/home/richard/geodata/world.gpkg' src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [141ms] [thread:0x7f4fb4001fc0] GDALOpen error # 4 : `/home/richard/geodata/nl.gpkg' src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [10ms] [thread:0x7f4fb4001fc0] GDALOpen error # 4 : src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [17ms] [thread:0x7f4fb4001fc0] GDALOpen error # 4 : `/home/richard/geodata/world.gpkg' src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [148ms] [thread:0x561ed4366150] GDALOpen error # 4 : `/home/richard/geodata/nl.gpkg' src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [24ms] [thread:0x561ed4366150] GDALOpen error # 4 : src/providers/gdal/qgsgdaldataitems.cpp: 282: (dataitem) [18ms] [thread:0x561ed4366150] GDALOpen error # 4 : `/home/richard/geodata/world.gpkg' It also takes a lot of resources at that moment. I see this when the Browser Panel is open. As you see I have a directory with a couple of gpkg files in it (besides other files), and (to me) it looks like that after concluding that GDAL cannot open one or more of the (sub) layers, instead of stopping it starts all over again to see if it can open it... At that moment qgis eats 40% of cpu over a couple of cores on my laptop. Note that this never ends. Associated revisions Revision 1d4c6061-2017-09-12 03:00 PM - Alessandro Pasotti [bugfix] Browser keeps scanning directory with gpkg file Fixes #17043 by introducing a check for last directory scan timestamp and skipping the directorychanged signal is the last scan was less than 10 seconds in the past. 1/6

Tested with > 300 gpkg files in a single directory. History #1-2017-08-21 04:40 PM - Giovanni Manghi - Priority changed from Normal to High - Regression? changed from No to Yes #2-2017-08-21 06:48 PM - Alessandro Pasotti - Assignee set to Alessandro Pasotti I saw this in Nodebo and I though it was fixed, would you please give me a test scenario? The gpkg files are valid? What are your options for the browser? #3-2017-08-21 06:49 PM - Alessandro Pasotti... also, do you have them in multiple favorites? #4-2017-08-22 11:25 AM - Richard Duivenvoorde - File settings.png added Hi Alessandro, I will sent you the two gpkg packages I have by email. They are only available in /home/richard/geodata And I have 1 favourite: /home/richard/geodata It is not clearly when it happens, sometimes it does NOT and other times, it is when I open the gpkg node of one of them. I also run QGIS-master and QGIS-2.18.11 concurrently, and thought that that would be the problem. I observe it with both versions. I add a screenshot of my settings, right is 2.18.11 and left is master #5-2017-08-22 11:27 AM - Alessandro Pasotti with "I observe it with both versions." do you mean that this bug is not a regression that was introduced recently on master? #6-2017-08-22 11:30 AM - Giovanni Manghi - Status changed from Open to Feedback #7-2017-08-22 12:08 PM - Richard Duivenvoorde I mean that I can see it in both windows, either the master terminal or the 2.18 terminal. 2/6

I just compiled 2.18.12 and it still happens, as said not ALWAYS, but with some fiddling and trying it happens at a certain point... Slightly other output? src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [7ms] [thread:0x55963379e9f0] GDALOpen error # 4 : `/home/richard/geodata/nl.gpkg' src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [12ms] item favourites:/ home richard geodata state changed 1 -> 2 src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [2ms] item favourites:/ home richard geodata state changed 2 -> 1 src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [9ms] [thread:0x55963379e9f0] GDALOpen error # 4 : `/home/richard/geodata/nl.gpkg' src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [12ms] [thread:0x55963379e9f0] GDALOpen error # 4 : src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [6ms] item favourites:/ home richard geodata state changed 1 -> 2 src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [1ms] item favourites:/ home richard geodata state changed 2 -> 1 src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [5ms] [thread:0x55963379e9f0] GDALOpen error # 4 : `/home/richard/geodata/nl.gpkg' src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [11ms] [thread:0x55963379e9f0] GDALOpen error # 4 : src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [11ms] [thread:0x55963379e9f0] GDALOpen error # 4 : `/home/richard/geodata/world.gpkg' src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [9ms] item favourites:/ home richard geodata state changed 1 -> 2 src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [67ms] item favourites:/ home richard geodata state changed 2 -> 1 src/providers/gdal/qgsgdaldataitems.cpp: 288: (dataitem) [6ms] [thread:0x55963379e9f0] GDALOpen error # 4 : `/home/richard/geodata/nl.gpkg' src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [8ms] item favourites:/ home richard geodata state changed 1 -> 2 src/core/qgsbrowsermodel.cpp: 418: (itemstatechanged) [2ms] item favourites:/ home richard geodata state changed 2 -> 1 #8-2017-08-22 12:13 PM - Giovanni Manghi Richard Duivenvoorde wrote: I mean that I can see it in both windows, either the master terminal or the 2.18 terminal. Hi Richard, I think that Alessandro's question is because he needs to understand of this behavior was introduced by the work he is doing on the Broswer and GPKG support in QGIS 3, but it seems that after all this is also happening in QGIS 2.18.* so after all is not a regression, correct? cheers! #9-2017-08-22 12:22 PM - Richard Duivenvoorde - File qgis218terminal.png added Ok, I found a more reproducible case now: Given you have the prov.gpkg (with prov layer in it): - open 2.18.12 in terminal and make sure you have browser panel open - open master in terminal and make sure you have browser panel open 3/6

No need to do anything in QGIS 2.18, just observe the terminal Now open the layer prov in prov.gpkg, immidiatly in my 2.18.12 terminal you get the messages above. AND when you unload the layer in QGIS-master, the running messages stop! So I think(!) that it has something to do with maybe concurrently opening/scanning a gpkg file with two QGIS processes? #10-2017-08-22 12:33 PM - Alessandro Pasotti As I said, I've seen this before and I think I know why it happens: 1. when opening a GPKG sqlite creates two temporary files (wal and shm), this triggers a new re-scan of the folder, re-opening the files and re-creating the shm and wal, which triggers a new re-scan of the folder... infinite loop! (an attempt to fix this was done in commit:bcb48f2bdc8f274cbc68f376489430f45e0b17d1 2. worse: each file is opened twice with GDAL and OGR providers, that could be completely avoided in GDAL 2.x (but this is somewhere down in my TODO list) There is no perfect solution to this issue but I can try to mitigate the effect. BTW, I'd be surprised if this was a regression, I believe that the bug was just sitting there and wait for someone to test the gpkg. #11-2017-08-22 01:19 PM - Richard Duivenvoorde - Regression? changed from Yes to No Hi Ale, I agree, it NOT a regression: removing the Regression flag. I'm pretty sure I've seen this already for a long time. But always thought that it was something in my septup or so. Is it maybe possible to add a 'filter' to the 'scan'-function? Some candidates for this filter: - *.shm - *.wal - /initrd.img <- always on linux machines? - all kind of temporary files (like the.qgs~, vim also has something like that etc) I would also be ok, with some kind of 'empty' browser, so that you really have to add directories to be able to browse them. OR only scan the favourites, and not the full tree? #12-2017-08-22 03:54 PM - Alessandro Pasotti No way to add filters, that was my first idea too.. The signal is fired any time something changes in the directory, my fix was to disconnect the signal while the children of the tree are populated (that's when the providers try to open the files - and where GDAL fails) and reconnecting them at the end. And as an additional issue, if you start creating a file (for example a new shape or gpkg or whatever) the signal is fired and the provider fails because the file is still being written (but this is another issue). 4/6

BTW, let me try to reproduce it, because I thought it was fixed and I couldn't reproduce it anymore, maybe having many gpkg in the same folder triggers the error. #13-2017-08-22 05:45 PM - Alessandro Pasotti I cannot reproduce in master. Can you please confirm that on master it is fixed? If you run simultaneously 2.8, then you might see the error in master because of the bug in 2.18 that keeps opening the files and creating the temporary shm and wal and trigger the re-scan. #14-2017-08-25 02:58 PM - Richard Duivenvoorde Tested with two master QGIS versions concurrently running, and then it seems fine! As soon as I start a 2.18, master still starts freaking out. So: close this one? #15-2017-09-08 11:00 AM - Alessandro Pasotti No, please leave this open, I need to further investigate if are there other conditions in which it can happen. #16-2017-09-08 11:01 AM - Giovanni Manghi - Status changed from Feedback to Open #17-2017-09-08 10:17 PM - Alessandro Pasotti - Status changed from Open to In Progress Now I'm able to reproduce it consistently in master. I'm looking for a more complex yet robust solution. #18-2017-09-11 08:40 AM - Alessandro Pasotti - Status changed from In Progress to Feedback - Pull Request or Patch supplied changed from No to Yes This PR https://github.com/qgis/qgis/pull/5164 should definitely fix the issue (and bring better performances too) #19-2017-09-12 05:20 PM - Anonymous - Status changed from Feedback to Closed - % Done changed from 0 to 100 Applied in changeset commit:qgis 1d4c6061a8a5512092041aafea14a8a32247d046. Files 5/6

settings.png 264 KB 2017-08-22 Richard Duivenvoorde qgis218terminal.png 715 KB 2017-08-22 Richard Duivenvoorde 6/6