Bug report #16507

Navigation problem with a VRT

Added by Thomas Ailhaud over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:High
Assignee:Even Rouault
Category:Rasters
Affected QGIS version:2.18.7 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:24413

Description

Since version QGIS 2.18.5 it is impossible for me to use a simple project with a VRT.
I tested the generated with the new version but without success.

By zooming and zooming I have a black or red , blue, green background and so I have not my orthophoto.
This problem is repeated 2 - 3 times then QGIS crach.

Attached a screenshot of my problem + Several backtrace with all the quoted problems but my raster does 6 Go.

I also give you the link to a minidump that he makes to me sometimes.
[[https://drive.google.com/file/d/0B0iAhiILJdOXVFV2WF9kSzgxX0k/view?usp=sharing]]

2017-05-02 09_37_23-QGIS 2.18.7.png - a red background (311 KB) Thomas Ailhaud, 2017-05-03 09:24 AM

GOSA-SIG11 - 3.LOG Magnifier - one open QGIS and one bug (1.67 KB) Thomas Ailhaud, 2017-05-03 09:26 AM

GOSA-SIG11-2.LOG Magnifier - two open QGIS and two bug (113 KB) Thomas Ailhaud, 2017-05-03 09:26 AM

vrt.jpg (264 KB) Thomas Ailhaud, 2017-05-03 01:16 PM

2017-05-03 18_01_26-QGIS 2.18.7.png - number of raster divide in two (357 KB) Thomas Ailhaud, 2017-05-03 06:02 PM

GOSA-SIG114.LOG Magnifier (111 KB) Thomas Ailhaud, 2017-05-04 11:45 AM

History

#1 Updated by Giovanni Manghi over 3 years ago

  • Priority changed from Normal to High
  • Category changed from Data Provider to Rasters
  • Status changed from Open to Feedback

Can you detail here how do you created the vrt?
It is enough to create the VRT and load it without any other layers? are the inputs rasters rgb?

#2 Updated by Thomas Ailhaud over 3 years ago

I created VRT with raster/miscellaneous/Build Virtual Raster (catalog) tools

I'm created a new project, add a raster VRT layers and don't touch raster rgb

Actually i work in QGIS 2.18.4 and i have not this bug.

#3 Updated by Giovanni Manghi over 3 years ago

Thomas Ailhaud wrote:

I created VRT with raster/miscellaneous/Build Virtual Raster (catalog) tools

I'm created a new project, add a raster VRT layers and don't touch raster rgb

Actually i work in QGIS 2.18.4 and i have not this bug.

I see your input files are in JP2 format, what about if you translate them to GeoTiff and create the VRT with them?

#4 Updated by Thomas Ailhaud over 3 years ago

I have change my jp2 to Geotiff

And this probleme of background is resolved but appicatiion of qgis crach after 2 - 3 navigation.

link of a minidump that he makes to me - [[https://drive.google.com/file/d/0B0iAhiILJdOXeDMxQUNpbnpWUjg/view?usp=sharing]]

#5 Updated by Giovanni Manghi over 3 years ago

Thomas Ailhaud wrote:

I have change my jp2 to Geotiff

And this probleme of background is resolved but appicatiion of qgis crach after 2 - 3 navigation.

link of a minidump that he makes to me - [[https://drive.google.com/file/d/0B0iAhiILJdOXeDMxQUNpbnpWUjg/view?usp=sharing]]

does it make any difference the number of rasters (geotiffs) you put in the VRT? still crashes with considerably less rasters?
does it crashes if you use a clean environment (try backup and remove the .qgis2 folder, then restart qgis)?
Can you share one of your JP2 files?

#6 Updated by Thomas Ailhaud over 3 years ago

I put 312 jp2 and 309 tiff in VRT. I tried to create a new VRT with half number of raster and i have the same first problem (attached a screenshot).

I don't clean my environment, i try tomorrow (04/05/2017).

link of jp2 [[https://drive.google.com/file/d/0B0iAhiILJdOXZWxKWU5ZSVVFaUk/view?usp=sharing]]

#7 Updated by Giovanni Manghi over 3 years ago

Thomas Ailhaud wrote:

I put 312 jp2 and 309 tiff in VRT. I tried to create a new VRT with half number of raster and i have the same first problem (attached a screenshot).

what about the crashes, no change with the tiffs?

I don't clean my environment, i try tomorrow (04/05/2017).

thanks

#8 Updated by Thomas Ailhaud over 3 years ago

I tried a new VRT with half number of Geotiff and i have the same first problem.

I tried clean my environment and i have the same problem with VRT Geotiff, VRT JP2, VRT half Geotiff and VRT half JP2.

attached a backtrace of 2 last VRT half.

#9 Updated by Giovanni Manghi over 3 years ago

  • Operating System deleted (Windows 7 Pro SP1)

Thomas Ailhaud wrote:

I tried a new VRT with half number of Geotiff and i have the same first problem.

I tried clean my environment and i have the same problem with VRT Geotiff, VRT JP2, VRT half Geotiff and VRT half JP2.

attached a backtrace of 2 last VRT half.

I tries build a VRT file with just one file (the one you provided above) and also seen the color problems when zooming at certain scales.
Then I opened the VRT with a text editor and replaced the values (it was 1024) for BlockXSize and BlockYSize and set it to a smaller value (128), then saved and reloaded the VRT > no more problems.

Can you please give it a try? Thanks.

#10 Updated by Thomas Ailhaud over 3 years ago

I have try your solution with VRT overall and one file.
And replaced the values BlockXSize and BlockYSize and don't change my problem.

#11 Updated by Giovanni Manghi over 3 years ago

  • Status changed from Feedback to Open

Thomas Ailhaud wrote:

I have try your solution with VRT overall and one file.
And replaced the values BlockXSize and BlockYSize and don't change my problem.

ok. Can you confirm that this was not an issue in previous QGIS releases? if yes any chance you are able to pin point when the regression happened?

#12 Updated by Thomas Ailhaud over 3 years ago

Yes you confirme in QGIS 2.18.4, i don't have a problem. and in QGIS 2.18.5 i have this problem.

#13 Updated by Simon MOREL over 3 years ago

I've got the same issue with vrt files with jp2 files and QGIS 2.18.5. Every fast zoom causes a crash.

#14 Updated by Thomas Ailhaud over 3 years ago

I have download the last version 2.18.9.

The bug is still there.

#15 Updated by Giovanni Manghi over 3 years ago

  • Status changed from Open to Feedback

Thomas Ailhaud wrote:

I have download the last version 2.18.9.

The bug is still there.

of course, no one touched the part of the code eventually involved. Also here would be necessary to test of by chance the problem is elsewhere, for example... do the version of QGIS where this VRT are OK and the one where are not Ok share the SAME version of GDAL/OGR and the SAME version of the libjpg (not sure is this exactly the name) library?

#16 Updated by Damien Smith over 3 years ago

I also have this issue since 2.18.5 using JPEG-compressed YCbCr GeoTiffs. A workaround is to load all of the individual image tiles into a project group but then the project is very slow to open as it scans the header of every single tile to find the extents.

#17 Updated by Giovanni Manghi over 3 years ago

Damien Smith wrote:

I also have this issue since 2.18.5 using JPEG-compressed YCbCr GeoTiffs. A workaround is to load all of the individual image tiles into a project group but then the project is very slow to open as it scans the header of every single tile to find the extents.

could this be an issue in GDAL (or a library used by it to read JPGs) rather than QGIS itself?

#18 Updated by Thomas Ailhaud over 3 years ago

Giovanni Manghi wrote:

Thomas Ailhaud wrote:

I have download the last version 2.18.9.

The bug is still there.

of course, no one touched the part of the code eventually involved. Also here would be necessary to test of by chance the problem is elsewhere, for example... do the version of QGIS where this VRT are OK and the one where are not Ok share the SAME version of GDAL/OGR and the SAME version of the libjpg (not sure is this exactly the name) library?

- VERSION OK
QGIS VERSION : 2.18.4
COMPILED AQAIN GDAL/OGR : 2.1.3
LIJPEG i haven't a version but i have conpare a modification date libjpeg12.lst.gz and libjpeg12.lst.gz: 2017/02/25

- VERSION NOT OK
QGIS VERSION / 2.18.9
COMPILED AQAIN GDAL/OGR : 2.2.0
LIJPEG i haven't a version dut i have conpare a modification date of libjpeg12.lst.gz and libjpeg12.lst.gz : 2017/05/27
And i have a new modification date file in QGIS2.18/LIB/ : libcurl.exp, libcurl.lib, libcurl.pdb, gdal_i.lib, netcdf.lib, libnetcdf.settings and sqlite3_i.lib : 2017/05/25

Do you have a methode for using qgis2.18.9 and the same version of gdal/ogr ?

#19 Updated by Giovanni Manghi over 3 years ago

Do you have a methode for using qgis2.18.9 and the same version of gdal/ogr ?

yes, compiling both gdal and qgis probably, something that at the moment I don't have time to do (to check for this problem).
You should inquiry also the GDAL community, I feel that the problem comes from there.

#20 Updated by Thomas Ailhaud over 3 years ago

BUT FIRST VERSION NOT OK
QGIS VERSION / 2.18.5
COMPILED AQAIN GDAL/OGR : 2.1.3
LIJPEG i haven't a version dut i have conpare a modification date of libjpeg12.lst.gz and libjpeg12.lst.gz : 2017/03/25

And i have test exchange folder of QGIS2.18/etc/setup and this bug.

#21 Updated by Even Rouault over 3 years ago

I can reproduce under Linux too. I strongly believe this is linked to use of a VRT from several threads which is know to be a problem. Luckily there's a workaround by defining the VRT_SHARED_SOURCE=NO configuration option/environment variable. QGIS should probably define it automatically (although performance will probably be a bit affected). Before committing this change, may I ask to Thomas or anyone reproducing it to define VRT_SHARED_SOURCE=NO as an environment variable in their session (https://www.computerhope.com/issues/ch000549.htm), log out, log in and retry ?

(that said the issue should affect also older GDAL versions)

#22 Updated by Thomas Ailhaud over 3 years ago

I have create a new environment variable and i am trying on tow pc and i have no bug.

For me the problem is solved.

And thanks for your help

#23 Updated by Even Rouault over 3 years ago

  • Assignee set to Even Rouault
  • Status changed from Feedback to Closed
  • Resolution set to fixed/implemented

Also available in: Atom PDF