Problems importing to DL 6.0 after 'broken' apnea dive

Discussions about Diving Log 6.0 - questions and hints
Post Reply
varneynz
Posts: 12
Joined: Thu May 17, 2012 06:08

Problems importing to DL 6.0 after 'broken' apnea dive

Post by varneynz »

Hi,

I have a weird problem that I hope you can help with.

Short background. Both I and my wife dive with Uwatec Galileo Luna Trimix computers. We have separate log books in Diving Log. I usually load the dives from the first one, then open the other logbook and load the dives from the other one. Always when I do this the second computer has to reread ALL dives from the dive computer (I'm guessing that this is because the Downloader.db holds a fingerprint per dive computer Model and not by Serial number). This is an irrititation, but one that I can live with.

The problem is that the other day I did a series of short, shallow apnea dives with my computer. The final series of dives contains no dives - i.e. I pushed the button on my computer to start a series and then didn't actually do any dives. This apparently created a dive in the computer with 0 depth...

On attempting to load my dives to Diving Log I get the following error:

Code: Select all

System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at Divinglog.Download.Universal.ParseSmartData()
   at Divinglog.Download.Universal.LibDC_DownloadComplete(DeviceStatusEnum Status)
   at Divinglog.Download.Libdivecomputer.BWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Diving Log Version: 6.0.0.1
Windows Version: Windows 7
Seems to me that the Downloader doesn't like the 'non-dived' apnea dive...

If there was some way to just load the dives after that one I'd ignore the problem and carry on, but because of the issue mentioned above, DL currently wants to load all the dives from my computer each time, so it loads for a while and then crashes on the above error.

I have successfully loaded the dives into Uwatecs SmartTrak program and can load into DL that way, but I'd rather go direct. I've attached a zip with an slg from SmartTrak of all the dives currently in my computer - it's dive #133 that is causing the issues. Also enclosed are my Downloader.db and Downloader.txt - note these haven't updated after loading my wife's computer - because of the crash they are not being updated when I load mine. Finally the DownloadSmart.xml file is attached - mainly because the Serial in there is different from the one in Downloader.db, so it is probably mine.

Fingers crossed that you can help,
Thanks,
Simon Varney
Attachments
Diving Log.zip
(260.36 KiB) Downloaded 341 times
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by divinglog »

Hi Simon

Thank you, I think I've fixed both problems (the crash and the fingerprint problem). Please download this update and extract it into the Diving Log program folder. Let me know if both issues are fixed.

Kind regards,
Sven
varneynz
Posts: 12
Joined: Thu May 17, 2012 06:08

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by varneynz »

Hi Sven,

Thanks for the super quick response.

Just tried reading from my computer with the new version, but unfortunately I get a (different) crash almost immediately -

Code: Select all

System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid.  Check InnerException for exception details.

   at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
   at Divinglog.Download.Libdivecomputer.BWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

System.NullReferenceException: Object reference not set to an instance of an object.

   at Divinglog.Download.Libdivecomputer.dc_device_foreach(IntPtr device, dive_callback callback, IntPtr userdata)
   at Divinglog.Download.Libdivecomputer.DLUniversal(LibdivecomputerDescriptor Desc)
   at Divinglog.Download.Libdivecomputer.BWorker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Diving Log Version: 6.0.0.1
Windows Version: Windows 7
It did capture a log this time though - it's attached. No other file (including Downloader.db) were updated during the attempted load.

Thanks,
Simon
Attachments
Downloader.txt
Log of partial load
(4.52 KiB) Downloaded 350 times
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by divinglog »

Hi Simon

Can you try it a few times? I'm tracking this error with some other users for some time and it is not related to your first issue and it seems to happen not every time. I still have to find out the reason for it.

Kind regards,
Sven
varneynz
Posts: 12
Joined: Thu May 17, 2012 06:08

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by varneynz »

Hi Sven,

Ok. From what I can see the new problem (TargetInvocationException) occurs whenever I have logging turned on in this latest version of DL6 that you sent me. I tried 11 times with 3 different logbooks, with and without a Downloader.db file, from both computers and with DL5 as well.

I got a successful completion 3 times - once with the second computer reading only new logs (there were none), once with DL5 (even reading the bad Apnea dive) and finally with the new version with logging turned off (also reading the Apnea dive - to a clean logbook, without a Downloader.db file). So it looks like my initial problem is fixed - thanks! I'm diving again on Thursday and Kristina on Saturday so I'll let you know after the weekend how it goes with reading from the two computers to their respective logbooks again. Do you want me to test loading all dives again from both?

I've attached my logs from the first 10 attempts in case there is anything useful in there for you. The crashing seems to occur at a random place, but always very early in the process. I've pasted in the error message in each log, but as far as I could see it was always the same error.

If you want to compile a debug version which dumps out line numbers or more info then I'm happy to test that for you - let me know if there are specific tests you want me to do.

In terms of me guessing what the problem could be - the Galileo uses an IRDA connection which is somewhat slow and flakey - I often get messages from Windows that connection has been interrupted while transferring, the message stays for 1-5 seconds and the situation resolves itself without me doing anything. Could it possibly be something related to this - we're getting timeouts in the read which force you to clear a buffer to the log and then when data starts coming in again you've already cleared the buffer which it was expecting to write to?

Anyway, let me know if I can help test in any way, otherwise I'll let you know after the weekend how everything is running now.

Cheers,
Simon
Attachments
Error logs.zip
Logs from first 10 attempts
(15.47 KiB) Downloaded 347 times
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by divinglog »

Hi Simon

Thank you for your detailed tests and descriptions! I think for you you continue to download both Galileos with the option "Only new dives" and with Error Logging turned off. You can keep the Downloader.db in place and after importing dives from both computer it should contain 2 fingerprints and the new dive downloading should work. Please let me know if the crash happens also without error logging.

Thank you,
Sven
varneynz
Posts: 12
Joined: Thu May 17, 2012 06:08

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by varneynz »

Hi Sven,

Happy to report that the initial problems are fixed. Successfully imported Only New Dives from both computers without any issues.

Thanks for your quick fix! If I encounter that crash on reading again I'll let you know.

Cheers,
SImon
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Problems importing to DL 6.0 after 'broken' apnea dive

Post by divinglog »

Thank you Simon, good news!
Post Reply