Iphone Sync problems

Discussions about the smartphone versions
Post Reply
meanbiker84
Posts: 2
Joined: Wed Jun 10, 2009 09:09

Iphone Sync problems

Post by meanbiker84 »

When ever i try to sync with my iphone i get this error.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: String was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.DateTime.Parse(String s)
at Divinglog.Import.SQLite.Import()
at Divinglog.Sync.iPhone.BWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Sync
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Diving%20Log%204.0/Sync.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
CommandLink
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/Diving%20Log%204.0/CommandLink.DLL
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data.SQLite
Assembly Version: 1.0.60.0
Win32 Version: 1.0.60.0
CodeBase: file:///C:/Program%20Files/Diving%20Log%204.0/System.Data.SQLite.DLL
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.312 (rtmLHS.050727-3100)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
ZeroconfService
Assembly Version: 0.5.0.4
Win32 Version: 0.5.0.4
CodeBase: file:///C:/Program%20Files/Diving%20Log%204.0/ZeroconfService.DLL
----------------------------------------
OpenNETCF.Desktop.Communication
Assembly Version: 2.9.2244.24857
Win32 Version: 2.9.2244.24857
CodeBase: file:///C:/Program%20Files/Diving%20Log%204.0/OpenNETCF.Desktop.Communication.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I have installed and reinstalled on the pc but dont want to loose the 58 dives on my iphone so need to back them up. does anyone know how i can do that
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: Iphone Sync problems

Post by divinglog »

Hi

I'm pretty sure it is the same issue we've seen 2 days ago. We have a working solution for this and your data is not lost, no fear. First of all here is the explanation from Greg:
It turns out that there is an apparent bug in the iPhone under a certain combinations of Language, Region and Date/Time settings that are causing the problem you are seeing. I will be filling a bug with Apple tonight and trying to work around the problem in code but for the immediate term, I do have a workaround that you can use.

The problem only happens with you have the following combination of iPhone settings:

Language: English
Region Format: United Kingdom
Data & Time: 24-Hour Time: OFF (under Settings->General->Date & Time)

(actually I'm not sure if English matters) so if you change the Date & Time 24-Hour Time setting to "ON" or change the Region format to "United States, Australia, Canada, etc" then the data is written to the database in the correct format. So if you can live with your iPhone showing 24 hour time or can use a different Region Setting then things seem to work properly.

This is clearly a bug in the way when Apple is choosing to apply the 24-Hour setting when formatting output date/time strings. I explicitly use a call that is supposed to write 24 Hour time into the database no matter what your local settings are. If you have the Region format set to anything but United Kingdom (of the ones that I tested), you can have the 24 Hour Time switch set to anything without a problem but only with the UK setting does the library look at the date/Time setting even though I have told it to ignore it.

Temporary fix until the next update:
Change the Date & Time setting on your iPhone so 24-Hour time is "ON" (or alternately change to a different Region Format other than United Kingdom)
In order to fix your iPhone Dive Log database, you have to find the temporary file in the same folder where your desktop logbook file is stored with the same file name but with the extension *.sql. Please send me this file and your desktop logbook file to info <at> divinglog.de. Greg has a tool to repair the iPhone Dive Log and I can sync the repaired file back into the desktop logbook. Please do not make any further changes in the meantime to any of the logbook files. I'm sorry for any inconveniences!

Kind regards,
Sven
meanbiker84
Posts: 2
Joined: Wed Jun 10, 2009 09:09

Re: Iphone Sync problems

Post by meanbiker84 »

Hi thanks for your reply. i have just sent the file to you.

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

Re: Iphone Sync problems

Post by divinglog »

I just released a small update to my sync tool which will work around the iPhone bug until Greg is able to release an update to the AppStore. This update to the sync tool makes it even easier for all users affected by this issue.

Please download this zip file and extract it into the Diving Log program folder and replace the existing file:

SyncConfig.zip

After this update you should be able to sync your data back into the desktop logbook.
gregm
Posts: 63
Joined: Tue Jan 06, 2009 23:04
Location: Bellingham, WA, USA
Contact:

Re: Iphone Sync problems

Post by gregm »

Dive Log 1.1.2 was just approved by Apple for release to the App Store. This version avoids the problems caused by 12 vs 24 hour time settings on the iPhone in some regions (UK, Spain, Colombia are some examples). This version will also fix any databases that have been corrupted by this bug. The database is corrected as it is copied off the iPhone during a sync operation. You should no longer need the special version of the iPhone sync module that Sven provided in the previous post (although it will not hurt anything).

You should see the update to Dive Log via the normal iTunes or App Store application update process shortly if you have not seen it already. You can also get the update directly by visiting:

http://itunes.apple.com/WebObjects/MZSt ... 49600&mt=8

This version also has some other minor bug fixes and adds support for displaying a plot of your temperature data (if it is available from your dive computer) when viewing your dive profile.

Sorry about the delay making this release available. It appears that Apple has been very busy with all the App updates being submitted due to the iPhone 3.0 OS release as this update took longer to get approved that any previous update.

Cheers,

Greg
Post Reply