Intermittent lockup on startup of App

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

Intermittent lockup on startup of App
Debugging Suggesstions 
George Spears




Posts: 79
Joined: 2010-05-06
Hello,

Delphi 2010, Windows 7 64 bit Pro
I have written an app which is a plug-in for both Excel and Word. Approx 1 time out of 15, the Excel or Word will lock up on startup. It will then disable my plug-in (or at least ask me if I want to disable the offending plug in...). It is not related to opening a specific document. I cancel out of the startup, and turn right around and click on the same doc again, and everything starts up fine. I realize there is some documentation in the guide about debugging. I am just looking for any thing else...

I have not added any INITIALIZATION code to my project. The only method I have on my AddInModule is OnAddInStartupComplete.

Any suggestions that come to mind? Is there any place where code could be running PRIOR to OnAddInStarupComplete?
Posted 28 Feb, 2012 07:44:05 Top
Dmitry Kostochko


Add-in Express team


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

Thank you for the detailed description. I cannot tell you the exact reason of this behavior, please see my comments below.

Any suggestions that come to mind?


I think this issue may be caused by showing some dialog box (e.g. ShowMessage). The dialog box window may be shown under the Excel/Word splash screen. Please try to move the splash screen using the mouse when you run into the "lockup" issue again.

Is there any place where code could be running PRIOR to OnAddInStarupComplete?


The code of the initialization sections of all included units is executed first. Then, the OnCreate and OnAddinInitialize event handlers are executed. And after that comes the OnAddInStarupComplete event handler.
Posted 28 Feb, 2012 10:14:35 Top
George Spears




Posts: 79
Joined: 2010-05-06
I have checked, and I don't have any messages that are being shown. In fact, when it locked up, I can't even move the locked up Excel box.

Let me ask this, when I have a pane (in Excel), it appears to be that it is always autocreated. Can I specify NOT to create the pane, but create it when asked by my plug-in menu option? In other words, when I am writing a standalone app, I can add a form. That form is autocreated, unless I go into my Project|Options and specify that I will manually create that form as needed. Is there anything similar for Panes?

Thanks
George S
Posted 04 Mar, 2012 14:05:46 Top
Dmitry Kostochko


Add-in Express team


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

Really interesting issue. May I ask you to send your project (or some demo project with the same behavior) to me for testing? You can find our support email address in the readme.txt file located in the Add-in Express installation folder.

As for your second question, you can use the OnADXBeforeTaskPaneInstanceCreate event of the TadxExcelTaskPanesManager component and set the Args.Cancel property to True to prevent creation of your advanced task pane.
Posted 05 Mar, 2012 11:23:38 Top