开发者

Issue with HTC Desire android app

开发者 https://www.devze.com 2023-04-07 13:58 出处:网络
So I have an object called ExtendedCanvas that contains this following field: private static final Status status = new Status();

So I have an object called ExtendedCanvas that contains this following field:

private static final Status status = new Status();

This object contains a method named advance() that is called from a thread started in a surfaceCreated() method (don't know if this info is of any meaning but I try to be specific). And in this method the first thing is

if (status.FirstTime == false) {

And this throws a NullPointerException no matter what I do (FirstTime is a boolean, status is null), but this only on HTC Desire (so far at least, in emulator works ok always). I have no idea how something static final that has been initialized can be null... Status is accesed previously from the surfaceCreated thread and there it works. But after creating another thread and accessing status it says it's null. Has anyone ever encountered something like this? Could it be an optimization problem when the dalvik bytecode gets compi开发者_如何学Cled down to native in HTC Desire?

0

精彩评论

暂无评论...
验证码 换一张
取 消