Strange log entry

Add-in Express™ Support Service
That's what is more important than anything else

Strange log entry
The log file produced by my add-in contains what looks like an Add-in Express log file. 
Mike VE




Posts: 168
Joined: 2007-09-09
My add-in produces a log file, ACalLog.txt. For convenience it is created in My Documents\Add-in Express so it is with the ADX Registrator and Loader logs.

The start of a typical ACalLog.txt is shown below the stars.
********************************************

ACal4 Log file: Wednesday, 20 January 2016 15:18

-----------------------------------------------------------
ACal4 (4.0.11.4)
Outlook 2013 (64 bit)
Win 10 Pro (64 bit)
Culture: en-GB
Data folder: C:\Users\Mike\AppData\Roaming\Greenhill Software\ACal
Log folder: C:\Users\Mike\Documents\Add-in Express

User domain: CHILLBLAST8
IPDomain: not returned
Windows default printer: CutePDF Writer


3:18:06 PM In AddinModule.StatupComplete
3:18:08 PM In clsLicence.New
3:18:08 PM In CheckForLocallyHeldLicenceDetails
3:18:08 PM In clsLicence.ReadLicenceformRegistry

**********************************************************

However, a user has reported a problem in that he installed the add-in on a Surface, the ribbon shows but none of the buttons seem to do anything. He attached the ACalLog.txt file. I show the start of it below:

*********************************************************
System Info:
===========

AdditionalVersionIdentifier:
Start Time: 19/01/2016 8:42:19 AM
Standard: AddinExpress.OL.2005, Version=8.0.4330.2005, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8
Outlook version: 16.0.0.6366
Registered message WM_ADX_TEST=49842
Registered message WM_ADX_SEARCH_WINDOW_ENGINE_HIDE=49843
Registered message WM_ADX_SEARCH_WINDOW_ENGINE_SHOW=49844
Registered message WM_ADXDELETEEMULATEWINDOW=49845
Registered message WM_ADX_WINDOW_ENGINE_HIDE=49846
Registered message WM_ADX_WORDEDITOR_HIDE=49847
Registered message WM_REMOVECONTROLLEDRESIZEWINDOW=49848
Registered message WM_NET_ShowChildWindowMessage=49849
Registered message WM_ADX_NeedRefreshFoldersMessage=49850
Registered message WM_ADX_CLOSE_SERVICE_FORM_FOR_NOT_WORD_INSPECTOR=49851
Registered message WM_ADX_CLOSE_SUPERGRID_SERVICE_FORM=49852
Registered message WM_ADX_CLOSE_READINGPANE_SERVICE_FORM=49853
Registered message WM_INFORMTOSHOWDOCKLAYOUT=49854
Registered message WM_ADX_ADDSEARCHENGINE=49855
Registered message WM_ADX_DESTROY_EMBEDED_WINDOW=49856
Registered message WM_ADX_READING_PANE_HIDE_FROM_SBCLS=49857
Registered message WM_ADX_READING_PANE_SHOW=49858
Registered message WM_ADX_READING_PANE_HIDE=49859
Registered message WM_ADXDELPROC=49860
Registered message WM_ADXSETOLDPROC=49861
Registered message WM_ADXSETNEWPROC=49862
Registered message WM_ADXGETCONTAINERFORM=49863
Registered message WM_ADXADDFORM=49864
Registered message WM_ADXDELETEFORM=49865
Registered message WM_ADXSETCONTAINER=49866
Registered message WM_ADXGETAPPWINDOWPOS=49867
Registered message WM_ADXGETREGIONPARAM=49868
Registered message WM_ADXGETREGIONSIZE=49869
Registered message WM_ADXSETREGIONPARAM=49870
Registered message WM_ADXUPDATEFORMPARAM=49871
Registered message WM_ADXSETMAINPOS=49872
Registered message WM_ADXCLOSEAPPWINDOW=49873
Registered message WM_ADXSETLATESTPROC=49874
Registered message WM_ADXEXIST=49875
Registered message WM_ADXEXISTLAYOUT=49876
Registered message WM_ADXEXISTSERVICEFORM=49877
Registered message WM_ADXWMIGETCONTROL=49878
Registered message WM_ADXWMIPOSCHANGE=49879
Registered message WM_ADXWMISETPOS=49880
Registered message WM_ADXCOMMAND=49881
Registered message WM_ADXMANAGERCOMMAND=49882
Registered message WM_ADXMOUSELEAVE=49883
Registered message WM_MSO_BROADCASTCHANGE=49557
Registered message WM_ADXSETACTIVATE=49884
Registered message WM_ADXGETTYPESUBCLASS=49885
Registered message WM_ADXCLOSEBUTTONCLICK=49886
Registered message WM_ADXHIDEALLREGIONFORMS=49887
Registered message WM_ADXGETPICTURE=49888
Registered message WM_ADXSUPPORTMINIMIZE=49889
Registered message WM_ADXCONTAINERSHOWFLOATING=49890
Registered message WM_ADXCONTAINERHIDEFLOATING=49891
Registered message WM_ADXSHOWFLOATING=49892
Registered message WM_ADXHIDEFLOATING=49893
Registered message WM_ADXSETFLOATINGPOS=49894
Registered message WM_ADXGETDRAGLAYOUTPARAMS=49895
Registered message WM_ADXSETDRAGFORM=49896
Registered message WM_ADXSETDRAGITEMS=49897
Registered message WM_ADXGETFORMDEFAULTSIZE=49898
Registered message WM_ADXDRAGOVERMINIMIZED=49899
Registered message WM_ADXREDESIGNSUPPORT=49900
Registered message WM_ADXUPDATECLIPREGION=49901
Registered message WM_ADXCTP_VISIBLECHANGED=49902
Registered message WM_ADXMAYBEWORDVIEWWASCHANGED=49903
Registered message WM_ADXSTARTTRANSACTION=49904
Registered message WM_ADXENDTRANSACTION=49905
Registered message WM_ADXSWAPCONTROLLER=49906
Registered message WM_ADXCONTAINERREFRESH=49907
Registered message WM_ADXGETCAPTION=49908
Registered message WM_ADXHOSTVISIBLE=49909
Registered message WM_ADX_GET_ACTUAL_INSPECTORS_COUNT=49910
Registered message WM_ADX_UPDATE_LATEST_KNOWN_INSPECTORS_COUNT=49911
Registered message WM_ADX_FIND_OUTSIDE_INSPECTOR=49912
SocialConnectorAddin state = Active
Registered message WM_ADX_NAVIGATION_PANE_SHOW=49913
Registered message WM_ADX_NAVIGATION_PANE_HIDE=49915
Registered message WM_ADX_NAVIGATION_PANE_MINIMIZE=49916
Registered message WM_NET_MoveReadingPaneWindowMessage=49926
Exceptions:
===========

ADXOlFormsManager.DoExplorerFormShow: Object reference not set to an instance of an object.
Exception time: 19/01/2016 11:44:25 AM
at ACal4.ADXOlFormTemplateListViewHeader.ADXOlFormTemplateListViewHeader_ADXBeforeFormShow() in C:\VS Projects\Outlook Add-ins\ACal4\ACal4\ADXOlFormTemplateListViewHeader.vb:line 17
at AddinExpress.OL.ADXOlForm.AdxOlShow(AppWindowProperty appWindowProperty, Boolean raiseEvents)
at AddinExpress.OL.ADXOlFormsManager.DoExplorerFormShow(ADXOlFormsCollectionItem Item, ADXOlExplorerArguments ExplorerArgs)

AddinExpress.OL.ADXOlFormsManager error: Object reference not set to an instance of an object.
Exception time: 19/01/2016 11:59:06 AM

AddinExpress.OL.ADXOlFormsManager error: Object reference not set to an instance of an object.
Error occured in ADXOlFormsManager.DoExplorerFormShow . See 'Details' section to get more detailed information about the error.
Detailed technical information follows:
---
Date and Time: 19/01/2016 11:44:25 AM
Machine Name: SURFACE-006
IP Address: 127.0.0.1
Current User: SURFACE-006\johnk_000

Application Domain: C:\Program Files (x86)\Greenhill Software\Academic Calendar 4\
Assembly Codebase: file:///C:/Program Files (x86)/Greenhill Software/Academic Calendar 4/ACal4.DLL
Assembly Full Name: ACal4, Version=4.0.11.4, Culture=neutral, PublicKeyToken=d0aae075ebf256e1
Assembly Version: 4.0.11.4
Assembly Build Date: 11/01/2016 8:56:32 AM

Exception Source: ACal4
Exception Type: System.NullReferenceException
Exception Message: Object reference not set to an instance of an object.
Exception Target Site: ADXOlFormTemplateListViewHeader_ADXBeforeFormShow

---- Stack Trace ----
ACal4.ADXOlFormTemplateListViewHeader.ADXOlFormTemplateListViewHeader_ADXBeforeFormShow()
ADXOlFormTemplateListViewHeader.vb: line 0017, col 09, IL 0000 (0x0)
AddinExpress.OL.ADXOlForm.AdxOlShow(appWindowProperty As AppWindowProperty, raiseEvents As Boolean)
AddinExpress.OL.2005.DLL: N 0204 (0xCC) IL
AddinExpress.OL.ADXOlFormsManager.DoExplorerFormShow(Item As ADXOlFormsCollectionItem, ExplorerArgs As ADXOlExplorerArguments)
AddinExpress.OL.2005.DLL: N 0513 (0x201) IL




Log:
===========

19/01/2016 11:59:17 AM 1 ------
19/01/2016 11:59:17 AM 1 ------{-Event IExplorerEvents.Deactivate
19/01/2016 11:59:17 AM 1 ------{+Event IExplorerEvents.Deactivate
19/01/2016 11:59:17 AM 1 ------
19/01/2016 11:59:16 AM 1 ------
19/01/2016 11:59:16 AM 1 ------{-Event IExplorerEvents.Activate
19/01/2016 11:59:16 AM 1 --------DoExplorerActivate
19/01/2016 11:59:16 AM 1 --------OlExplorerEvents_BaseLogic.DoExplorerActivate
19/01/2016 11:59:16 AM 1 ------{+Event IExplorerEvents.Activate
19/01/2016 11:59:16 AM 1 ------

**************************************

This is not the message produced by my code yet it is in my log file.

My log file is created by code that is the first thin to run in the AddinStartupComplete event.
The line
AddinUtils.Init(OutlookApp, My.Application.Info)
initialises the constructor for a static class, passing in references to the Outlook application and to the Add-in Module.
The code for the constructor is below.
public static void Init(_Application olApp, AssemblyInfo addinInfo)
{
// This sub ensures that the constituent classes of AddinUtils are initiated in the right order
ErrorHandler.Initit(olApp);
Info.Init(olApp, addinInfo);
Log.Init();
Printer.InitialWindowsDefaultPrinter = Printer.CurrentWindowsDefaultPrinterName;
}
ErrorHander, Info, Log and Printer are also static classes looking after various utility functions.


I noticed that the log contains an error message from ACal4.ADXOlFormTemplateListViewHeader.ADXOlFormTemplateListViewHeader_ADXBeforeFormShow().
This event should occur when the user clicks a ribbon button to show a custom view of the Calendar folder. There exception is "Object reference not set to an instance of an object." The stack trace refers to line 17 and this line is
If olApp.ActiveExplorer.CurrentFolder.Name = "AcademicCalendarTemplates" Then


I have been unable to recreate this problem and have told the user to reinstall, hoping that it is an install problem.

Any thoughts as to what is going on?
Posted 20 Jan, 2016 12:16:25 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Mike,

This is not the message produced by my code yet it is in my log file.


It is the full information from the Add-in Express dialog that is displayed for the user when an unhandled exception occurs in the code. Probably your customer clicked the Show Log button, saved the full contents as ACalLog.txt file and sent it to you. You can see our dialog yourself by throwing an exception, e.g:

private void ADXOlForm1_ADXBeforeFormShow()
{
    throw new Exception("test");
    //...
}


I noticed that the log contains an error message from ACal4.ADXOlFormTemplateListViewHeader.ADXOlFormTemplateListViewHeader_ADXBeforeFormShow(). This event should occur when the user clicks a ribbon button to show a custom view of the Calendar folder. There exception is "Object reference not set to an instance of an object." The stack trace refers to line 17 and this line is If olApp.ActiveExplorer.CurrentFolder.Name = "AcademicCalendarTemplates" Then


I would suggest that you split this code line and check ActiveExplorer and CurrentFolder for Nothing.
Posted 21 Jan, 2016 05:57:31 Top
Mike VE




Posts: 168
Joined: 2007-09-09
Yes that makes sense. Thanks.
Posted 02 Feb, 2016 10:00:31 Top