[libbluray-devel] JRE for Android part 2
Petri Hintukainen
phintuka at users.sourceforge.net
Wed Jan 27 14:46:04 UTC 2021
ti, 2021-01-26 kello 22:58 -0300, Vitor Dall'Acqua kirjoitti:
> Ok, I'm back at using the libs inside the libs folder as this makes
> no difference in the end.
> The reason for the crashes the JVM Module, I just removed that..
No, as I already wrote, it doesn't crash because of missing
JVM_DefineModule. Missing JVM_DefineModule is normal with Java 8. Crash
happens somewhere after this check, and before end of bdj_open(), where
Java version is logged.
If you drop the check for JVM_DefineModule, you need to set java_9 to
0. Java 9+ requires different initialization arguments.
> and
> started removing a lot of stuff from bdj.c including all the
> irrelevant ifdefs
To pinpoint the location, you could add following lines to bdj_open(),
_load_jvm() and _bdj_init():
BD_DEBUG(DBG_CRIT, "at line %d\n", __LINE__);
Then, we can see what is the last line before crash.
Is the log buffered ? If yes, last lines may be missing from there.
> Petri, if you can take a look at my final bdj.c is the last pastebin
java_9 is uninitialized, other than that it looks identical to the
orginal (with #ifdefs removed).
> I'm getting crashes without any explanation.
>
> Tried adb logcat but I can't see anything relevant:
> https://pastebin.com/NLM1UP6C
> T
> And this is from Kodi
> https://pastebin.com/fGad2kUx
>
> And here is the version I'm using of my bdj.c
> https://pastebin.com/AwXcCMBa
>
> Any comment or advice is more than welcome because without any log
> indication I have no idea where to look.
I compiled this jvm for Linux with the same configuration options
(=headless), and it seems to be missing some native functions. Looking
at the code and Makefiles this could be because of work-in-progress
with AWT Android porting. Still, that does not cause any crash in
Linux, just failure to initialize JVM and BD-J. (missing functions
cause link errors when runtime library AWT classes are loaded).
After adding those functions to the library it seems to play BD-J discs
in Linux. If those functions are missing also in the library you're
using, it most likely won't play any discs.
I could compile it for android, with the missing functions, if you want
to give it a try ?
Another thing that could be worth of trying is disabling JIT (I don't
know if Android allows running user-generated code, or if JIT is even
enabled in android build).
This can be done by executing the following line unconditionally:
option[n++].optionString = str_dup("-Xint");
(= replace if(getenv("BDJ_JVM_DISABLE_JIT")) with if(1) )
More information about the libbluray-devel
mailing list