我有一个秋千应用程序,在有些(随机)时间后冻结。我每冻结10秒钟就拍5个短片,它们都包含相同的线条:
"AWT-EventQueue-0" prio=6 tid=0x0000000009949000 nid=0x7bec waiting on condition [0x000000000ebbc000]
java.lang.Thread.State: RUNNABLE
at java.math.BigInteger.valueOf(Unknown Source)
at java.math.BigDecimal.inflate(Unknown Source)
at java.math.BigDecimal.add(Unknown Source)
at uk.co.xx.xxx.xxxx.XXX$4.get(XXX.java:171)
Note that no other thread in the thread dump is in XXX.java. The corresponding code line (XXX.java:171) looks somewhat inoffensive:
a = a.add(b.multiply(c, MATH_CONTEXT), MATH_CONTEXT);
此处:
a
,b
andc
are localBigDecimal
variables.MATH_CONTEXT
is apublic final static
variable, only accessed within XXX.java
我的问题 " /强 " (回答其中任何问题都大有帮助)
- Is this evidence of a deadlock or liveness issue (the thread does not seem to make progress but it is in
RUNNABLE
state)? - Is this the likely reason for the freeze or should I look somewhere else?
- What would be the next step to solve the problem?