-
Notifications
You must be signed in to change notification settings - Fork 79
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
Lots of "Warning: Unknown type" #1499
Comments
I did check this before. AFAIR this is an initialisation order problem in the qt-client lib. I'll have to check again. @Karry, any input? |
Well, qt client library is using "empty" database to allow to render base map and overlays even in case that application is started without offline databases. As a side effect when this "empty" database is initialized, it prints these warnings... |
Would it be possible to detect that the database is empty (does not have types?) and skip loading the style sheet? Or would this result in further "complication"? |
Hmm, the empty database still has 9 types - we always register some internal types even if there is no data... |
We may improve logging:
|
It'd be an improvement, but I get like a hundred of these, so the single line would be probably very long. Also, would it be possible to make all libosmscout logs print through its logger mechanism? I think these warnings are printed directly through std::cerr, which is why I can't disable them. |
Would it work to do not load the style sheet if the database is empty. This would IMHO be the best option. |
This is incorrect. They aren't printed through std::cerr. Sorry. |
It is not possible. It is necessary to have have stylesheet even with this empty database - when you want to render basemap, you need to know which color ocean have, when you want to render waypoint, you need to know what symbol to use... I tried to pass "do not log warnings" argument while loading stylesheet, but resulted patch was pretty nasty. Instead, I am considering to allow hierarchy of loggers (with different log level) and not using global log singleton in some places... But define logger instance explicitly in some cases. That way, it would be possible to hide warnings when loading stylesheet for empty database... |
It seems I don't have this issue in my app, for the basemap I'm using a very stripped down world.oss stylesheet :
|
This looks like a good solution. |
@syyyr : Should now be fixed. Please check and close the issue (if fixed). |
Thank you. I am on vacation right now, I'll look into it on the 16th. |
Hi, I have checked out the fix and it seems like I still get the warnings when I run the QtWidgetsDemoApp demo.
|
I have tested again with the demo app and I get this behavior:
|
It is strange. When I try widget demo, I have almost none of these warning (just one about srtm_tile type). Can you try to put breakpoint to the line where this warning is printed and run it in debugger, to see what database is causing that? ...and just out of curiosity, what is in your "world" database? How did you prepared it? |
Maybe it is caused by a database imported by an earlier version of the database? I have reimported all of my databases and the problem seems to be gone.
It's the planet osm file filtered to contain just By the way, thank you for all your help with my other issues. I was successful in the map widget implementation in our app. Díky :) |
Hi, when I start up my app, I get a lot of these warnings:
What do these mean? How do fix them (or disable them, since my map works fine)?
The text was updated successfully, but these errors were encountered: