Problem cast MWBuiltInArray to MWNumericArray
Mostra commenti meno recenti
Hi,
I have trouble using the MCR with Java. I have a function that I call every 40 seconds that works fine for about 39 hours and suddenly I get this error message:
java.lang.ClassCastException: com.mathworks.toolbox.javabuilder.MWBuiltinArray cannot be cast to com.mathworks.toolbox.javabuilder.MWNumericArray
Every single time I try to access the function after it first failed I get the same message and after some more hours the whole software just stops.
This error appears when I try to access the output list of the function:
this.flag = ((MWNumericArray) output.get(0)).getDouble();
The value I try to access is initialized at 0 and under certain circumstance can become 1. No other value is possible.
My function usually takes 1000ms-ish to process but when it first fails it lasted for around 500~600ms and then it seems it doesn't go to the function anymore as it spends less than 1ms in it.
Does anyone have an idea why would that be?
2 Commenti
Walter Roberson
il 26 Dic 2012
Memory leak? Or just plain too big an array at that point? What size is your java heap set to?
Côme
il 26 Dic 2012
Risposte (0)
Categorie
Scopri di più su MATLAB Compiler SDK in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!