I will fix this warning on widgets startup, it can be ignored. The problem with segfault seems to appear when there is no dive site specified but picture has some gps coordinates (it's strange that no one noticed it before, it's an old issue). Here is the patch. I checked it with hand made exif data. Please, see if it helps, there can be more wild pointers in the neighborhood.
2015-03-16 19:11 GMT+01:00 Willem Ferguson <[email protected]>: > On 16/03/2015 19:11, Pedro Neves wrote: > > Hi all: > > > Also, after I download a dive from my dive computer (Uwatec Tec 2G), I'm > trying to insert the information for the dive site. I write the name of the > site and press manage. > On the divesite dialog, all fields are empty. I insert the information (name > and coordinates) When I press "Apply changes". > I get back to the notes tab. The location field has the name of my dive > site (in yellow). I press "Apply changes" changes, but the divesite doesn't > show up on the map, and if I select another dive, the location I've just > inserted disapears. > > The same happens if I try all this with a new logbook. > > > I'm using Debian/Sid... > > Cheers: > > Pedro > > See # 854 > willem > > > _______________________________________________ > subsurface mailing list > [email protected] > http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface >
From f32f5788da93102e697c50c28d4d5257da8734ec Mon Sep 17 00:00:00 2001 From: Jan Darowski <[email protected]> Date: Mon, 16 Mar 2015 19:48:55 +0100 Subject: [PATCH] Fixed dive_set_geodata_from_picture segfault. Segfault did appear when picture had some gps coordinates but there was no dive site assigned to the dive. Signed-off-by: Jan Darowski <[email protected]> --- dive.c | 2 +- scripts/build.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dive.c b/dive.c index afa38e4..ce682bc 100644 --- a/dive.c +++ b/dive.c @@ -2951,7 +2951,7 @@ unsigned int dive_get_picture_count(struct dive *d) void dive_set_geodata_from_picture(struct dive *d, struct picture *pic) { struct dive_site *ds = get_dive_site_by_uuid(d->dive_site_uuid); - if (!dive_site_has_gps_location(ds) && (pic->latitude.udeg || pic->longitude.udeg)) { + if (ds && !dive_site_has_gps_location(ds) && (pic->latitude.udeg || pic->longitude.udeg)) { ds->latitude = pic->latitude; ds->longitude = pic->longitude; } diff --git a/scripts/build.sh b/scripts/build.sh index 9ea0f4f..b7e7c11 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -24,9 +24,9 @@ qmake -v | grep "version 5" > /dev/null 2>&1 if [[ $? -eq 0 ]] ; then QMAKE=qmake else - qmake-qt5 -v | grep "version 5" > /dev/null 2>&1 + qmake -qt5 -v | grep "version 5" > /dev/null 2>&1 if [[ $? -eq 0 ]] ; then - QMAKE=qmake-qt5 + QMAKE=qmake -qt5 else echo "can't find a working qmake for Qt5" exit 1 @@ -97,6 +97,6 @@ make -j4 make install cd $SRC/subsurface -$QMAKE CONFIG+=setRpath LIBDCDEVEL=1 LIBMARBLEDEVEL=$SRC/install SPECIAL_MARBLE_PREFIX=1 LIBGIT2DEVEL=$SRC/libgit2 subsurface.pro +qmake -qt5 CONFIG+=setRpath LIBDCDEVEL=1 LIBMARBLEDEVEL=$SRC/install SPECIAL_MARBLE_PREFIX=1 LIBGIT2DEVEL=$SRC/libgit2 subsurface.pro make -j4 -- 2.2.2
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
