Method is Too Long


I have write the code using Thread.
While run the Xojo, application through the error as “This Method is too Long”.
If I remove some codes from threads , Xojo run successfully.

Kindly advice how to run with all codes.

Maybe you can refactor the method to split it into several other methods?
You must have a really huge method to get that message? Isn’t that tricky to maintain? :wink:

Same issue here:

Thanks, How to identify the line count limit for thread

I think the limit is 32k, not a line count.

The issue is the stack size is limited and a sufficient number of local variables and temporaries etc that are required for a method can exceed that

This usually happens with

  • extremely long methods (tens of thousands of lines)
  • methods that declares enormous statically sized arrays (ie/ dim a(1000000) as integer)