Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

传入多个无效url导致崩溃的问题 #7

Open
NicalDai opened this issue Nov 28, 2018 · 3 comments
Open

传入多个无效url导致崩溃的问题 #7

NicalDai opened this issue Nov 28, 2018 · 3 comments

Comments

@NicalDai
Copy link

虽然是不当操作,但是希望可以做一下保护。越做越好
目前测试是必现的,如果不是null的url,而是任意的无效url,传9个url的数组进行展示,就有这个情况。

E/AndroidRuntime: FATAL EXCEPTION: download_task#0
Process: com.netease.nical.nimuikitdemo, PID: 30829
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.next(ArrayList.java:860)
at com.othershe.combinebitmap.helper.BitmapLoader.executeUndoTasks(BitmapLoader.java:217)
at com.othershe.combinebitmap.helper.BitmapLoader.loadBitmapFromHttp(BitmapLoader.java:125)
at com.othershe.combinebitmap.helper.BitmapLoader.loadBitmap(BitmapLoader.java:100)
at com.othershe.combinebitmap.helper.BitmapLoader.access$000(BitmapLoader.java:25)
at com.othershe.combinebitmap.helper.BitmapLoader$1.run(BitmapLoader.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:784)

@IdioticMadman
Copy link

这个应该不是url无效的问题,这个error是并发list的问题,在遍历list的时候,list的size发生了变化,可以把list换成CopyOnWriteArrayList就不会报错了

@IdioticMadman
Copy link

而且这个问题会触发,应该是你给了重复的url,不是无效的url导致的

@NicalDai
Copy link
Author

我试试 ,多谢~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants