StackOverflowException in indicator crashes CTrader

Created at 13 Nov 2019, 10:55
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
bishbashbosh's avatar

bishbashbosh

Joined 08.08.2018

StackOverflowException in indicator crashes CTrader
13 Nov 2019, 10:55


Just an FYI... If I have an indicator that overflows the stack, it crashes the entire application in cTrader 3.6.

EDIT: I see this a feature of .net and is "by design" - https://stackoverflow.com/questions/206820/how-do-i-prevent-and-or-handle-a-stackoverflowexception

So no further action required. Still, makes it a little fun to debug this case - I had to be pretty quick attaching VS.net to the cTrader.exe process in order to see what was happening..


@bishbashbosh
Replies

PanagiotisCharalampous
13 Nov 2019, 10:58

Hi bishbashbosh,

Can you share the indicator code as well as steps to reproduce?

Best Regards,

Panagiotis


@PanagiotisCharalampous

bishbashbosh
13 Nov 2019, 11:00

Hi Panagiotis,

My code was creating an infinite loop; as per update above, this is not a fault of cTrader, but a feature of the framework that StackOverflowException cannot be caught and terminates the process by default.

Cheers


@bishbashbosh