关于notifyDataSetChanged()的WinDeath

sle*_*dav 7 android android-listview android-sqlite

嗨,我有以下问题:

data.clear();
data.addAll(datasource.getFilesInFolder());  //gets the data from Sqlite database
adapter.notifyDataSetChanged();
Run Code Online (Sandbox Code Playgroud)

生成此logCat输出:

 12-19 14:34:30.864: W/Binder(986): Caught a RuntimeException from the binder stub implementation.
 12-19 14:34:30.864: W/Binder(986): java.lang.NullPointerException
 12-19 14:34:30.864: W/Binder(986):     at        android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:280)
 12-19 14:34:30.864: W/Binder(986):     at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129)
 12-19 14:34:30.864: W/Binder(986):     at android.os.Binder.execTransact(Binder.java:404)
 12-19 14:34:30.864: W/Binder(986):     at dalvik.system.NativeStart.run(Native Method)
 12-19 14:34:30.864: W/InputMethodManagerService(757): Got RemoteException sending setActive(false) notification to pid 30040 uid 10174
Run Code Online (Sandbox Code Playgroud)

这个例外导致胜利死亡......

好吧,我意识到也许是反过来,WIN DEATH导致这个日志输出,因为在日志WINDEATH之前来了,那么我不知道为什么windeath会发生.

我的适配器是扩展BaseAdapter,没有什么特别之处.以下是非常奇怪的:

提到的代码片段位于自定义侦听器中,该侦听器由另一个类触发.当我将有问题的部分放在听众之外时,它运作良好.

我的Caught a RuntimeException from the binder stub implementation意思是?这可能是数据库的问题吗?或者也许是我的自定义听众?任何人都知道什么是错的?

Nan*_*nne 2

我在执行并发操作时看到了各种存在此问题的问题。例如,参见这个线程(fling + service)和这个线程(从 2 个线程在画布上绘图)。

您正在谈论不同类中的自定义侦听器,是否您也在同时做几件事?