Error when activating form

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

Error when activating form
 
Fabrice Durieu




Posts: 135
Joined: 2010-12-13
Hello

I've a strange error that occur very rarely, but maybe you've an idea why.
I've a panel placed in the reading panel area, which means it share the area with the standard outlook reading panel.
Our reading panel is used as a preview for our items, which are listed in a panel right docked. When the user click on an item in the right docked panel, an event is raised, caught in our reading panel, and the code call "Activate()" to bring our reading panel in front of the user (so the standard outlook reading panel is not visible anymore, replaced by our reading panel).

When calling Activate() sometime this exception is raised:

2018-11-21 09:08:56.7906|ERROR|1|Outlook|Error on thread 1 System.NullReferenceException: Object reference not set to an instance of an object.
   at AddinExpress.Extensions.ADXForm.InitFormParamStructure()
   at AddinExpress.Extensions.ADXForm.Activate()
   at MyCode.frmReadingPane.ReadingPanel_Activate(Object sender, EventArgs e) in ...rmReadingPane.cs:line 95
   at MyCode.EventExtension.RaiseEvent(EventHandler handler, Object sender) in ...EventExtension.cs:line 54


Any idea ?

I cannot reproduce this error on demand, it just sometime happen and then we need to restart Outlook to have a working reading panel.

This log is done on a version running ADX v8.0.4330.2005

Thank you
Fabrice
-------------
Posted 21 Nov, 2018 04:32:38 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Hello Fabrice,

Can you send us some code demonstrating what you do? Alternatively, we can access your machine remotely to look in the code.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Nov, 2018 04:24:27 Top
Fabrice




Posts: 135
Joined: 2010-12-13
I sent code sample on the support email address.
-------------
Posted 23 Nov, 2018 06:18:36 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Thank you, Fabrice.

private void ReadingPanel_Activate(object sender, EventArgs e)
        {
            try
            {
                this.Activate();


Will it solve the issue if comment out this.Activate() in the code above?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Nov, 2018 07:27:52 Top
Fabrice




Posts: 135
Joined: 2010-12-13
Yes it'll "solve" the problem as the error is throw by this method, but then we'll not have the functionality anymore.
-------------
Posted 23 Nov, 2018 07:51:06 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
Hello Fabrice,

My apologies for the delayed response; I guess I had overlooked your post.

To help you with this issue, we would need to understand the situation. Your code doesn't look logical or we miss something. Please let us access the code or create a project reproducing this behavior.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Nov, 2018 04:51:05 Top
Fabrice




Posts: 135
Joined: 2010-12-13
Hello Andrei,
Could you tell me what you didn't understood ? I previously sent on support a video showing the functionality implemented. The ADX panel is under the outlook preview panel, and calling "Activate" bring the ADX panel in front.
-------------
Posted 30 Nov, 2018 05:18:57 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
We don't understand what causes the issue and we don't have a good guess. The piece of code you sent us leaves room for interpretation. This prevents us from suggesting a way out of this.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Nov, 2018 06:55:07 Top
Fabrice




Posts: 135
Joined: 2010-12-13
I'll try to make a demo add-in to show you why it's used like this, but currently I don't have much time. As it's a quite rare problem it could wait a bit :)
-------------
Posted 05 Dec, 2018 12:25:03 Top
Andrei Smolin


Add-in Express team


Posts: 16223
Joined: 2006-05-11
No problem.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Dec, 2018 05:55:18 Top