This project is read-only.
1
Vote

Getting "Error - Object reference not set to an instance of an object."

description

I LOVE this Outlook Add-in and am committed to continue using it, even with minor problems like this. I'm using it in Outlook 2007 on a Windows 7 64-bit PC.
 
I'm getting the error in the subject line above, but I can't reliably reproduce it. Perhaps I can experiment to be able to tell you when it happens. However, I looked in the OARDiag1000RC.log file and I hope it will tell you enough to know the
problem and solution. This is the entire OARDiag1000RC.log file:
 
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 12:53:46 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 1:28:41 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 2:46:06 PM

Source: OutlookAttachmentReminder
Message: Object reference not set to an instance of an object.

Stack: at OutlookAttachmentReminder.OutlookAttachmentReminderAddin.RemoveOARMenuBar()*************************

 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 2:46:07 PM

Source: OutlookAttachmentReminder
Message: Object reference not set to an instance of an object.

Stack: at OutlookAttachmentReminder.OutlookAttachmentReminderAddin.AddOARMenuBar()*************************

 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 2:46:07 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 2:59:11 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:17:12 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:17:22 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:29:59 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:32:41 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:39:00 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:43:33 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 3:59:58 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 4:21:02 PM

Source: OutlookAttachmentReminder
Message: Object reference not set to an instance of an object.

Stack: at OutlookAttachmentReminder.OutlookAttachmentReminderAddin.RemoveOARMenuBar()*************************

 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 4:21:03 PM

Source: OutlookAttachmentReminder
Message: Object reference not set to an instance of an object.

Stack: at OutlookAttachmentReminder.OutlookAttachmentReminderAddin.AddOARMenuBar()*************************

 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 4:21:03 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 4:21:22 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 4:46:52 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 4:56:36 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================
 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 5:08:12 PM

Source: OutlookAttachmentReminder
Message: Object reference not set to an instance of an object.

Stack: at OutlookAttachmentReminder.OutlookAttachmentReminderAddin.RemoveOARMenuBar()*************************

 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 5:08:13 PM

Source: OutlookAttachmentReminder
Message: Object reference not set to an instance of an object.

Stack: at OutlookAttachmentReminder.OutlookAttachmentReminderAddin.AddOARMenuBar()*************************

 

C:\Users\Stu\Documents\OARsFiles\OARDiag1000RC.log

7/7/2012 5:08:13 PM

Machine Name: HP-DV4I
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
UserName: Stu
Interactive Mode: True

=========================

comments

gouravdas wrote Jul 9, 2012 at 4:53 AM

Hello sb,

Thanks for reporting this. Though I don't have all the details I might require, but I know for sure what the cause is (after you described about gSyncIt).

If you look at the error log, you would see the error pops up in two functions (AddOARMenuBar and RemoveOARMenuBar) and hence you see the message twice. Since gSyncIt creates a non-window process of Outlook (background process), there are no existing Menu bars and hence the error in AddOARMenuBar and RemoveOARMenuBar. Now, I thought I had this condition covered. Here we check if we have an active window. Assumption is that if we have active window, we would have active menu bars as well.

try
        {
            Microsoft.Office.Interop.Outlook.Explorer activeExplorer = this.Application.ActiveExplorer();
            //bActiveWindowPresent = true;
        }
        catch
        {
            //bActiveWindowPresent = false;
            return;
        }
. But since this issue is occurring, I guess my assumption is wrong. I may also have to check for existence of Active Menu bars too. I got to reproduce the issue at my end to understand if my assumptions are valid this time around.

Please give me some time to debug this.

sb06794 wrote Jul 9, 2012 at 1:12 PM

Just so you know, I would be very happy to be your alpha tester for this bug. I've been an alpha tester many times and would very quickly give you the feedback you need. Since you don't run gSyncIt, maybe my helping you could save you time by eliminating the need for you to duplicate the problem on your end.
Stu

sb06794 wrote Aug 18, 2012 at 1:00 AM

Have you made any progress yet?

wrote Feb 14, 2013 at 2:02 AM