Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Maximum statement or expression depth exceeded

Maximum statement or expression depth exceeded

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 2 Posters 572 Views
  • 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.
  • DabullaD Offline
    DabullaD Offline
    Dabulla
    wrote on last edited by
    #1

    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-worxR 1 Reply Last reply
    0
    • DabullaD Dabulla

      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-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

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

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved