Region not loaded - not reproducable

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

Region not loaded - not reproducable
 
This forum has moved to a new location. From now on, please post all your questions about Add-in Express Regions on .NET and VSTO forum.
Daniel Ranft




Posts: 14
Joined: 2012-09-13
Hi,

we have a little problem with one of our regions (a Compose-Inspector TopSubPane).
On some computers it disappears after some hours work and will not be loaded again, until restarting outlook.
Also strage: It disappears only for the "first" inspector, when this first inspector is opened, and a second one is opened, the second shows the region. closing both and opening 2+ inspectors again, the first doesn't show it again.

The bug seems not to be reproducable in a normal way, and we also discovered our source-code a lot of times. We cannot find the issue, so we think, that this is maybe a bug of ADX.

Any ideas?

Regards,
Daniel
Posted 04 Oct, 2012 01:15:27 Top
Andrei Smolin


Add-in Express team


Posts: 18982
Joined: 2006-05-11
Hello Daniel,

This may be a bug in the code of Add-in Express. To find this out, we will try to reproduce this issue. Please provide more information:

- Outlook version, service pack and bitness
- AddinExpress.Outlook.Regions.dll version
- how do you open inspectors?
- are other COM add-ins turned off?
- do you modify these properties and/or call these methods in your code:
1) ADXOlFormsCollectionItem.Enabled
2) ADXOlForm.Visible, ADXOlForm.Show(), ADXOlForm.Hide()
- do you cancel the ADXOlFormsCollectionItem.ADXBeforeFormInstanceCreate event in your code?


Andrei Smolin
Add-in Express Team Leader
Posted 04 Oct, 2012 05:33:46 Top
Daniel Ranft




Posts: 14
Joined: 2012-09-13
- Outlook version, service pack and bitness
Versions are 14.0.6132.5001 and 14.0.6025.1000 (First release, and SP1 i think), bitness is mixed
- AddinExpress.Outlook.Regions.dll version
1.2.1250.2010 - we will try it also with 2.0 in a few days
- how do you open inspectors?
by user-input (new e-mail, reply, forward...)
- are other COM add-ins turned off?
no other com-addins are active. We tried it with an auto-it script in a clean enviroment
- do you modify these properties and/or call these methods in your code:
1) ADXOlFormsCollectionItem.Enabled
no (no reading access, no writing access)
2) ADXOlForm.Visible, ADXOlForm.Show(), ADXOlForm.Hide()
Visible: read, Show() / Hide(): yes, but the method, which calls Show() and Hide(), is not entered, when the bug appears (we looked at the log files, where each call of this method is logged)
- do you cancel the ADXOlFormsCollectionItem.ADXBeforeFormInstanceCre ate event in your code?
no, we just log the call

Additional info: BeforeFormInstanceCre ate event is not called after the issue appears (until outlook restart).
Posted 04 Oct, 2012 06:55:16 Top
Andrei Smolin


Add-in Express team


Posts: 18982
Joined: 2006-05-11
Daniel,

We cannot reproduce this issue with a sample form. Can you please send me the following code fragments from that form:

- all class-level declarations
- the InitializeComponent() method

Please send them to the support email address; you can find it in readme.txt.

Thank you in advance.


Andrei Smolin
Add-in Express Team Leader
Posted 04 Oct, 2012 07:56:37 Top
Andrei Smolin


Add-in Express team


Posts: 18982
Joined: 2006-05-11
Hi Daniel,

Thank you for sending me the code. I've been unable to reproduce the issue with your code as well. Nevertheless, I suppose the issue can relate to unreleased COM objects in your code.

MailItem currentItem = (InspectorObj as Inspector).CurrentItem as MailItem;


If you form is created for mail items only, the code line above is safe. If however, your form is also shown e.g. for an appointment, the COM object created by Inspector.CurrentItem is left unreleased.

m_MailWrapper.MailItem = currentItem;


Please make sure that MailWrapper releases the COM object e.g. in its Dispose() method. I cannot see other code but I strongly suggest that you pay special attention to releasing COM objects as this is the usual cause of many, many problems in Outlook add-ins.

Also, I'd suggest that you call the Inint method in the ADXBeforeFormShow event; it occurs just before the form is shown. Using the timer isn't required in this case.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Oct, 2012 08:14:54 Top
Daniel Ranft




Posts: 14
Joined: 2012-09-13
Thanks for the hint with ADXBeforeFormShow :)

We try to find unreleased com objects now.
Posted 05 Oct, 2012 08:25:38 Top
Andrei Smolin


Add-in Express team


Posts: 18982
Joined: 2006-05-11
You can find some useful suggestions on releasing COM objects at http://www.add-in-express.com/creating-addins-blog/2008/10/30/releasing-office-objects-net/.

Please let me know about your results.


Andrei Smolin
Add-in Express Team Leader
Posted 05 Oct, 2012 08:29:20 Top
Daniel Ranft




Posts: 14
Joined: 2012-09-13
We have released nearly all com objects now - results will follow after a while (the bug was rare, so we want to wait, before we define it as fixed)

Many Thanks for the good help :)
Daniel
Posted 10 Oct, 2012 02:23:41 Top
Andrei Smolin


Add-in Express team


Posts: 18982
Joined: 2006-05-11
(fingers crossed)


Andrei Smolin
Add-in Express Team Leader
Posted 10 Oct, 2012 02:56:36 Top