[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orekit Developers] [SOCIS 2011] Status of the Android application
On Sun, Aug 7, 2011 at 11:59 PM, Alexis ROBERT <alexis.robert@gmail.com> wrote:
> On Sun, Aug 7, 2011 at 9:49 PM, MAISONOBE Luc <luc.maisonobe@c-s.fr> wrote:
>> Fine, this was the reason for the failed installation.
>> This new version installed properly.
>>
>> I get some force close on the Frame stuff trying to convert
>> P=1000000.0/0.0/0.0 V=0.0/1000.0/0.0 from ITRF (if I remember correctly) to
>> EME2000.
>>
>> I also had problems converting from TAI to UTC.
>>
>> Both problems may be due to loading data. I did install orekit data zip on
>> the root folder of the sdcard (i.e. /sdcard/).
>
> I have these problems too. A logcat (which is Android syslog) shows a
> backtrace from a NullPointerException :
>
[snip]
>
> I'll look at this tomorrow.
This was a very stupid bug :D
As I've set orekit.data.path to /sdcard/, DirectoryCrawler would
recurse in all the /sdcard/ folder and open all zip files to see if
there is the requested data files, which 1. takes a lot of time 2. if
you have a single zip with a CRC problem (which happens for me in
LOST.DIR), it will crash.
W/System.err( 9709): org.orekit.errors.OrekitException: CRC mismatch
W/System.err( 9709): at org.orekit.data.ZipJarCrawler.feed(Unknown Source)
W/System.err( 9709): at org.orekit.data.DirectoryCrawler.feed(Unknown Source)
W/System.err( 9709): at org.orekit.data.DirectoryCrawler.feed(Unknown Source)
W/System.err( 9709): at
org.orekit.data.DataProvidersManager.feed(Unknown Source)
W/System.err( 9709): at
org.orekit.frames.RapidDataAndPredictionColumnsLoader.fillHistory(Unknown
Source)
W/System.err( 9709): at
org.orekit.frames.FramesFactory.getEOP2000History(Unknown Source)
W/System.err( 9709): at
org.orekit.time.TimeScalesFactory.getUT1(Unknown Source)
W/System.err( 9709): at
org.orekit.time.TimeScalesFactory.getGMST(Unknown Source)
W/System.err( 9709): at
org.orekit.android.date.TimeScaleSelector.selected(TimeScaleSelector.java:36)
By creating a /sdcard/orekit/ folder and storing the orekit-data.zip
inside, it works.
By the way, I discovered a nice trick on Android which helped to debug
this. By default, Android redirects stdout and stderr to /dev/null and
if you want to have log messages, you use the Android syslog which is
logcat by Log.d("Tagname", "Message"); (for a message of type debug,
you have also Log.w, Log.i, Log.e).
But here I didn't know how to modify the Orekit jar to use Log.d
because Orekit doesn't link the Android API libs so I was a little
blocked.
Except that if you type "setprop log.redirect-stdio true" in the
command-line of an Android device, it will tell the Android system to
redirect /dev/stdout and /dev/stderr to the logcat, with tagname
System.out and System.err :)
By the way I think I'll stop serializing native Orekit classes and use
proxy classes everywhere for two reasons :
* We don't manage when Orekit is loading data from the dataset. For
instance the timescale selector serializes an AbsoluteDate but
AbsoluteDate internally converts to UTC and so need to load the UTC
timescale from the sdcard which takes time on the UI thread and make
the UI non responsive which is not great for the user and may lead to
an "Application not responding" dialog. If we move everything to light
proxy classes it would be easy to delay the data loading to when we
are computing, which will be done on a background thread.
* I think GCRF time scale object is too big as I get a E/JavaBinder(
9766): !!! FAILED BINDER TRANSACTION !!! when I want to select a GCRF
time scale.
Alexis