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

当场递归死循环, java.lang.StackOverflowError #1579

Open
Mingyueyixi opened this issue Aug 2, 2024 · 8 comments
Open

当场递归死循环, java.lang.StackOverflowError #1579

Mingyueyixi opened this issue Aug 2, 2024 · 8 comments

Comments

@Mingyueyixi
Copy link

Mingyueyixi commented Aug 2, 2024

版本:2.1.0
调用代码:mRefreshLayout.setNoMoreData(true); 或 mRefreshLayout.finishLoadMoreWithNoMoreData();
无其他操作,当场递归直到爆炸。

Process: com.hehe.test, PID: 6028
java.lang.StackOverflowError: stack size 8MB
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
2024-08-02 17:01:30.523 6028-6028 AndroidRuntime com.hehe.test E at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
2024-08-02 17:01:30.713 6028-6028 AndroidRuntime com.hehe.test E at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
2024-08-02 17:01:30.713 6028-6028 AndroidRuntime com.hehe.test E at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.scwang.smart.refresh.layout.SmartRefreshLayout$6.run(SmartRefreshLayout.java:3042)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefresh(SmartRefreshLayout.java:3091)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.finishRefreshWithNoMoreData(SmartRefreshLayout.java:3104)
at com.scwang.smart.refresh.layout.SmartRefreshLayout.setNoMoreData(SmartRefreshLayout.java:2903)
at com.hehe.test.ui.mine.MyInListFragment.onGetInList(MyInListFragment.java:260)

@kokobebekoko
Copy link

我也遇到这个问题了

@acomet
Copy link

acomet commented Aug 7, 2024

我擦,新鲜出炉,我也遇到这个问题了,我是切换主题之后才出现的

@Mingyueyixi
Copy link
Author

我擦,新鲜出炉,我也遇到这个问题了,我是切换主题之后才出现的

我都不需要什么操作,调一下没有更多数据就当场递归了。一看源马,的确是有递归的。

@acomet
Copy link

acomet commented Aug 8, 2024

我擦,新鲜出炉,我也遇到这个问题了,我是切换主题之后才出现的

我都不需要什么操作,调一下没有更多数据就当场递归了。一看源马,的确是有递归的。

我这边是调用showEmpty()方法引起的(这个方法里面最终也会调用setNoMoreData())。
奇怪的是,我项目里大量使用了showEmpty(),但每次StackOverflowError都精准发生在同一个类,研究了大半天也看不出这个类有什么不一样。因为我项目里还使用了另外一个框架com.github.liangjingkanji:BRV, 所以暂时使用com.drake.statelayout.StateLayout的showEmpty()替代com.drake.brv.PageRefreshLayout的showEmpty()

@Mingyueyixi
Copy link
Author

我擦,新鲜出炉,我也遇到这个问题了,我是切换主题之后才出现的

我都不需要什么操作,调一下没有更多数据就当场递归了。一看源马,的确是有递归的。

我这边是调用showEmpty()方法引起的(这个方法里面最终也会调用setNoMoreData())。
奇怪的是,我项目里大量使用了showEmpty(),但每次StackOverflowError都精准发生在同一个类,研究了大半天也看不出这个类有什么不一样。因为我项目里还使用了另外一个框架com.github.liangjingkanji:BRV, 所以暂时使用com.drake.statelayout.StateLayout的showEmpty()替代com.drake.brv.PageRefreshLayout的showEmpty()

不奇怪。我看了源马,没有更多数据这个方法就是存在递归隐窜的。我现在直接不用这功能了。

@Mingyueyixi
Copy link
Author

我擦,新鲜出炉,我也遇到这个问题了,我是切换主题之后才出现的

我都不需要什么操作,调一下没有更多数据就当场递归了。一看源马,的确是有递归的。

我这边是调用showEmpty()方法引起的(这个方法里面最终也会调用setNoMoreData())。
奇怪的是,我项目里大量使用了showEmpty(),但每次StackOverflowError都精准发生在同一个类,研究了大半天也看不出这个类有什么不一样。因为我项目里还使用了另外一个框架com.github.liangjingkanji:BRV, 所以暂时使用com.drake.statelayout.StateLayout的showEmpty()替代com.drake.brv.PageRefreshLayout的showEmpty()

不奇怪。我看了源马,没有更多数据这个方法就是存在递归隐窜的。我现在直接不用这功能了。

布局xml不加头尾view,就必现。其他情况不知道是不是偶发

@zhouzhuo810
Copy link

我也发现了,原因是我布局里忘记加footer了。

@Mingyueyixi
Copy link
Author

我也发现了,原因是我布局里忘记加footer了。

是的,不加的话必现

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

4 participants