Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Uncaught exception during compilation.
 Post subject: Uncaught exception during compilation. Post rating: 0   New post Posted: Sat 04 Feb, 2012, 09:42 

User rating: 0
Joined: Wed 18 May, 2011, 23:19
Posts: 8
Location: Czech Republic,
When I'm trying to compile a strategy, sometimes I see only Compiling message without Compilation Successful. In Java Console I found this error:

04.02.2012 09:35:32.421 SEVERE a.c ] Uncaught exception in [common-1-thread-6] thread: Java heap space
java.lang.OutOfMemoryError: Java heap space
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
at com.sun.crypto.provider.AESCipher.engineDoFinal(DashoA13*..)
at javax.crypto.Cipher.doFinal(DashoA13*..)
at com.dukascopy.dds2.greed.agent.a.a.a(Unknown Source)
at com.dukascopy.dds2.greed.agent.a.f$c.write(Unknown Source)
at com.dukascopy.dds2.greed.agent.a.f.u(Unknown Source)
at com.dukascopy.dds2.greed.agent.a.e.a(Unknown Source)
at com.dukascopy.dds2.greed.util.e.e(Unknown Source)
at com.dukascopy.dds2.greed.actions.CompileAndRunAction.uB(Unknown Source)
at com.dukascopy.dds2.greed.actions.c.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)

Usually when this happens, I'm not able to compile any strategy until JForex Client restart, then it is OK.

Tested on MacOS X 10.7.2, Java 1.6.0_29.


 
 Post subject: Re: Uncaught exception during compilation. Post rating: 0   New post Posted: Sat 04 Feb, 2012, 17:16 

User rating: 0
Joined: Wed 18 May, 2011, 23:19
Posts: 8
Location: Czech Republic,
Finally I found a small hack to prevent this, max heap size is set to 512MB, I increased it to 2GB in jnlp file:

<java version="1.6+" initial-heap-size="32m" max-heap-size="2048m"/>

Maybe it would be good to set it to at least 1GB by default.


 
 Post subject: Re: Uncaught exception during compilation. Post rating: 0   New post Posted: Tue 07 Feb, 2012, 09:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
It is not normal to have such used heap size. Have you checked if you have any memory leaks of any of your strategies? You can check it by attaching jvisualvm profiler to the hava application and then monitoring the heap size.


 
 Post subject: Re: Uncaught exception during compilation. Post rating: 0   New post Posted: Sat 11 Feb, 2012, 08:32 

User rating: 0
Joined: Wed 18 May, 2011, 23:19
Posts: 8
Location: Czech Republic,
I guess there is some memory leek in JForex client. In my code, I include most of strategy code using @Library directive with jar file that I build in Netbeans, and I accidentally added to this jar file one 137MB file, so final file was relatively big, and memory usage became bigger after every build/run (typically more than 1GB) and even clicking Collect button to call garbage collector didn't help much, probably some pieces from older builds are still referenced, and so not cleaned. I see this also now, when using smaller jar files (1-2MB), that memory usage is slowly increasing after every build.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com