Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Maximum statement or expression depth exceeded

    QML and Qt Quick
    2
    2
    435
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dabulla
      Dabulla last edited by

      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?

      raven-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @Dabulla last edited by raven-worx

        @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.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply Reply Quote 3
        • First post
          Last post