[PATCH] Only free memory for three levels of taxonomy

2015-07-13 Thread Rick Walsh
We only use three levels of taxonomy, but we were attempting to free memory for seven. This led to some fun invalid point crashes. Please check I'm not way off the mark, but it definitely appears to fix the crashes I was getting. Cheers, Rick From 74eaf6509c08bbf08fbb8cbae1fe3de97dca1ce6 Mon

Re: [PATCH] Only free memory for three levels of taxonomy

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 10:40:53PM +1000, Rick Walsh wrote: We only use three levels of taxonomy, but we were attempting to free memory for seven. This led to some fun invalid point crashes. Please check I'm not way off the mark, but it definitely appears to fix the crashes I was getting.

GSoC Status Update - Android Port (Week 7)

2015-07-13 Thread Grace Karanja
Hi all, Last week, I continued my work on the dive profile. After numerous trials and some discussions with Tomaz, we settled on using a QQuickPaintedItem to render the profile to QML, I am still finishing on that, and we will have a PR ready this week. Dirk and Anton have also put a lot of

Re: GSoC Status - Week 7 (VPM-B)

2015-07-13 Thread Rick Walsh
Hi Jan, On 14 Jul 2015 6:53 am, Jan Darowski jan.darow...@gmail.com wrote: Hi! This week I wrote a Boyles law compensation and checked all the calculations to find the root of the differences of results against the original implementation. I found that there is a difference between the

Re: GPS positions with companion app

2015-07-13 Thread Salvador Cuñat
Good morning. The gps import has worked fine for me with last dives. ... processing gpsfix @ lun. 13 de jul. de 2015 9:34 which is withing six hours of dive from lun. 13 de jul. de 2015 10:01 until lun. 13 de jul. de 2015 10:52 look at the next gps fix @ lun. 13 de jul. de 2015 9:44 which is

Problem importing data from Scubapro Chromis,

2015-07-13 Thread Patrik Martinsson
Hi guys, I just got my diving computer 'Scubapro Chromis' and I'm trying to import my dives into Subsurface, however it always fails with the message Dive data import error. Same error shows up when I'm trying to save the libdivecomputer dump file. The libdivecomputer logfile looks like this

Re: different segfault with lastest master

2015-07-13 Thread Linus Torvalds
On Sat, Jul 11, 2015 at 4:39 PM, Linus Torvalds torva...@linux-foundation.org wrote: which is just the taxonomy.category writes. Looks like it writes past the end of the allocation. Ok, looking at this, the problem seems to be pretty clear. When the code does the taxonomy lookup in

Re: More Location Fixes.

2015-07-13 Thread Tomaz Canabrava
On Mon, Jul 13, 2015 at 4:14 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Mon, Jul 13, 2015 at 12:00 PM, Tomaz Canabrava tcanabr...@kde.org wrote: Just to be sure: If I have a dive with divesite Yellow House with gps coords then I write on it's dive site the name Leeds,

Re: different segfault with lastest master

2015-07-13 Thread Tomaz Canabrava
On Mon, Jul 13, 2015 at 3:46 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Sat, Jul 11, 2015 at 4:39 PM, Linus Torvalds torva...@linux-foundation.org wrote: which is just the taxonomy.category writes. Looks like it writes past the end of the allocation. Ok, looking at

GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Gehad Elrobey
Hello all, This week I was working on the following tasks: - Enhancing the one dive per page template. - Refactoring the Printing class to handle QPrinter and QPixmap. - Implement the Preview section in TemplateEdit dialog. - Adding color tab to TemplateEdit. - Adding color palettes to template

[PATCH] OSTCTools - Improve error management (II)

2015-07-13 Thread Salvador Cuñat
Have just found a .dive file in HW forum which is not correctly parsed by libdivecomputer due (I think) to a bug in OSTC3 FW 1.77 (corrected). If libdc fails to parse a file (whatever is the reason) and the header hasn't been parsed, strcmp(ptr-key, Serial) will segfault, so avoid comparison if

Re: More Location Fixes.

2015-07-13 Thread Tomaz Canabrava
Okay, This *seems* to be working, I tested it quite a lot to make sure I didn't broke anything very obvious: change the name of a dive site to something that already exists, it will use the first dive site with that name from the dive_site_table change the name of a dive site to something that

Re: More Location Fixes.

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 11:47 AM, Tomaz Canabrava tcanabr...@kde.org wrote: change the name of a dive site to something that already exists, it will use the first dive site with that name from the dive_site_table Can you please make sure that this only happens if the GPS data is missing (or

More Location Fixes.

2015-07-13 Thread Tomaz Canabrava
Now it works. (I think there's something missing, will keep working here) From f307a66d742080156fc5b51faa42fe00ffce089a Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava tomaz.canabr...@intel.com Date: Mon, 13 Jul 2015 15:14:46 -0300 Subject: [PATCH 3/3] Select right divesite on click.

Re: Dive site management and taxonomy test

2015-07-13 Thread Davide DB
Regarding the Location management UI I think is a good compromise and of course I hope to give you some help to iron out bugs asap. I understood that once the dive site management UI will be ready, some controls will be relocated. BTW I have some doubt about the popup. I don't see a real added

Re: Dive site management and taxonomy test

2015-07-13 Thread Davide DB
Il 13/lug/2015 18:06, Dirk Hohndel d...@hohndel.org ha scritto: When Henrik and you and some others finally got me to agree to implement the location management I was afraid of exactly that. This incredible sink hole of development that prevents another release, that sucks all the development

Re: Dive site management and taxonomy test

2015-07-13 Thread Davide DB
On Fri, Jul 10, 2015 at 6:56 PM, Dirk Hohndel d...@hohndel.org wrote: On Thu, Jul 09, 2015 at 04:33:19PM +0200, Davide DB wrote: i.e. my last dive was: Fiumefreddo Bruzio - Cist. DESPREZ 39°14'06.360N 16°02'20.040E Fiumefreddo Bruzio is a city, municipality Cist. DESPREZ is a WWII wreck

Re: Dive site management and taxonomy test

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 05:10:46PM +0200, Davide DB wrote: (City) Scaro-Reggio-Scornavacca-Vardaro No ocean I get Scaro-Reggio-Scornavacca-Vardaro, Tirreno Sea So possibly the call to the oceans API timed out for you or failed for another reason. Yes, I repeated several time

Re: Dive site management and taxonomy test

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 05:19:38PM +0200, Davide DB wrote: Regarding the Location management UI I think is a good compromise and of course I hope to give you some help to iron out bugs asap. I understood that once the dive site management UI will be ready, some controls will be relocated.

[PATCH 3/5] Divinglog import: show stop depth / ceiling

2015-07-13 Thread Miika Turkia
This shows the ceiling as stored by Divinglog. (I am not sure if it is DC reported ceiling, or just a calculated one.) Signed-off-by: Miika Turkia miika.tur...@gmail.com --- parse-xml.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/parse-xml.c b/parse-xml.c index

[PATCH 5/5] Divinglog import: stop (deco) time added

2015-07-13 Thread Miika Turkia
Signed-off-by: Miika Turkia miika.tur...@gmail.com --- parse-xml.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/parse-xml.c b/parse-xml.c index 981037a..abb9c08 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -2882,7 +2882,7 @@ extern int divinglog_profile(void *handle,

[PATCH 4/5] Divinglog import: include NDL information

2015-07-13 Thread Miika Turkia
Signed-off-by: Miika Turkia miika.tur...@gmail.com --- parse-xml.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/parse-xml.c b/parse-xml.c index 3ab1652..981037a 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -2882,7 +2882,7 @@ extern int

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Lubomir I. Ivanov
On 13 July 2015 at 22:35, Gehad Elrobey gehadelro...@gmail.com wrote: Hello all, This week I was working on the following tasks: - Enhancing the one dive per page template. - Refactoring the Printing class to handle QPrinter and QPixmap. - Implement the Preview section in TemplateEdit

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Gehad Elrobey
On Mon, Jul 13, 2015 at 11:13 PM, Lubomir I. Ivanov neolit...@gmail.com wrote: On 13 July 2015 at 23:54, Gehad Elrobey gehadelro...@gmail.com wrote: On Mon, Jul 13, 2015 at 10:33 PM, Lubomir I. Ivanov neolit...@gmail.com wrote: On 13 July 2015 at 22:35, Gehad Elrobey

Re: More Location Fixes.

2015-07-13 Thread Tomaz Canabrava
This is the code that does (1) please check if I got it right. On Mon, Jul 13, 2015 at 4:24 PM, Tomaz Canabrava tcanabr...@kde.org wrote: On Mon, Jul 13, 2015 at 4:14 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Mon, Jul 13, 2015 at 12:00 PM, Tomaz Canabrava

[PATCH] Bluetooth support for Android

2015-07-13 Thread Claudiu Olteanu
Hi there, I attached some patches which can be used to fix the issues related to Bluetooth connectivity on Android platforms. On Android, a connection to a service cannot be established using a port. The first patch should fix this issue using the uuid of the SPP service on the connection step.

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Gehad Elrobey
On Mon, Jul 13, 2015 at 10:33 PM, Lubomir I. Ivanov neolit...@gmail.com wrote: On 13 July 2015 at 22:35, Gehad Elrobey gehadelro...@gmail.com wrote: Hello all, This week I was working on the following tasks: - Enhancing the one dive per page template. - Refactoring the Printing class

GSoC Status - Week 7 (VPM-B)

2015-07-13 Thread Jan Darowski
Hi! This week I wrote a Boyles law compensation and checked all the calculations to find the root of the differences of results against the original implementation. I found that there is a difference between the code and papers in one of the CVA formulas. I need to add one more calculation, which

Re: different segfault with lastest master

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 1:39 PM, Dirk Hohndel d...@hohndel.org wrote: The idea is that the taxomony should always be consistent. NULL pointer and nothing there, or .nr in sync with the number of valid pointers. Yes, yes. But if that initialization never happens, then you may have several *old*

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Lubomir I. Ivanov
On 13 July 2015 at 23:54, Gehad Elrobey gehadelro...@gmail.com wrote: On Mon, Jul 13, 2015 at 10:33 PM, Lubomir I. Ivanov neolit...@gmail.com wrote: On 13 July 2015 at 22:35, Gehad Elrobey gehadelro...@gmail.com wrote: Hello all, This week I was working on the following tasks: -

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Lubomir I. Ivanov
On 14 July 2015 at 00:16, Gehad Elrobey gehadelro...@gmail.com wrote: On Mon, Jul 13, 2015 at 11:13 PM, Lubomir I. Ivanov neolit...@gmail.com wrote: On 13 July 2015 at 23:54, Gehad Elrobey gehadelro...@gmail.com wrote: On Mon, Jul 13, 2015 at 10:33 PM, Lubomir I. Ivanov

Re: different segfault with lastest master

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 1:10 PM, Dirk Hohndel d...@hohndel.org wrote: I still don't see how this can overflow. If you put a printf or qDebug() or something at this line ds-taxonomy.nr = ri; You missed the part where I pointed out that that store is conditional. It's inside the

Re: More Location Fixes.

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 1:17 PM, Tomaz Canabrava tcanabr...@kde.org wrote: This is the code that does (1) please check if I got it right. I'm not convinced that's right either. I suspect that if the dive site name matches an old dive site, and we don't have GPS location, we do want to take the

Re: different segfault with lastest master

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 11:46:28AM -0700, Linus Torvalds wrote: On Sat, Jul 11, 2015 at 4:39 PM, Linus Torvalds torva...@linux-foundation.org wrote: which is just the taxonomy.category writes. Looks like it writes past the end of the allocation. Ok, looking at this, the problem seems to

Re: [PATCH] Only free memory for three levels of taxonomy

2015-07-13 Thread Rick Walsh
On 13 July 2015 at 22:49, Dirk Hohndel d...@hohndel.org wrote: On Mon, Jul 13, 2015 at 10:40:53PM +1000, Rick Walsh wrote: We only use three levels of taxonomy, but we were attempting to free memory for seven. This led to some fun invalid point crashes. Please check I'm not way off the

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Lubomir I. Ivanov
On 14 July 2015 at 00:19, Lubomir I. Ivanov neolit...@gmail.com wrote: then again, there was this huge lines issues with QImage on Linux in Qt5.x, so if this bug is still present QPixmap should be used. via Q_OS_LINUX branching that is; same as the code we had in the previous printing stack.

[PATCH 2/5] Divinglog test dive

2015-07-13 Thread Miika Turkia
Signed-off-by: Miika Turkia miika.tur...@gmail.com --- dives/TestDivingLog4.1.1.sql | Bin 0 - 59392 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dives/TestDivingLog4.1.1.sql diff --git a/dives/TestDivingLog4.1.1.sql b/dives/TestDivingLog4.1.1.sql new file mode

[PATCH 1/5] Divinglog import: include heartbeat info

2015-07-13 Thread Miika Turkia
Note, that this patch is not tested with real data as I do not have log that would include heartbeat available. Signed-off-by: Miika Turkia miika.tur...@gmail.com --- parse-xml.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/parse-xml.c b/parse-xml.c index

Re: More Location Fixes.

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 02:13:20PM -0700, Linus Torvalds wrote: On Mon, Jul 13, 2015 at 1:17 PM, Tomaz Canabrava tcanabr...@kde.org wrote: This is the code that does (1) please check if I got it right. I'm not convinced that's right either. I suspect that if the dive site name matches

Re: GSoC Status - Week 7 (Customizable prints)

2015-07-13 Thread Gehad Elrobey
On Mon, Jul 13, 2015 at 11:22 PM, Lubomir I. Ivanov neolit...@gmail.com wrote: On 14 July 2015 at 00:19, Lubomir I. Ivanov neolit...@gmail.com wrote: then again, there was this huge lines issues with QImage on Linux in Qt5.x, so if this bug is still present QPixmap should be used. via

Re: More Location Fixes.

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 04:09:09PM -0700, Dirk Hohndel wrote: On Mon, Jul 13, 2015 at 02:13:20PM -0700, Linus Torvalds wrote: On Mon, Jul 13, 2015 at 1:17 PM, Tomaz Canabrava tcanabr...@kde.org wrote: This is the code that does (1) please check if I got it right. I'm not convinced

Re: different segfault with lastest master

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 1:58 PM, Linus Torvalds torva...@linux-foundation.org wrote: The problem is that nr is not necessarily 0 or 1, because we may have *previous* taxonomy data, and we keep potentially growing it. So I'm testing the attached patch, but so far I haven't seen anything. As

Re: different segfault with lastest master

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 2:37 PM, Linus Torvalds torva...@linux-foundation.org wrote: I'm wondering if maybe your Fix memory handling for taxonomy data commit fixed it. I ended up recompiling due to the debug patch, so I'm now running a different version of subsurface than I was when I saw it

Re: different segfault with lastest master

2015-07-13 Thread Linus Torvalds
On Mon, Jul 13, 2015 at 2:25 PM, Linus Torvalds torva...@linux-foundation.org wrote: So I'm testing the attached patch, but so far I haven't seen anything. As mentioned, I'm not sure what triggers it. I've been clicking on the dive edit thing and the dive list like a deranged monkey on

Re: different segfault with lastest master

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 02:40:03PM -0700, Linus Torvalds wrote: On Mon, Jul 13, 2015 at 2:37 PM, Linus Torvalds torva...@linux-foundation.org wrote: I'm wondering if maybe your Fix memory handling for taxonomy data commit fixed it. I ended up recompiling due to the debug patch, so I'm

Re: different segfault with lastest master

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 01:58:25PM -0700, Linus Torvalds wrote: On Mon, Jul 13, 2015 at 1:39 PM, Dirk Hohndel d...@hohndel.org wrote: The idea is that the taxomony should always be consistent. NULL pointer and nothing there, or .nr in sync with the number of valid pointers. Yes, yes. But

Re: different segfault with lastest master

2015-07-13 Thread Dirk Hohndel
On Mon, Jul 13, 2015 at 02:51:24PM -0700, Dirk Hohndel wrote: That said, I would appreciate a code review of that patch once it's pushed. I went out of my way to try to capture all corner cases here. Pushed. /D ___ subsurface mailing list