Segmentation fault on planner abort

Tomaz Canabrava tcanabrava at kde.org
Tue Jun 3 05:14:25 PDT 2014


Didn't got a crash on the planner, but on the picture handling.
can you apply this patch and see if it fixes?

diff --git a/dive.c b/dive.c
index 065d455..14910eb 100644
--- a/dive.c
+++ b/dive.c
@@ -2284,6 +2284,9 @@ void dive_add_picture(struct dive *d, struct
picture *picture)

 unsigned int dive_get_picture_count(struct dive *d)
 {
+       if (!d)
+               return 0;
+
        unsigned int i = 0;
        FOR_EACH_PICTURE( d )
                i++;


if it doesn't fix, please run subsurface with gdb and send me the backtrace.


On Tue, Jun 3, 2014 at 8:48 AM, Rick Walsh <rickmwalsh at gmail.com> wrote:
> On 3 June 2014 23:17, Rick Walsh <rickmwalsh at gmail.com> wrote:
>> With the latest changes, subsurface is now crashing when aborting a dive plan.
>>
>> Easily reproduced. Simply choose abort, and confirm you wish to
>> discard the plan.
>>
>> When running in very verbose (-vv) mode, I get the following terminal output.
>>
>> Unable to match dive 'program.divelog' (subsurface)
>> Unable to match dive 'version.divelog' (2)
>> Unable to match divecomputerid 'state.autogroup.' (1)
>> Segmentation fault
>>
>> My system:
>> [rick at localhost testing]$ uname -a
>> Linux localhost.localdomain 3.14.4-200.fc20.x86_64 #1 SMP Tue May 13
>> 13:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>>
>> [rick at localhost testing]$ subsurface --version
>> Subsurface v4.1-242-gb249370ffec7, built with libdivecomputer
>> v0.5.0-devel (20c874b2671c086ba9cf7e43c381f643c517b6bd)
>
> I also get a segmentation fault when hitting save after editing any
> dive. I'm guessing it's related somehow.
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface


More information about the subsurface mailing list