简体   繁体   中英

System.StackOverflowException was unhandled - C#, .NET

How to fix it. It look like this page is dedicated to that kind of error.

在此输入图像描述

Your function is calling itself forever.
You need to make it stop calling itself.

In this case, you need to Invoke it to the UI thread instead of simply calling itself again:

Invoke(new Action(UpdateAdvert));

It appears that InvokeRequired is true . This causes unbounded recursion. There's nothing that will change it to false. Perhaps invoking would fix it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM