Posts 1 - 10 of 18
First | Prev. | 1 2 | Next | Last
|
|
Peter Marshall
Posts: 14
Joined: 2016-04-18
|
Back in April we noticed a problem where ADXOlForm objects were being re-used for new emails, which was causing us problems on a single pc (https://www.add-in-express.com/forum/read.php?FID=5&TID=13821).
This issue was addressed within the 3.2.2420.2010 release, so yesterday I upgraded to this version but we are suddenly getting a number of strange issues with the behaviour, which we weren't seeing on the prior version - in priority order - the first is critical to us as it breaks the functionality of our addin.
1) When creating a new email, we have code that uses the InspectorObj to look for some UserProperties on the MailItem to determine what to show in the region (effectively it's details to associate the email with a specific document in our application). What I have noticed is that *sometimes* the InspectorObj is valid, and can be cast to an Outlook.Inspector but then the CurrentItem has no user properties and won't case to an Outlook.MailItem.
This is happening intermittently (i.e. I can create 3 emails, and it will only occur on the middle one). Debugging the other side of the code where we create the mail item via com, the user properties have been set on the email and the email saved prior to the email being displayed.
This is causing major functionality issues for our addin and was working before the upgrade.
2) We have an Explorer panel which was using ADXOlExplorerLayout.DockBottom as the default position, and had following allowed positions:
ADXOlMainContentHostItem.ExplorerAllowedDropRegions = ADXOlExplorerAllowedDropRegions.DockTop |
ADXOlExplorerAllowedDropRegions.DockBottom |
ADXOlExplorerAllowedDropRegions.DockLeft |
ADXOlExplorerAllowedDropRegions.DockRight |
ADXOlExplorerAllowedDropRegions.TopReadingPane |
ADXOlExplorerAllowedDropRegions.TopSubpane |
ADXOlExplorerAllowedDropRegions.BottomNavigationPane |
ADXOlExplorerAllowedDropRegions.BottomReadingPane |
ADXOlExplorerAllowedDropRegions.BottomSubpane |
ADXOlExplorerAllowedDropRegions.BottomTodoBar |
ADXOlExplorerAllowedDropRegions.FolderView |
ADXOlExplorerAllowedDropRegions.LeftReadingPane |
ADXOlExplorerAllowedDropRegions.LeftSubpane |
ADXOlExplorerAllowedDropRegions.ReadingPane |
ADXOlExplorerAllowedDropRegions.RightReadingPane |
ADXOlExplorerAllowedDropRegions.RightSubpane |
ADXOlExplorerAllowedDropRegions.Unknown;
Now if it is set to any of the "Dock" locations, we get an error on startup about being unable to create the ActiveX object. I've temporarily got rid of this by clearing the settings, and setting the default to BottomReadingPane, but we do need the ability to Dock the region.
Any Suggestions, particularly around the first problem.
Peter |
|
Posted 24 Jun, 2016 05:57:03
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18816
Joined: 2006-05-11
|
Hello Peter,
#1. Could you please create a small project for us to replicate the issue?
#2. Please create a new add-in project with a Dock region. Will the new add-in demonstrate the same issue?
Andrei Smolin
Add-in Express Team Leader |
|
Posted 24 Jun, 2016 09:45:06
|
|
Top
|
|
Peter Marshall
Posts: 14
Joined: 2016-04-18
|
RE 1)
I've been debugging the issue all day and got a bit further with point 1.
I modified one of the samples so rather than looking for the subject, it looks for our user property, so it was available as a separate Explorer and Inspector form. This showed the same behaviour, whereby when initially loaded it would not see the userproperty. However clicking the button would see the property.
So I then added the InspectorActivate event to the form with the problem to re-load the user properties at that stage. Having done that when I clicked the button on the modified sample (which is then seeing the updated properties), the main form was seeing the properties.
The last thing I did was add a timer to our addin with a 400ms delay, which does the same thing, and is started in the BeforeShow event. This does seem to alleviate the problem.
This problem is happening whenever an external application is creating a MailItem in outlook, and adding the properties to the new mailitem, saving the mail item, then calling Display() to trigger our addin. The delay might be the time it's taking for the external application to release the mailItem.
Ideally would like a way to mitigate this without the timer.
RE 2) I will give that a try and get back to you.
Thanks
Peter |
|
Posted 24 Jun, 2016 10:00:39
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18816
Joined: 2006-05-11
|
Hello Peter,
Re #1.
I suppose the issue is caused by your code which doesn't release all of the COM object it creates. Say, mailItem.UserProperties.Add(...) creates two COM objects:
- mailItem.UserProperties returns a COM collection to hold Userproperty objects related to this email
- UserProperties.Add returns a COM object which is a new UserProperty object
Your code should release all such COM objects. To deal with the COM objects above your code can be written in this way:
[CODE]Outlook.UserProperties userProperties = mailItem.UserProperties;
Outlook.UserProperty userProperty = userProperties.Add(...);
// use userProperty and userProperties
Marshal.ReleaseComObject(userProperty); userProperty = null;
Marshal.ReleaseComObject(userProperties); userProperties = null;
Hope this helps.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 27 Jun, 2016 03:38:09
|
|
Top
|
|
Peter Marshall
Posts: 14
Joined: 2016-04-18
|
We are still having problem 2, on site now (i.e. live with a customer) - when we got the problem initially it was only on a development machine with old versions of Addin express installed as well.
For some users after upgrading to using the latest version of our addin (which is built using 3.2.2420.2010 of Regions), when the Addin loads our Navigator Form doesn't show up - no exceptions, and the form has been added to the FormsManager correctly (from the debug logs).
Strangely unloading our addin then reloading within the same outlook session then the Navigator form does appear.
Unfortunately we can't reproduce this here any more, but on site they have addin's from other suppliers loaded, some of which *appear* to be using an older version of Addin express.
On install on a clean machine with no other addin's it works fine consistently. I am at the point of putting additional debug in our code at the moment, but the first pass is showing the form added the form manager correctly, and does load the second time - it only seems to happen on the initial load.
I have cleared out the VSTO cache files, to ensure that it has updated the cache as well.
Peter |
|
Posted 04 Aug, 2016 05:33:09
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18816
Joined: 2006-05-11
|
Hello Peter,
Please reinstall your add-in on that machine and send me adxregistrator.log. You can find the support email address in {Add-in Express installation folder}\readme.txt. Please make sure your email contains a link to this topic.
Andrei Smolin
Add-in Express Team Leader |
|
Posted 04 Aug, 2016 07:29:29
|
|
Top
|
|
Peter Marshall
Posts: 14
Joined: 2016-04-18
|
More debug in place - the Content Form (that inherits from AddinExpress.OL.ADXOlForm), is being constructed and is set to visible, but the panel simply isn't visible.
Added a button to the ribbon bar in outlook to change the visibility - the visibility of the form changes, but the ADXolFormsCollectionItem holding the collection doesn't appear.
Very odd.
Peter |
|
Posted 04 Aug, 2016 07:31:45
|
|
Top
|
|
Peter Marshall
Posts: 14
Joined: 2016-04-18
|
Any idea where I will find the Adxregistrator.log file, given that this is on a client machine, where our addin has been installed by our installer (i.e. the Addin-Express installer hasn't been run at all ).
I've been doing a disk search on my local machine and can't seem to find it anywhere ?
Actually i've found one for a different addin in C:\Users\Default\Documents\Add-in Express but that doesn't mention our addin at all (though i've just built the addin from Source).
Also we are using Regions for VSTO if that makes any difference.
Thanks
Peter |
|
Posted 04 Aug, 2016 07:59:15
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 18816
Joined: 2006-05-11
|
Ah, that was my fault: you are using Add-in Express Regions for VSTO, while adxregistrator.log is only created when using the full Add-in Express.
Is it possible that you deploy IntResource.dll along with other files of your add-in?
Peter Marshall writes:
Added a button to the ribbon bar in outlook to change the visibility - the visibility of the form changes, but the ADXolFormsCollectionItem holding the collection doesn't appear.
Could you pease let me see that code?
Andrei Smolin
Add-in Express Team Leader |
|
Posted 04 Aug, 2016 09:00:29
|
|
Top
|
|
Peter Marshall
Posts: 14
Joined: 2016-04-18
|
I've created a small Addin that is exhibiting very similar behavior - it defines 2 Explorer panels, but only 1 is appearing, and sent it through to the support email linking to this topic.
Hopefully this will help.
Peter |
|
Posted 08 Aug, 2016 03:40:41
|
|
Top
|
|
Posts 1 - 10 of 18
First | Prev. | 1 2 | Next | Last
|