QuantLib crashing JVM

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

QuantLib crashing JVM

Ken Anderson-2
I'm using QuantLib 3.12 under Mac OS X 10.4.6 with Java SWIG.  I  
occasionally get the following crash:

Thread 5 Crashed:
0   libQuantLibJNI.jnilib       0x06bc2710  
QuantLib::Observer::~Observer [not-in-charge]() + 140 (stl_algo.h:172)
1   libQuantLib-0.3.12.dylib    0x07a3643c  
QuantLib::VanillaOption::~VanillaOption [in-charge deleting]() + 132  
(vanillaoption.hpp:33)
2   libQuantLibJNI.jnilib       0x06ae5af8  
Java_org_quantlib_QuantLibJNI_delete_1VanillaOption + 120  
(sp_counted_base_gcc_ppc.hpp:165)
3   <<00000000>>        0x0441ff20 0 + 71434016
4   <<00000000>>        0x0441fca0 0 + 71433376
5   <<00000000>>        0x0441fa98 0 + 71432856
6   <<00000000>>        0x03f2f16c 0 + 66253164
7   libserver.dylib             0x95fb86fc jio_snprintf + 295316
8   libserver.dylib             0x95fb85a4 jio_snprintf + 294972
9   libserver.dylib             0x95fc72c4 JVM_FindPrimitiveClass + 6536
10  libserver.dylib             0x9604687c JVM_SupportsCX8 + 3184
11  <<00000000>>        0x0424c1ec 0 + 69517804
12  <<00000000>>        0x0424b98c 0 + 69515660
13  <<00000000>>        0x0442ed20 0 + 71494944
14  <<00000000>>        0x03fa6680 0 + 66741888
15  <<00000000>>        0x03f2f16c 0 + 66253164
16  libserver.dylib             0x95fb86fc jio_snprintf + 295316
17  libserver.dylib             0x95fb85a4 jio_snprintf + 294972
18  libserver.dylib             0x95fc35d8 JVM_StartThread + 2564
19  libserver.dylib             0x95fc34bc JVM_StartThread + 2280
20  libserver.dylib             0x95fc3444 JVM_StartThread + 2160
21  libserver.dylib             0x95fc32d8 JVM_StartThread + 1796
22  libserver.dylib             0x95f66c44 operator new(unsigned  
long) + 7348
23  libSystem.B.dylib           0x9002bc28 _pthread_body + 96

Does anyone have any idea what could be causing this?  If I re-run,  
it usually works fine.

Thanks in advance for any insight!

Ken


Reply | Threaded
Open this post in threaded view
|

Re: QuantLib crashing JVM

Luigi Ballabio
On Fri, 2006-10-13 at 16:06 -0400, Ken Anderson wrote:
> I'm using QuantLib 3.12 under Mac OS X 10.4.6 with Java SWIG.  I  
> occasionally get the following crash:
> [snipped]

Ken,
        I still haven't upgraded to 10.4 so I can't confirm it, but on 10.3
strange things happened if the library was compiled as a dynamic one.
Does compiling it as a static library solve the problem?

Later,
        Luigi


----------------------------------------

Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.




Reply | Threaded
Open this post in threaded view
|

Re: QuantLib crashing JVM

Ken Anderson-2
Luigi,

Honestly, I have no idea how I built these...it was a while ago!  How  
can I tell?  It looks like I have both:

-rw-r--r--   1 kanderso  admin  102461396 Apr 27 18:01  
libQuantLib-0.3.12.a
-rwxr-xr-x   1 kanderso  admin   72426484 Apr 27 18:01  
libQuantLib-0.3.12.dylib
lrwxr-xr-x   1 kanderso  admin         35 Apr 27 18:01 libQuantLib.a -
 > /usr/local/lib/libQuantLib-0.3.12.a
lrwxr-xr-x   1 kanderso  admin         24 Apr 27 18:01  
libQuantLib.dylib -> libQuantLib-0.3.12.dylib
-rwxr-xr-x   1 kanderso  admin        859 Apr 27 18:01 libQuantLib.la
-rwxr-xr-x   1 kanderso  admin    1384484 Apr 27 18:01  
libQuantLibFunctions-0.3.12.dylib
-rw-r--r--   1 kanderso  admin    1499436 Apr 27 18:01  
libQuantLibFunctions.a
lrwxr-xr-x   1 kanderso  admin         33 Apr 27 18:01  
libQuantLibFunctions.dylib -> libQuantLibFunctions-0.3.12.dylib
-rwxr-xr-x   1 kanderso  admin        922 Apr 27 18:01  
libQuantLibFunctions.la

Thanks for any tips,
Ken

On Oct 25, 2006, at 7:05 AM, Luigi Ballabio wrote:

> On Fri, 2006-10-13 at 16:06 -0400, Ken Anderson wrote:
>> I'm using QuantLib 3.12 under Mac OS X 10.4.6 with Java SWIG.  I
>> occasionally get the following crash:
>> [snipped]
>
> Ken,
> I still haven't upgraded to 10.4 so I can't confirm it, but on 10.3
> strange things happened if the library was compiled as a dynamic one.
> Does compiling it as a static library solve the problem?
>
> Later,
> Luigi
>
>
> ----------------------------------------
>
> Hanlon's Razor:
> Never attribute to malice that which is adequately explained
> by stupidity.
>
>



Reply | Threaded
Open this post in threaded view
|

Re: QuantLib crashing JVM

Luigi Ballabio
On Wed, 2006-10-25 at 10:26 -0400, Ken Anderson wrote:
> Honestly, I have no idea how I built these...it was a while ago!  How  
> can I tell?  It looks like I have both:

Try deleting (or moving somewhere else) the .dylib and .la, then
rebuilding the Java module (which, not finding the dynamic libraries,
should then link the static ones.)

Later,
        Luigi


----------------------------------------

Testing can never demonstrate the absence of errors in software, only
their presence.
-- W.E. Dijkstra




Reply | Threaded
Open this post in threaded view
|

dividend yield

Dave Yao
In reply to this post by Ken Anderson-2
Hello:

How do I set up dividend when testing using EquityOption example.
For instance, IBM has 0.30 in Nov06, Dec06 and Jan07, 0.60 in Apr07, 1.5 in Jan08, 2.7 in Jan09, how do I convert to use dividendYield to setup Handle<YieldTermStructure> flatDividendTS as in the EquityOption example? Say, to find  american call of Nov06, what dividendYield should I use? What should I use for Apr07? This is a simple question, but I can't find quick answer without looking at the code.

Thanks,

David Yao


Reply | Threaded
Open this post in threaded view
|

Re: dividend yield

Luigi Ballabio
On Wed, 2006-10-25 at 13:57 -0500, Dave Yao wrote:
> How do I set up dividend when testing using EquityOption example.

You'll have to use classes that can handle discrete dividends, i.e., the
DividendVanillaOption class and the related pricing engines.

Later,
        Luigi


----------------------------------------

Anyone who says he can see through women is missing a lot.
-- Groucho Marx