Caching problems with osgearth using osgQt
elbarto1980 opened this issue · 5 comments
Hi,
I am having a problem using cache in an project that uses osgQt (I am using OpenSceneGraph-3.6.5 and osgearth-2.10.1 on Ubuntu 18.04).
I noticed it while I was coding my program but then I saw that the same error messages are displayed by osgviewerQt as well.
I am using a demo.earth file that loads local geotiff files stacked in a composite image and, above that, I placed the following cache configuration:
If I run "osgviewer demo.earth", the globe is shown without any error messages but if I run "osgviewerQt demo.earth", it prints some error messages.
Moreover, if I run osgviewerQt with an empty cache folder, no messages are printed but when I run osgviewerQt again, the error messages are printed and I am not sure if the viewer is loading images from the cache folder or from the specified files. The messages disappear if I remove the cache section from the earth file.
The error messages are the following:
[osgEarth]* JSON decoding error: * Line 1, Column 67
Missing '}' or object member name
[osgEarth]* [TerrainLayer] Layer "image" Metadata appears to be corrupt.
[osgEarth]* JSON decoding error: * Line 1, Column 67
Missing '}' or object member name
[osgEarth]* [TerrainLayer] Layer "Elevation2" Metadata appears to be corrupt.
[osgEarth]* JSON decoding error: * Line 1, Column 67
Missing '}' or object member name
[osgEarth]* [TerrainLayer] Layer "Elevation1" Metadata appears to be corrupt.
[osgEarth]* JSON decoding error: * Line 1, Column 67
Missing '}' or object member name
[osgEarth]* [TerrainLayer] Layer "world-tiff" Metadata appears to be corrupt.
[osgEarth]* JSON decoding error: * Line 1, Column 67
Missing '}' or object member name
[osgEarth]* [TerrainLayer] Layer "SermonetaWide" Metadata appears to be corrupt.
[osgEarth]* JSON decoding error: * Line 1, Column 67
Missing '}' or object member name
The first error messages are printed as soon as I run the program, the following appear when I zoom on the map.
I have already asked to Glenn Waldron (osgEarth) and Robert Osfield about this messages but, since osgviewer is working fine, they don't really know how to help me.
So, maybe it's better if I ask directly to osgQt author.
I'd really appreciate your help. Thank you,
Emanuele
Hello @elbarto1980,
This looks like an issue in osgEarth, have you tried them? By your log output, it looks like osgEarth is found but that the cache has issues. Did you look into those metadata files ?
The only main difference between osgviewer and osgviewerQt is the fact that Qt forces us to have a single threaded openGL pipeline...
Hello @elbarto1980,
This looks like an issue in osgEarth, have you tried them? By your log output, it looks like osgEarth is found but that the cache has issues. Did you look into those metadata files ?
Hello, thank you for your reply.
Sure, as I said, I contacted Glenn Waldron at first. I sent him both my log files and code (it was before I found out that osgviewerQt returns the same messages).
Glenn told me:
I do not have a Qt installation so I will not be able to build your code.
However if the problems occur only in the context of Qt, you might start investigating possible threading issues. Just a guess. Sorry I can't be of more help!
As far as I know, the metadata are encoded in some unknown binary format.
Hi,
I know very well what a JSON file is and, since I know what a JSON file is, I can tell you that there are absolutely no JSON files in the cache folder, only .osgb files.
Anyway, I just wanted to warn you about this issue. For now, I will disable the cache.
Thank you.