Excel crash UDF + RTD

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

Excel crash UDF + RTD
 
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
I did RTD server project. I use it by the UDF. There is a problem with Excel. If the file using my function is saved as xls Excel crash when opening the file. Do not crash on xlsx files.
What could be causing this?

Regards, Krzysztof Michalowski
Posted 22 Mar, 2012 02:58:35 Top
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
I investigated that when I turn off automatic sheet calculation Excel stop working after calculate sheet command. I can't find any relationship with file format.
Posted 22 Mar, 2012 04:07:26 Top
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
When I call RTD server without UDF problem still exists. I removed all logic from RTD server without success.
Posted 22 Mar, 2012 05:11:16 Top
Andrei Smolin


Add-in Express team


Posts: 15285
Joined: 2006-05-11
Hi Krzysztof,

Are you saying that a new empty RTD server produces the same issue? Please make sure that no Excel.exe is hanging in the Processes list of the Task Manager window.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2012 05:31:06 Top
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
I think that I have no luck with these components. Previously, I removed the logic of the existing add-in.
Now, when I try to recreate it from scratch there are errors after adding new methods. Maybe I do something wrong?
Here is video about errors:
http://www.youtube.com/watch?v=SmtILA_Mzyk&feature=youtu.be
Posted 22 Mar, 2012 06:31:19 Top
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
I tested my add-ins (UDF with RTD) on Excel 2003 and 2007 (Windows XP). Everything seems to be ok. I don't known why Excel 2010 (Windwos 7) crashes.
Posted 22 Mar, 2012 07:52:17 Top
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
Unfortunately on another worksheet with that function Excel 2003 also crashes ....
Posted 22 Mar, 2012 08:07:05 Top
Andrei Smolin


Add-in Express team


Posts: 15285
Joined: 2006-05-11
Thank you for the video. We reproduce this problem. A fix for this will be available in a future Add-in Express build. Here is a workaround.

After you generated the RTD server, you get the following code:

unit MyRtdServer_IMPL;

interface

uses
  SysUtils, Classes, ComServ, MyRtdServer_TLB, adxRTDServ, StdVcl;

type
  TcoMyRtdServer = class(TadxRTDServer, IcoMyRtdServer);

  TRTDServerModule = class(TadxXLRTDServerModule)
  private
  protected
  public
  end;

implementation

{$R *.dfm}

initialization
  TadxRTDFactory.Create(ComServer, TcoMyRtdServer, CLASS_coMyRtdServer, TRTDServerModule);

end.


Now, please edit it a little:

unit MyRtdServer_IMPL;

interface

uses
  SysUtils, Classes, ComServ, MyRtdServer_TLB, adxRTDServ, StdVcl;

type
  TcoMyRtdServer = class(TadxRTDServer, IcoMyRtdServer)
  end;

  TRTDServerModule = class(TadxXLRTDServerModule)
  private
  protected
  public
  end;

implementation

{$R *.dfm}

initialization
  TadxRTDFactory.Create(ComServer, TcoMyRtdServer, CLASS_coMyRtdServer, TRTDServerModule);

end.


Do you see? It's TcoMyRtdServer.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2012 08:26:21 Top
Krzysztof Michalowski




Posts: 18
Joined: 2012-02-17
Your workaround works. I found another similar problem. I will document it at evening.

My add-in still doesn't work. I splitted GUI, UDF and RTD server into three dlls. Without effect.

Regards, Krzysztof Michalowski
Posted 22 Mar, 2012 09:23:39 Top
Andrei Smolin


Add-in Express team


Posts: 15285
Joined: 2006-05-11
Krzysztof,

Can you send me your project (or any other project reproducing the issue) for testing?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Mar, 2012 10:29:52 Top