Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:kernel-2.6.32
evolution-mono-providers
bnc-449905-crash-on-start-up1.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc-449905-crash-on-start-up1.diff of Package evolution-mono-providers
commit 7e0ad30bad8afc71ad3c9972d8c1bd3b109337e5 Author: chenthill <chen@rocky.blr.novell.com> Date: Fri Dec 5 05:46:09 2008 +0530 Fixes a dead lock. Added some debug statements. diff --git a/calendar/backends/sharepoint/BackGroundWorker.cs b/calendar/backends/sharepoint/BackGroundWorker.cs index 230782c..f413b7a 100644 --- a/calendar/backends/sharepoint/BackGroundWorker.cs +++ b/calendar/backends/sharepoint/BackGroundWorker.cs @@ -15,7 +15,7 @@ namespace SharePoint private bool running; private bool shutdown; private Thread backgroundThread; - private static readonly string locker = "lckr"; + private readonly string locker; private CalComponent [] GetEventChanges (ref string timestamp, ref string [] ids) @@ -73,6 +73,7 @@ namespace SharePoint shutdown = false; running = false; backgroundThread = null; + locker = "lcr"; backgroundEvent = new ManualResetEvent (false); } @@ -216,8 +217,10 @@ namespace SharePoint if (backgroundThread == null) { + Console.WriteLine ("Starting thread"); lock (locker) { + Console.WriteLine ("Creating thread"); if (backgroundThread == null) { backgroundThread = new Thread (new ThreadStart (BackgroundWorkerThread)); diff --git a/calendar/backends/sharepoint/DaemonConnection.cs b/calendar/backends/sharepoint/DaemonConnection.cs index 93e5c85..d4f1fd9 100644 --- a/calendar/backends/sharepoint/DaemonConnection.cs +++ b/calendar/backends/sharepoint/DaemonConnection.cs @@ -72,6 +72,7 @@ namespace SharePoint // TODO: What should the Navigator do if the ICEcore Daemon suddenly exits? Console.WriteLine ("TODO: What should the Navigator do if the ICEcore Daemon suddenly exits?"); } else { + Console.WriteLine ("Connecting to daemon again "); // Connect to the new instance of the daemon ConnectToICEcoreDaemon (); } diff --git a/calendar/backends/sharepoint/Sharepoint.cs b/calendar/backends/sharepoint/Sharepoint.cs index b562655..0b4a3e7 100644 --- a/calendar/backends/sharepoint/Sharepoint.cs +++ b/calendar/backends/sharepoint/Sharepoint.cs @@ -16,6 +16,7 @@ namespace SharePoint { private bool loaded; Icaltimezone defaultZone; static readonly string baseUri = "sharepoint://"; + static readonly string olocker = "lckr"; #endregion @@ -25,8 +26,6 @@ namespace SharePoint { public CalBackendCache cache; public CalMode mode; public CalBackend backend; - static string clocker = "lckr"; - public readonly string locker = "lckr"; public string hostUrl; public string workspaceid; public string folderid; @@ -79,11 +78,14 @@ namespace SharePoint { public BackendStatus BackendOpen (IntPtr raw, bool if_exists, string username, string password) { - - if (loaded == true) - return BackendStatus.Success; - + if (loaded == true) + return BackendStatus.Success; + + // There seems to a race condition while marshalling CalBackend. Needs to be debugged. I am not sure if gtk-sharp is thread safe. Needs more debugging. + lock (olocker) + { + if (mode == CalMode.Remote) { try @@ -126,8 +128,6 @@ namespace SharePoint { backend = new CalBackend (raw); if (backend == null) return BackendStatus.OtherError; - - GC.KeepAlive (backend); Evolution.Source source = backend.Source; string user = source.GetSourceProperty ("username"); @@ -149,6 +149,7 @@ namespace SharePoint { absBackend = new SharePoint.SharePointTaskBackend (this); loaded = true; + } return BackendStatus.Success; } @@ -307,7 +308,7 @@ namespace SharePoint { public void BackendStartQuery (IntPtr query, string sexp) { - + Console.WriteLine ("In Base start query "); try { absBackend.BackendStartQuery (query, sexp); } catch (Exception ex) diff --git a/calendar/backends/sharepoint/SharepointCal.cs b/calendar/backends/sharepoint/SharepointCal.cs index 8f0d842..03137b3 100644 --- a/calendar/backends/sharepoint/SharepointCal.cs +++ b/calendar/backends/sharepoint/SharepointCal.cs @@ -20,6 +20,7 @@ namespace SharePoint if (bgw.Running == false) bgw.Start (60); + Console.WriteLine ("Query started " + sexp); string [] comps = BackendGetObjectList (sexp); GLib.List objects = new GLib.List (null); @@ -29,6 +30,7 @@ namespace SharePoint } spBackend.backend.NotifyObjectsAdded (query, objects); + Console.WriteLine ("Query ended " + sexp); } public override string[] BackendGetObjectList (string sexp) @@ -40,7 +42,6 @@ namespace SharePoint foreach (CalComponent comp in comps) { - Console.WriteLine (comp.GetAsString ()); if (backendSexp.MatchObject (comp, spBackend.backend)) compList.Add (comp.GetAsString ()); } diff --git a/calendar/backends/sharepoint/sharepoint.userprefs b/calendar/backends/sharepoint/sharepoint.userprefs index fc3b2c8..4b20245 100644 --- a/calendar/backends/sharepoint/sharepoint.userprefs +++ b/calendar/backends/sharepoint/sharepoint.userprefs @@ -1,20 +1,20 @@ <Properties> - <MonoDevelop.Ide.Workbench ActiveDocument="ComponentEntry.cs" ctype="Workbench"> + <MonoDevelop.Ide.Workbench ActiveDocument="Sharepoint.cs" ctype="Workbench"> <Files> <File FileName="Welcome" /> <File FileName="SharepointTask.cs" Line="104" Column="72" /> - <File FileName="SharepointCal.cs" Line="43" Column="45" /> - <File FileName="Sharepoint.cs" Line="369" Column="62" /> + <File FileName="SharepointCal.cs" Line="31" Column="57" /> <File FileName="DaemonConnection.cs" Line="6" Column="21" /> <File FileName="ComponentEntry.cs" Line="145" Column="55" /> <File FileName="BackGroundWorker.cs" Line="131" Column="1" /> + <File FileName="Sharepoint.cs" Line="86" Column="6" /> </Files> <Pads> <Pad Id="ProjectPad"> <State expanded="True"> <Node name="sharepoint" expanded="True"> <Node name="References" expanded="True" /> - <Node name="ComponentEntry.cs" selected="True" /> + <Node name="Sharepoint.cs" selected="True" /> </Node> </State> </Pad>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor