The program syncs fine when running the first time. When closed and reopened with activated "Save passwords and automatically login", Lotus Notes 8.5 and CalSync crash. This does not happen for 1.7.2 but since 1.8.0. With manual login everything works fine.
If the "Notice:" window is still enabled on startup, one can see in its background that CalSync successfully logs into Google and Notes and is "Ready to Sync!" After closing the window it crashes. If the "Notice:" window is already disabled, CalSync crashes immediately when starting.
I've had the same problem. Tracked it down to the following code sequence:
MainForm.RunAfterFormLoad->MainForm.LoginTest->Mainform.CreateSyncInstance()->MainForm.RunBackgroundProcess
This call stack is contained within a conditional block that looks for if the "IsSavePasswordsOptionSet". Which is why if you uncheck the "Save passwords and automatically login" the problem goes away.
To me, it looks like this problem is related to login to the notes account. In my userState structure I see empty string member data for the "NotesMailFile" and "NotesServerName". I have valid data for the "NotesPassword" and other stuff.
Line 865 in MainForm.cs throws an "InvalidOperationException" from the call stack I referenced above.
I've seen many errors from people for a long time and this may help root cause the issue.
In version 1.8.0, when I remove (comment out) lines 309 through 312 within MainForm.cs it seems to fix my issues. I think this is a valid bugfix but I don't know who else may maintain this code now.
Has you done a build with this fix or are you/we waiting for someone who take lead?
Hm, as much as I'd like to do a build I don't find any time to do so ... I should reduce time working with Lotus Notes I guess ... :/
I can confirm that the fix works.
The problem is that, during the start-up of the application, the application will simulate a click on the Login button if IsSavePasswordOptionSet is true. This click triggers the LoginTest() function.
Shortly thereafter, RunAfterFormLoad is called, which too calls LoginTest(). As a result, two Synchronizers are started against notes, which crashes the environment.
A fixed build would be graeat!
I have undergone the same problem. The exception was "InvalidOperationException" from the following on CalSync.MainForm.RunBackgroundProcess():
From my experience, this.bgSyncWorker was already busy to do something else so it threw that exception as it couldn't kick off another task. I tested Tony's fix but it didn't work for me. (Thanks for the fix though!) Actually that prevented the crash but the auto sync functionality didn't work properly, at least for my case.
Hence I reverted Tony's code fix and then inserted this code block just before that line and it seems to work.
This code block helps the worker to finish its work before getting a new job.
As I am not the developer of this project and hasn't been experienced in this area, my code might not be appropriate, so be careful! :)
Last edit: Scott Rhee 2013-10-28
Please send me a message if interested in testing my fix at your own risk; I'll provide the compiled binary with myfix. CanSync.settings file should be backed up prior to testing the binary. If I should not provide any fix or binary here without permission, please advise me to stop it.
I know it's better to get a permission to update the source codes but I don't know how to apply for it.
Last edit: Scott Rhee 2014-11-06
Hey Scott,
Cool I didn't read before that you already did a fix some time ago. Sure, I
would give it a try.
Regards
Robert
Please consider the environment before printing this email.
.....................
Robert Braun // public.braun@gmail.com
On Thu, Nov 6, 2014 at 3:21 AM, Scott Rhee mirheesf@users.sf.net wrote:
Related
Bugs: #21
Great news and thanks for sharing ScottR. I've been using my change for the past year and it seems to work for my setup. Good to see another solution come from my discovery. This problem plagued me for many versions before discovery. I'm not a lotus notes fan and I think our company is finally getting away from it in the next six months. But I still use this as my syncing solution for lotus calendar data onto my android device.
I compiled the trunc with the changes using VS 2013. I detected a problem using the RELEASE configuration. Compiled with this compiler settings LN2GC starts without using the settings from settings file. Using DEBUG configuration compiles a working binary.
Has anyone an idea whats the problem here?
BTW: Do we have a chance to commit the bugfix from ScottR? Does anyone know how to publish a release 1.9?
Uh, I forgot to mention that removing the LN-Password from *.settings file is a workaround.
I have the Same Problem. My Lotus Notes crashes. Can please send my anybody a fixed Version, so i can try if its works for me. Thanks
Or can anybody make a new release. i have not a Visual Studio.
Thanks
Facing the same issue as well. An 1.8.1 release with a fix would be great !
Thanks in advance
IS THERE ANYBODY that is able to do a new release with that bugfix? The original author is not working on it anymore and I, personally, do not have the time right now to figure out how to, since I have no C compiler and so on...
I am the original author and, as mentioned, am no longer progressing this project or even have an environment to work on it (yay for Exchange!). If anyone needs access to create a release, I'm happy to grant it.
Hi, I'm interested in making changes and create a release or a patch but don't know how to get the permission. Would you please advise me what I shall do? Thanks.
Last edit: Scott Rhee 2014-10-29
Mar 2015 - I also experience same crashing with CalSync 1.9.1. My workaround is not select "save password and automatically login", which means I have to key in Lotus Notes password every time I start my notebook. That is ok for me.