java - How can we tell which class gives the exception -


i getting java.util.concurrentmodificationexception need figure out class gives me exception. code has numerous classes , packages , difficult figure out error comes. exception shows problem of arraylist. doesn't catch exeption when use exception handling in suspected areas.

any way out?

if you're using modern ide, eclipse example, can run application in debug mode , set breakpoint on exception. effect: application stop each time exception thrown (in entire jvm) , stack trace.

that makes quite easy identify caller (and actual thread, if concurrency issue)


playn.java.javagrouplayer.paint(javagrouplayer.java:96) 

that's bad guy. it's paint method javagrouplayer class. has loop iterates through array list , @ 1 point detects, list has been modified.

do use threads in swing application? in case, double check not modify layout.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -