[GH-ISSUE #340] Outlook sometimes hangs and does not update incoming email #325

Open
opened 2026-02-25 20:31:25 +03:00 by kerem · 10 comments
Owner

Originally created by @jgilbert2017 on GitHub (Jan 28, 2022).
Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/340

(version 4.0.0.0)

I'm seeing some sporadic issues where Outlook hangs indefinitely and does not update incoming email.

The UI is responsive but the tray icon is stuck in the "updating" state and new mail does not show up.

Outlook will also hang on exit and need to be killed in the task manager to restart.

I've captured a memory dump and the hang is in VSTA_Main but the stack trace is just memory addresses (no method names/symbols). I'm not using any other plugins/addons other than outlookcaldavsynch.

How best to debug?

Originally created by @jgilbert2017 on GitHub (Jan 28, 2022). Original GitHub issue: https://github.com/aluxnimm/outlookcaldavsynchronizer/issues/340 (version 4.0.0.0) I'm seeing some sporadic issues where Outlook hangs indefinitely and does not update incoming email. The UI is responsive but the tray icon is stuck in the "updating" state and new mail does not show up. Outlook will also hang on exit and need to be killed in the task manager to restart. I've captured a memory dump and the hang is in VSTA_Main but the stack trace is just memory addresses (no method names/symbols). I'm not using any other plugins/addons other than outlookcaldavsynch. How best to debug?
Author
Owner

@Dim3nsioneer commented on GitHub (Feb 7, 2022):

same issue here with V4.1.0

<!-- gh-comment-id:1031229531 --> @Dim3nsioneer commented on GitHub (Feb 7, 2022): same issue here with V4.1.0
Author
Owner

@jgilbert2017 commented on GitHub (Mar 11, 2022):

i still can't get a stack, but a possible hint indicates a file system operation failing (possibly due to excessive NTFS fragmentation???).

wish i could get a stack so the issue can be directly handling in the code, but for now i'm going to try cleaning up my disks and defragging to mitigate.

The following exception objects were found in the heap.
Name	Value	Type	Occurrence count
 
 {"Cannot access a disposed object."}		System.ObjectDisposedException	1
 {"The requested operation could not be completed due to a file system limitation "}		System.IO.IOException	1
 Message	The requested operation could not be completed due to a file system limitation	string	
 StackTrace		System.Diagnostics.StackFrame[]	
 InnerException	null		
 {}		System.Exception	1
 
<!-- gh-comment-id:1064671578 --> @jgilbert2017 commented on GitHub (Mar 11, 2022): i still can't get a stack, but a possible hint indicates a file system operation failing (possibly due to excessive NTFS fragmentation???). wish i could get a stack so the issue can be directly handling in the code, but for now i'm going to try cleaning up my disks and defragging to mitigate. ``` The following exception objects were found in the heap. Name Value Type Occurrence count    {"Cannot access a disposed object."} System.ObjectDisposedException 1  {"The requested operation could not be completed due to a file system limitation "} System.IO.IOException 1  Message The requested operation could not be completed due to a file system limitation string  StackTrace System.Diagnostics.StackFrame[]  InnerException null  {} System.Exception 1   ```
Author
Owner

@jgilbert2017 commented on GitHub (Mar 19, 2022):

after defragging i still got a hang. attaching a debugger to the running outlook.exe process does not give any stack or tasks :-(.

does anyone know if there is a flag / registry setting etc that will force outlook to host the vsto addin in a debug mode?

<!-- gh-comment-id:1072997844 --> @jgilbert2017 commented on GitHub (Mar 19, 2022): after defragging i still got a hang. attaching a debugger to the running outlook.exe process does not give any stack or tasks :-(. does anyone know if there is a flag / registry setting etc that will force outlook to host the vsto addin in a debug mode?
Author
Owner

@jgilbert2017 commented on GitHub (Mar 19, 2022):

possible issue- SynchronizerFactory.CreateHttpClient does not set the Timeout property on the HttpClient. Tracing the code it looks like this is only used for timezone info fetching in GlobalTimeZoneCache but i suppose it could be a problem.

        private HttpClient CreateHttpClient(ProxyOptions proxyOptionsOrNull)
        {
            var proxy = proxyOptionsOrNull != null ? CreateProxy(proxyOptionsOrNull) : null;
            var httpClientHandler = new HttpClientHandler
            {
                Proxy = proxy,
                UseProxy = proxy != null
            };

            return new HttpClient(httpClientHandler);
        }
<!-- gh-comment-id:1073001444 --> @jgilbert2017 commented on GitHub (Mar 19, 2022): possible issue- `SynchronizerFactory.CreateHttpClient` does not set the `Timeout` property on the `HttpClient`. Tracing the code it looks like this is only used for timezone info fetching in `GlobalTimeZoneCache` but i suppose it could be a problem. ``` private HttpClient CreateHttpClient(ProxyOptions proxyOptionsOrNull) { var proxy = proxyOptionsOrNull != null ? CreateProxy(proxyOptionsOrNull) : null; var httpClientHandler = new HttpClientHandler { Proxy = proxy, UseProxy = proxy != null }; return new HttpClient(httpClientHandler); } ```
Author
Owner

@jschiefer commented on GitHub (Jun 30, 2022):

Seeing the same issue with 4.2.0, syncing with Nextcloud 23.

<!-- gh-comment-id:1171607350 --> @jschiefer commented on GitHub (Jun 30, 2022): Seeing the same issue with 4.2.0, syncing with Nextcloud 23.
Author
Owner

@GregorB54321 commented on GitHub (Oct 23, 2024):

unfortunatelly I can not name a reason, but with 4.4.1 I still have that or a very similar issue. Outlook gets unresponsive and Mousepointer is alternating between pointer and sandtimer two to three times a second. I also suppose it is somehow network related.

<!-- gh-comment-id:2431783684 --> @GregorB54321 commented on GitHub (Oct 23, 2024): unfortunatelly I can not name a reason, but with 4.4.1 I still have that or a very similar issue. Outlook gets unresponsive and Mousepointer is alternating between pointer and sandtimer two to three times a second. I also suppose it is somehow network related.
Author
Owner

@GregorB54321 commented on GitHub (Nov 4, 2024):

may this helps?

log.txt:

Zeile 1851454:  INFO  2024-10-24 17:23:09,575 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:00:00.2550076
Zeile 1851950:  INFO  2024-10-24 18:31:05,531 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:41:05.4296295
Zeile 1852244:  INFO  2024-10-24 19:11:02,153 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:39:56.1472462
Zeile 1852406:  INFO  2024-10-24 20:49:27,486 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 01:38:24.9894062
Zeile 1852458:  INFO  2024-10-24 20:49:34,148 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:00:00.9459476
Zeile 1852636:  INFO  2024-10-24 21:21:06,632 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:01:30.9125136
Zeile 1852790:  INFO  2024-10-24 21:21:15,577 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:00:08.9126134
[disabled the Plugin; but this is also no solution :-/ ]
Zeile 1853720:  INFO  2024-11-04 15:45:51,803 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:43:27.2038919
Zeile 1854160:  INFO  2024-11-04 16:27:21,925 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:41:29.7430350
Zeile 1854321:  INFO  2024-11-04 18:33:44,867 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 02:06:22.6285999
Zeile 1854473:  INFO  2024-11-04 18:33:52,800 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 00:00:07.4349843
    
    
    
 DEBUG 2024-11-04 16:27:34,614 [ VSTA_Main] Synchronizer.DataAccess.CalDavDataAccess . MoveNext                       - Exiting GetEntities.
 INFO  2024-11-04 16:27:39,222 [ VSTA_Main] onizer.Implementation.CalDavRepository`1 . MoveNext                       - Duration of 'CalDavRepository.Get (1 entitie(s))': 00:00:10.1842887
 INFO  2024-11-04 16:27:39,238 [ VSTA_Main] nization.States.UpdateFromNewerToOlder`7 . Resolve                        - Considering '/remote.php/dav/calendars/username/arbeit/2a000005-d95b-4632-acd2-9fdb8c956667.ics' (modified at '') newer than '000000003E7B331A96E0000005EF0800060D9B1807000FE12BAF3AC1D311A5E70800060D9B180000008BE372000092C1A5DF23C0694C89980F075CF4BF0F0003A7F6C1AC0000' (modified at '24.10.2024 19:31:55').
 WARN  2024-11-04 16:27:39,693 [ VSTA_Main] .Implementation.Events.EventEntityMapper . CreateMailUriOrNull            - Invalid email address URI mailto:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIB00000SPDLT)/cn=Recipients/cn=d18ecfd66873446c90000025ac5b6f15-Abcdefg.Hij for attendee.
 WARN  2024-11-04 16:27:39,979 [ VSTA_Main] .Implementation.Events.EventEntityMapper . CreateMailUriOrNull            - Invalid email address URI mailto:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIB00000SPDLT)/cn=Recipients/cn=69149985d90849b6a00000d56e2af0ba-TS-EU_klmno for attendee.
 INFO  2024-11-04 18:33:44,852 [ VSTA_Main]  GenSync.Synchronization.Synchronizer`11 . MoveNext                       - A repository jobs: Create 0 , Update 1 , Delete 0
 INFO  2024-11-04 18:33:44,852 [ VSTA_Main]  GenSync.Synchronization.Synchronizer`11 . MoveNext                       - B repository jobs: Create 0 , Update 0 , Delete 0
 DEBUG 2024-11-04 18:33:44,867 [ VSTA_Main]  GenSync.Synchronization.Synchronizer`11 . MoveNext                       - Exiting.
 INFO  2024-11-04 18:33:44,867 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext                       - Duration of 'Running synchronization profile 'Kalender'': 02:06:22.6285999

log.txt is logging since years in debug, size around 460MiB. May this impacts performance also?!

In the long running reports the "Invalid email address" line is repeating a couple of times (10th to 100th times) every 10-60secs. Still blaming about the same Recipients.

<!-- gh-comment-id:2455433635 --> @GregorB54321 commented on GitHub (Nov 4, 2024): may this helps? log.txt: ```text Zeile 1851454: INFO 2024-10-24 17:23:09,575 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:00:00.2550076 Zeile 1851950: INFO 2024-10-24 18:31:05,531 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:41:05.4296295 Zeile 1852244: INFO 2024-10-24 19:11:02,153 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:39:56.1472462 Zeile 1852406: INFO 2024-10-24 20:49:27,486 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 01:38:24.9894062 Zeile 1852458: INFO 2024-10-24 20:49:34,148 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:00:00.9459476 Zeile 1852636: INFO 2024-10-24 21:21:06,632 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:01:30.9125136 Zeile 1852790: INFO 2024-10-24 21:21:15,577 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:00:08.9126134 [disabled the Plugin; but this is also no solution :-/ ] Zeile 1853720: INFO 2024-11-04 15:45:51,803 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:43:27.2038919 Zeile 1854160: INFO 2024-11-04 16:27:21,925 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:41:29.7430350 Zeile 1854321: INFO 2024-11-04 18:33:44,867 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 02:06:22.6285999 Zeile 1854473: INFO 2024-11-04 18:33:52,800 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 00:00:07.4349843 DEBUG 2024-11-04 16:27:34,614 [ VSTA_Main] Synchronizer.DataAccess.CalDavDataAccess . MoveNext - Exiting GetEntities. INFO 2024-11-04 16:27:39,222 [ VSTA_Main] onizer.Implementation.CalDavRepository`1 . MoveNext - Duration of 'CalDavRepository.Get (1 entitie(s))': 00:00:10.1842887 INFO 2024-11-04 16:27:39,238 [ VSTA_Main] nization.States.UpdateFromNewerToOlder`7 . Resolve - Considering '/remote.php/dav/calendars/username/arbeit/2a000005-d95b-4632-acd2-9fdb8c956667.ics' (modified at '') newer than '000000003E7B331A96E0000005EF0800060D9B1807000FE12BAF3AC1D311A5E70800060D9B180000008BE372000092C1A5DF23C0694C89980F075CF4BF0F0003A7F6C1AC0000' (modified at '24.10.2024 19:31:55'). WARN 2024-11-04 16:27:39,693 [ VSTA_Main] .Implementation.Events.EventEntityMapper . CreateMailUriOrNull - Invalid email address URI mailto:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIB00000SPDLT)/cn=Recipients/cn=d18ecfd66873446c90000025ac5b6f15-Abcdefg.Hij for attendee. WARN 2024-11-04 16:27:39,979 [ VSTA_Main] .Implementation.Events.EventEntityMapper . CreateMailUriOrNull - Invalid email address URI mailto:/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIB00000SPDLT)/cn=Recipients/cn=69149985d90849b6a00000d56e2af0ba-TS-EU_klmno for attendee. INFO 2024-11-04 18:33:44,852 [ VSTA_Main] GenSync.Synchronization.Synchronizer`11 . MoveNext - A repository jobs: Create 0 , Update 1 , Delete 0 INFO 2024-11-04 18:33:44,852 [ VSTA_Main] GenSync.Synchronization.Synchronizer`11 . MoveNext - B repository jobs: Create 0 , Update 0 , Delete 0 DEBUG 2024-11-04 18:33:44,867 [ VSTA_Main] GenSync.Synchronization.Synchronizer`11 . MoveNext - Exiting. INFO 2024-11-04 18:33:44,867 [ VSTA_Main] .Scheduling.SynchronizationProfileRunner . MoveNext - Duration of 'Running synchronization profile 'Kalender'': 02:06:22.6285999 ``` log.txt is logging since years in debug, size around 460MiB. May this impacts performance also?! In the long running reports the "Invalid email address" line is repeating a couple of times (10th to 100th times) every 10-60secs. Still blaming about the same Recipients.
Author
Owner

@scroguard commented on GitHub (Dec 3, 2025):

i too am experiencing this issue. the only way to get outlook to update when this occurs is to exit and re-open it. however, once the program attempts to sync the calendars again, outlook will stop receiving e-mail.

strange thing is the status window shows a green check mark next to all the the sync profiles.

<!-- gh-comment-id:3604598684 --> @scroguard commented on GitHub (Dec 3, 2025): i too am experiencing this issue. the only way to get outlook to update when this occurs is to exit and re-open it. however, once the program attempts to sync the calendars again, outlook will stop receiving e-mail. strange thing is the status window shows a green check mark next to all the the sync profiles.
Author
Owner

@scroguard commented on GitHub (Dec 3, 2025):

ok, i have a little more information on this issue now. i'm watching the status window and even though i have the synchronization interval set to 30 minutes, it appears that the sync keeps restarting on a couple of the calendars. it appears that these calendars get caught in an endless loop, which apparently ties up outlook and prevents it from being able to move on to keeping the inbox in sync. i have recorded a screen capture of the sync status window to show what is occuring:

https://github.com/user-attachments/assets/efcb59e3-aacc-4b8a-b933-2a27aa1ae862

looking over the log file, i do not see any errors.

<!-- gh-comment-id:3604615536 --> @scroguard commented on GitHub (Dec 3, 2025): ok, i have a little more information on this issue now. i'm watching the status window and even though i have the synchronization interval set to 30 minutes, it appears that the sync keeps restarting on a couple of the calendars. it appears that these calendars get caught in an endless loop, which apparently ties up outlook and prevents it from being able to move on to keeping the inbox in sync. i have recorded a screen capture of the sync status window to show what is occuring: https://github.com/user-attachments/assets/efcb59e3-aacc-4b8a-b933-2a27aa1ae862 looking over the log file, i do not see any errors.
Author
Owner

@GregorB54321 commented on GitHub (Dec 3, 2025):

It maybe is related to unresolvable recipients via IMAP / Exchange... (just a suspicion)

<!-- gh-comment-id:3608467649 --> @GregorB54321 commented on GitHub (Dec 3, 2025): It maybe is related to unresolvable recipients via IMAP / Exchange... (just a suspicion)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/outlookcaldavsynchronizer#325
No description provided.