Re: [Viking-devel] Segmentation fault with git HEAD
Hi, Sorry, most of the technical stuff referred to is above my head, but I may be able to help with an explanation of why the technical people put a loop in. At one point, when the age limit for a tile was reached, and the programme was started, it immediately deleted the old tile(s) before it tried to download the new. No issue most of the time, but if for instance you downloaded tiles before going on a holiday so you could use viking whilst away but without internet, you could find after a week or so that all of your map tiles had deleted! Thanks for your work on this. Nick On 03/08/14 12:12, Mike wrote: Rob, Thanks for diving in this, also been on holiday. I agree with your understanding: There are two data structures in the mapcache: 1. An actual hash containing keys against map tiles - this makes sense. 2. A circular linked list queue (using own implementation - I don't think there is a glib support for ringbuffers) I don't understand the point of the second one. The queue seems to be equivalent of the hash cache and used just to compare the keys stored in deciding which ones can be removed. After further thought, I now believe the second data structure has use of a LIFO queue, so that when the maximum cache size is reached it removes the oldest tiles (in terms of being added to the map cache). I still not get though why some kind of circular list was used, that only complicates things. If the need indeed is to remove the oldest tiles a singly-linked list (g_slist) should suffice and make things clearer. I have committed a basic fix for this which checks tmp before trying to use it. I did a git pull and tried to compile things but got an compile error: $ gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DVIKING_DATADIR=\/usr/local/share/viking\ -DVIKING_SYSCONFDIR=\/usr/local/etc/viking\ -Wall -g -D_GNU_SOURCE -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT mapcache.o -MD -MP -MF $depbase.Tpo -c -o mapcache.o mapcache.c \ mv -f $depbase.Tpo $depbase.Po mapcache.c: In function ‘a_mapcache_init’: mapcache.c:67:3: warning: ‘g_mutex_new’ is deprecated (declared at /usr/include/glib-2.0/glib/deprecated/gthread.h:272) [-Wdeprecated-declarations] mc_mutex = g_mutex_new(); ^ mapcache.c: In function ‘cache_add’: mapcache.c:73:8: error: void value not ignored as it ought to be if ( g_hash_table_insert ( cache, key, pixbuf ) ) { ^ make[3]: *** [mapcache.o] Error 1 $ /lib/libc.so.6 GNU C Library (GNU libc) stable release version 2.18 (git ), by Roland McGrath et al. Indeed, at least some glib versions, https://developer.gnome.org/glib/2.26/glib-Hash-Tables.html#g-hash-table-insert, return void for g_hash_table_insert, so did a cache_remove as first step op the cache_add. While doing so I saw this g_hash_table_insert problem, https://bugzilla.gnome.org/show_bug.cgi?id=692815, could it be related to the root cause of problems? However since the map cache is 'working' well enough, I'm concentrating on adding other features. Sure, let me see how stable it is for me and if not, try to come up with a patch. Mike. --- From: rw_nor...@hotmail.com To: viking-devel@lists.sourceforge.net Date: Sun, 13 Jul 2014 12:16:51 +0100 Subject: Re: [Viking-devel] Segmentation fault with git HEAD Date: Sun, 22 Jun 2014 13:35:49 +0200 From: em...@gmx.net To: viking-devel@lists.sourceforge.net Subject: [Viking-devel] Segmentation fault with git HEAD Not sure if the intention is that the Viking git master branch is always clean but I did try it anyhow. I compiled the code based on git index 4200b261[*] and see that I can easily trigger a Segmentation fault: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x9f851b40 (LWP 6998)] 0x080b41b6 in a_mapcache_remove_all_shrinkfactors (x=x@entry=1051, y=y@entry=675, z=0, type=13, zoom=zoom@entry=6) at mapcache.c:187 187 if ( strncmp(tmp-key, key, len) == 0 ) We've traced this due to the variable tmp being NULL, thus trying to perform tmp-key results in the crash. Further I don't understand the circumstances that leads to this condition, however it has caused me to look at the code in mapcache in general. I have committed a basic fix for this which checks tmp before trying to use it. There are two data structures in the mapcache: 1. An actual hash containing keys against map tiles - this makes sense. 2. A circular linked list queue (using own implementation - I don't think there is a glib support for ringbuffers) I don't understand the point of the second one. The queue seems to be equivalent of the hash cache and used just to compare the keys stored in deciding
Re: [Viking-devel] License dialog (Was: Viking 1.5 Plan to Release by Sept 6th)
Hi, A couple of thoughts on this; The OSM front page with the map merely has an attribution at the bottom right of the screen in exactly the same way as Viking does after the OSM Mapnik map has been loaded. You are not required to acknowlege the attribution before you zoom or search on the site. OSM itself has data derived from other sources, and it acknowledges this by having a page on its wiki which you have to search for; http://wiki.openstreetmap.org/wiki/Contributors My conclusion is, the suggestion of having something that does not interrupt the flow i.e. Perhaps can we keep an in-the-flow dialog, but storing the choice on disk in order to avoid answering the same question again and again. by Guilhem is an excellent one, as is an 'about' page where you can click on the link if you wish to. As you can maps from alternative sources, I don't know if you need to consider this before making a decision? - could get a little complicated! Perhaps a general statement somewhere to the affect that users should only use the maps in accord to the individual owner / suppliers licence. I use OSM data on my Garmin on my Android phone (Osmand for navigation, and NeonGeo or C:Geo for geocaching), and no other source reminds me every time that I load it that there is a licence which I have to acknowledge, so it may be time to move on. My Garmin satnav using Garmin mapping just loads works. Licence / License - I think it depends where in the world you are - From Wikipedia - The verb *license* or *grant license* means to give permission. The noun *license* (American English http://en.wikipedia.org/wiki/American_and_British_English_spelling_differences) or *licence* (British English http://en.wikipedia.org/wiki/American_and_British_English_spelling_differences,^[1] http://en.wikipedia.org/wiki/License#cite_note-1 Indian English http://en.wikipedia.org/wiki/Indian_English,^[2] http://en.wikipedia.org/wiki/License#cite_note-2 Canadian English http://en.wikipedia.org/wiki/Canadian_English,^[3] http://en.wikipedia.org/wiki/License#cite_note-3 Australian English http://en.wikipedia.org/wiki/Australian_English,^[4] http://en.wikipedia.org/wiki/License#cite_note-4 New Zealand English http://en.wikipedia.org/wiki/New_Zealand_English,^[5] http://en.wikipedia.org/wiki/License#cite_note-5 South African English http://en.wikipedia.org/wiki/South_African_English^[6] http://en.wikipedia.org/wiki/License#cite_note-6 ) refers to that permission as well as to the document recording that permission. Personally I seem to have been spelling it both/either way for years didn't realise there was a difference until you mentioned it. Regards Nick (Tallguy) On 13/09/13 11:30, Guilhem Bonnefille wrote: Hi, 2013/9/13 Robert Norris rw_nor...@hotmail.com mailto:rw_nor...@hotmail.com Well, I'm nearing completion for 1.5 - which will now be after this coming weekend - to give anyone a chance to use the latest source. There is one last item I would appreciate feedback on (with this patch attached) - this hasn't be applied to the code repository yet... Originally I noticed I had spelt license 'wrong' - I had used licence''. So I was just going to align the spelling, but then it got me thinking: Why do we introduce the About this License dialog, every time one adds a map? No other software as far as I know generates such a warning with an interruption to one's work flow. So instead I just shifted it to be an 'About' menu action from the map layer. Thus this license information is always available, which it wasn't before. I introduced this About this license dialog. Originally, I do so because it seems really really important to ensure user is informed about the license related to data he works with. I don't know how other similar tools treat such topic. I just know that some other tools working with license (like Eclipse when you install plugins) insert a dialog where the user must accept or decline license, even open-source related licenses. It is good to have such info in a About menu, but this cannot be the only solution as it is less informative: a not skilled user won't open such dialog to discover subtilities of map's license, IMHO. Perhaps can we keep an in-the-flow dialog, but storing the choice on disk in order to avoid answering the same question again and again. -- Guilhem BONNEFILLE -=- JID: gu...@im.apinc.org mailto:gu...@im.apinc.org MSN: guilhem_bonnefi...@hotmail.com mailto:guilhem_bonnefi...@hotmail.com -=- mailto:guilhem.bonnefi...@gmail.com mailto:guilhem.bonnefi...@gmail.com -=- http://nathguil.free.fr/ -- How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch
Re: [Viking-devel] skip-same patch
Rob, Sorry if I've wasted anyones time looking into what appeared initially to be a viking problem. Having experimented a little more I now know that viking is not responsible for my laptop crashing - it has now crashed several times using other programmes only, and it's problems don't seem to be related to the 'load'. The screen does not dim when it crashes. The screen remains showing whatever I was working on, the keyboard mouse become unresponsive - it does not recover from this no matter how long it is left. Not a viking problem. In terms of the screen dimming when loading a number of tracks at once, this is only a minor problem for me as the laptop always recovers (except sometimes in my case when using the defective laptop!). Regards Nick On 13/01/12 02:39, Robert Norris wrote: All my tracks, hiking, car cycle, are 1 second interval, I frequently deal with multiple tracks created during the course of a days cycling or walking. The majority of my tracks are created by a Garmin Oregon 300. When I load the tracks (generally using file / append) my laptop screen dims everything freezes for several seconds, but always recovers. If there After loading each individual gpx file, Viking generates a redraw at the view to see all of that gpx. This means if there's a map layer present it will load/download tiles for that view too (reading lots map tiles from disk times a little time) At present it's not clever enough to only do the redraw when the last gpx is opened. This should be simple to generate the code improvement. are several tracks with many waypoints the programme may become slower ^^ Using many waypoints* will slow Viking down as it's written using the traditional (i.e. slow Gdk API graphics functions)**. But there is a workaround by adjusting the TrackWaypoint Layer Properties, Waypoints tab: 1. Turn off 'Draw Labels' - This seems to make the biggest difference as drawing text to the viewport is slow (especially when panning the screen around) 2. Turn off 'Draw Waypoint Symbols'*** * Interestingly only just discovered this - helped by using some 1000 Waypoint gpxs. I use Viking with massive tracklogs, so I don't really notice this issue. Behaviour is worse on my laptop then the desktop, presumably since the laptop is of a lower spec. ** Rewriting Viking to use cairo / champlain for the main view is a possibility but don't hold your breath for this little volunteer project. *** There might be a way for this to scale up better, however the main slow down is in point 1, so IMHO there's not much incentive to attempt to address this. but still functions. However, I need to save the file at an early stage, and then keep saving at regular intervals as I edit the tracks, combining them, removing duplicates, and uploading them to OSM etc. If I don't regularly save the whole laptop will freeze and not recover, necessitating holding the power button for a few seconds to switch it off, and then starting again. I don't have evidence of this, but creating a track/route seems to use even more resources, so my laptop may crash more often - again frequent saving stops this. The whole laptop freezing seems a symptom of allocation vast amounts of memory and the system locks up. Eventually the OOM Killer may kick in a removes a lucky program. I don't think there are any severe memory leaks or memory allocations in Viking (other then DEMs) The only cause I know of in Viking is opening *lots* of DEMs (i.e. over 50 or more). Redrawing with DEMs is also very slow as they recalculate every point on display. For using DEMs (this is how I do it:), is to load them in for your area - my machine copes with coverage of the UK for example *but keep the layer invisible*. Since you probably have OSM tiles for map view anyway, the DEMs don't need to be visible but they'll still be used the other DEM functionality: the cursor height readout, track creation and track property elevation display. It may be that a feature that regularly saves to disk at 2 minute intervals would alleviate this? This maybe something to add. I hasten to add, this is not a complaint - you asked, so I'm answering. I'm a long term fan of viking recommend it to friends. I also think that Ubuntu may be partially to blame here, as the performance of the laptops seems to have reduced over the last 2 versions of Ubuntu. It's difficult for me to say if other programmes can cause similar effects, but I do know that 'Evolution' the PIM programme is resource heavy and can slow my system causing similar problems. I think the problems partially depend on the other programmes running - Thunderbird causes less problems than Evolution, Chromium causes less problems than Firefox. I'm glad you're a fan. My computer is a laptop, Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz with
Re: [Viking-devel] skip-same patch
Greg, All my tracks, hiking, car cycle, are 1 second interval, I frequently deal with multiple tracks created during the course of a days cycling or walking. The majority of my tracks are created by a Garmin Oregon 300. When I load the tracks (generally using file / append) my laptop screen dims everything freezes for several seconds, but always recovers. If there are several tracks with many waypoints the programme may become slower but still functions. However, I need to save the file at an early stage, and then keep saving at regular intervals as I edit the tracks, combining them, removing duplicates, and uploading them to OSM etc. If I don't regularly save the whole laptop will freeze and not recover, necessitating holding the power button for a few seconds to switch it off, and then starting again. I don't have evidence of this, but creating a track/route seems to use even more resources, so my laptop may crash more often - again frequent saving stops this. It may be that a feature that regularly saves to disk at 2 minute intervals would alleviate this? I hasten to add, this is not a complaint - you asked, so I'm answering. I'm a long term fan of viking recommend it to friends. I also think that Ubuntu may be partially to blame here, as the performance of the laptops seems to have reduced over the last 2 versions of Ubuntu. It's difficult for me to say if other programmes can cause similar effects, but I do know that 'Evolution' the PIM programme is resource heavy and can slow my system causing similar problems. I think the problems partially depend on the other programmes running - Thunderbird causes less problems than Evolution, Chromium causes less problems than Firefox. My computer is a laptop, Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz with 4GB of ram, running Ubuntu 11.10 (can also boot into windows 7, where there is a version of Viking as well, but I rarely do this don't know if a similar problem exists). My laptop currently uses Viking 1.2.1 from the ubuntu repository, but I have used other versions loaded from git with the same results. I also make use of other laptops of various specs. other versions of viking with similar results. I'm quite happy to try different versions, but you may have to keep the instructions simple as I'm definitely a user as opposed to a programmer! Thanks for your work on Viking. Regards Nick (OSM = Tallguy)On 09/01/12 00:47, Greg Troxel wrote: It looks like someone (Rob?) has integrated my skip_same patch to only draw points if they are different from the previous - thanks! I am curious what people think of the drawing speed, especially those who routinely take 1s tracklogs when hiking. -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox ___ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/ -- Regards Nick -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox___ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/
[Viking-devel] 'Open Recent File'
Hi, I'm using viking 1.2.1 from the Ubuntu repository (thanks to whoever got the version updated for Ubuntu). When opening viking, under 'File menu' there is an option to select a recently used file. However, whichever one in the list I click on (with mouse), viking always loads the top one in the list. Keep up the good work, it is appreciated. Regards Nick (OSM = Tallguy) -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev ___ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/
Re: [Viking-devel] tile age 30s ???
Hi, As a 'user' as opposed to a developer, this would get my vote would save me firing up the calculator! ' I've just found the Tile usage policy of OSM. They request downloaders use HTTP Expiry Header or 1 week age per default. We have to change the value in Viking's code. http://wiki.openstreetmap.org/wiki/Tile_usage_policy OK, so in order to be good OSM citizens change the units to days (I don't see why not) set the default value to 7 (days) (definitely) only allow 7 and up for a config (probably) people who want to reload things can use 'reload all onscreen tiles' Regards Nick -- vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 ___ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/
[Viking-devel] OSM NoName
Hi, Most of my use of Viking is to do with surveying updating on OSM. It would really make this a lot easier if one of the map layers available to me was 'OSM NoName'. I'm afraid I don't know enough to do any 'coding' for this, and in fact will have to wait for an update on Ubuntu before I can benefit from any changes that are made, unless someone can point me towards an idiots guide to how to update Viking to the latest version. Even if this can't be done, quick vote of thanks for the work so far - using Viking has made my OSM editing a lot easier also helps me to actually use the mapping information. Thanks again Nick -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/