Maximum statement or expression depth exceeded
-
Hi,
when using a large JavaScript-File for example Icon.js from
https://github.com/kevincarlson/QmlBridgeForMaterialDesignIcons
in my project, I get the error:
"file:qrc:/Icon.js:1004 Maximum statement or expression depth exceeded".This error message can be found in a few Qt sources and is thrown, if an expression is parsed with more than 1000 "recursions".
This happens in Qt Version 12.1 and 13, but not in 12.0
Does anyone have a solution for this?
-
Hi,
when using a large JavaScript-File for example Icon.js from
https://github.com/kevincarlson/QmlBridgeForMaterialDesignIcons
in my project, I get the error:
"file:qrc:/Icon.js:1004 Maximum statement or expression depth exceeded".This error message can be found in a few Qt sources and is thrown, if an expression is parsed with more than 1000 "recursions".
This happens in Qt Version 12.1 and 13, but not in 12.0
Does anyone have a solution for this?
@Dabulla said in Maximum statement or expression depth exceeded:
Does anyone have a solution for this?
the only solution i can think of is to reduce the stack size.
Such a large stack size is very bad design and pretty inefficient anyway if you ask me.You might want to port this simple portion of code to C++ (e.g. into a QHash container) and escape the JS engine limitations.