Re: Excel 2007 crashes when closing(QuantLibXL.xla)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Excel 2007 crashes when closing(QuantLibXL.xla)

Piter Dias-3
Eric,

> 1) Start Excel 
> 2) Load C:\Program Files\QuantLibXL-0.9.6\framework\QuantLibXL.xla 
> 3) Invoke menu item QuantLibXL | Actions | Bootstrap Yield Curves 
> 4) Invoke menu item QuantLibXL | Open Workbook and browse to 
> InterestRateDerivitives\VanillaSwap.xls 
> 5) Confirm valid PV in range [VanillaSwap.xls]Pricing!$C$30 
> 6) Exit Excel 
> 7) When prompted to save changes, hold down Shift key (to suppress > subsequent 
> prompts) and click No 

The PV in range [VanillaSwap.xls]Pricing!$C$30 is not valid (know I have two problems ) but what trigged the error was something much simpler:

1) Load C:\Program Files\QuantLibXL-0.9.6\framework\QuantLibXL.xla from start-up menu
2) Exit Excel 

Inded I was able to close the spreadsheets but when Excel is really ready to close it crashes. humm Could be some of the classes loaded? May be changing QuantLibXL.xla in order to write log messages before doing anything else...

> - Compile QuantLibXL with configuration Debug 
> - Edit QuantLibXL.xla to load QuantLibXL-vc80-mt-sgd-0_9_5.xll 
> - Start Excel and attach the debugger 
> - Run the test above and if we're lucky you'll get a stack trace showing the 
> line of code on which the crash occurs 

I did it to QuantLibXL-vc90-mt-sgd-0_9_6 but no VC Express shows no line of code, just the same meaningless exception message.

First-chance exception at 0x108bb645 in EXCEL.EXE: 0xC0000005: Access violation reading location 0x108bb645.
Unhandled exception at 0x108bb645 in EXCEL.EXE: 0xC0000005: Access violation reading location 0x108bb645.

 However I can put some breakpoints if you give some tips. It worked well with qlxlversion, for example.
Do you have some places you recomend to put the breakpoints? Some classes or functions called when Excel closes.

Thanks a lot,




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Excel 2007 crashes when closing (QuantLibXL.xla)

Eric Ehlers-2
Hi Piter,

On Fri, September 12, 2008 02:09, Piter Dias wrote:
> The PV in range [VanillaSwap.xls]Pricing!$C$30 is not valid (know I have two
problems )

What value do you get exactly?  I get a PV of zero.  Do you get #NA?  If so,
please right click in the cell and select "Display Error" - what does that
say?

> but what trigged the error was something much simpler:
> 1) Load C:\Program Files\QuantLibXL-0.9.6\framework\QuantLibXL.xla from
start-up menu
> 2) Exit Excel

Good information.  So we're not relying on any specific functionality being
called.

> qlxlversion, for example.Do you have some places you recomend to put the
breakpoints? Some classes or functions called when Excel closes.

File qlxl\register\addin.cpp, function xlAutoClose().  But the fact that the
earlier crash did not produce a stack trace indicates that the crash is not
associated with a specific line of QLXL source code.  It could still relate to
memory corruption triggered by earlier misbehavior of the XLL.

An earlier version of QuantLibXL.xla crashed because of a stack overflow in
VBA code, in that case also the debugger never stopped in the XLL.

Frederik reports a crash using QuantLibXL-vc80-mt-s-0_9_6.xll only, no
QuantLibXL.xla, I'm unable to reproduce his results, are you?

For version 0.9.6, we changed the initialization of some global singletons.
Previously they were static variables with file scope, now they have been
moved into function init() in addin.cpp.  Maybe we broke something relating to
destruction of these structures.

Others report functions returning zero, or something like MINDOUBLE.  So far
I'm unable to recreate any of these problems.  I can only suggest that we all
continue to compare notes until something clicks.  Many thanks for your help.

Regards,
Eric

-------------------------
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
Distributed computing for pricing analytics - Use Microsoft Excel as a client
to the Grid


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Excel 2007 crashes when closing(QuantLibXL.xla)

Piter Dias-2
In reply to this post by Piter Dias-3
Eric,

> What value do you get exactly? I get a PV of zero. Do you get #NA? If so, 
> please right click in the cell and select "Display Error" - what does that 
> say? 

I get #Value in this cell and #Num in some others. Take a look at the attached image.

> File qlxl\register\addin.cpp, function xlAutoClose(). But the fact that the 
> earlier crash did not produce a stack trace indicates that the crash is not 
> associated with a specific line of QLXL source code. It could still relate > to 
> memory corruption triggered by earlier misbehavior of the XLL. 

You are right. The debug ended before the Excel exception.

> An earlier version of QuantLibXL.xla crashed because of a stack overflow in 
> VBA code, in that case also the debugger never stopped in the XLL. 

I make some test and the error is not in VBA itself.

> Frederik reports a crash using QuantLibXL-vc80-mt-s-0_9_6.xll only, no 
> QuantLibXL.xla, I'm unable to reproduce his results, are you? 

I can reproduce it. I open Excel, QuantLibXL-vc90-mt-sgd-0_9_6.xll, RelinkableHandles.xls or CmsCouponPricers.xls and close Excel in order to crash it. I only crashes if I open one of these spreadsheets.

In the other hand, if I coment those files in QuantLibXL.xla it doesn't crash. Nowadays my QuantLibXL.xla doesn't have these files and it is working without exception.

At RelinkableHandles.xls the formula =qlWorkbookPath(Trigger)&"\..\Data\XML\010_StartUp\010_RH\" returns #Name because of qlWorkbookPath, but it happens in the others startup spreadsheets too.

Any idea? I think we are almost there.

Regards,

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Excel.jpg (194K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Excel 2007 crashes when closing(QuantLibXL.xla)

Piter Dias-3
In reply to this post by Piter Dias-3
Eric,

> What value do you get exactly? I get a PV of zero. Do you get #NA? If so, 
> please right click in the cell and select "Display Error" - what does that 
> say? 

I get #Value in this cell and #Num in some others. Take a look at the attached image.

> File qlxl\register\addin.cpp, function xlAutoClose(). But the fact that the 
> earlier crash did not produce a stack trace indicates that the crash is not 
> associated with a specific line of QLXL source code. It could still relate > to 
> memory corruption triggered by earlier misbehavior of the XLL. 

You are right. The debug ended before the Excel exception.

> An earlier version of QuantLibXL.xla crashed because of a stack overflow in 
> VBA code, in that case also the debugger never stopped in the XLL. 

I make some test and the error is not in VBA itself.

> Frederik reports a crash using QuantLibXL-vc80-mt-s-0_9_6.xll only, no 
> QuantLibXL.xla, I'm unable to reproduce his results, are you? 

I can reproduce it. I open Excel, QuantLibXL-vc90-mt-sgd-0_9_6.xll, RelinkableHandles.xls or CmsCouponPricers.xls and close Excel in order to crash it. I only crashes if I open one of these spreadsheets.

In the other hand, if I coment those files in QuantLibXL.xla it doesn't crash. Nowadays my QuantLibXL.xla doesn't have these files and it is working without exception.

At RelinkableHandles.xls the formula =qlWorkbookPath(Trigger)&"\..\Data\XML\010_StartUp\010_RH\" returns #Name because of qlWorkbookPath, but it happens in the others startup spreadsheets too.

Any idea? I think we are almost there.

Regards,


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

Excel.jpg (194K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Excel 2007 crashes when closing(QuantLibXL.xla)

Eric Ehlers-2
In reply to this post by Piter Dias-3
Hi Piter, Hi Frederik,

On Sat, September 13, 2008 11:30, Piter Dias wrote:
> I can reproduce it. I open
> Excel, QuantLibXL-vc90-mt-sgd-0_9_6.xll, RelinkableHandles.xls
> or CmsCouponPricers.xls and close Excel in order to crash it.

I got the crash!!!  :-)

I'm investigating and I'll keep you posted.

Regards,
Eric
-------------------------
Eric Ehlers
nazcatech sprl | Brussels | http://www.nazcatech.be
Distributed computing for pricing analytics - Use Microsoft Excel as a client
to the Grid





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users