I'm having this strange problem where an Android application will freeze inside innocuous code. It only crashes when when the external jar is compiled without debug information, but when compiled with debug information the app runs just fine. It freezes on the same line of code that's located inside the external library, but only after multiple passes. Several other external jars are used, that don't have debug information, without any problems.
There is no IO activity going on in this part of the code. There is no native code in the project that could be stomping on memory causing random errors either. The freeze happens on multiple devices. This process is in its own thread and is computationally intensive.
- When the same library/jar is used in a desktop application there are no problems.
- Both Java 6 and 7 have been used to compile app + libraries
- The library in question is DDogleg.
- The three other external jars do not appear to be having any problems.
- External jars are included in a 'libs' directory
Build Environment:
- IDE: IntelliJ 12
- Android SDK: android-17
- OS: Linux Mint 13 and Windows 7
- JDK: 1.7.0_13 and 1.6.0_41
(original question stated that it crashed when included as a jar, but not when compiled inside the application)