Fixed allocation and creation of stack trace on android.