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. Invalid parameter passed to C runtime function.
Forum Updated to NodeBB v4.3 + New Features

Invalid parameter passed to C runtime function.

Scheduled Pinned Locked Moved Solved QML and Qt Quick
13 Posts 6 Posters 2.6k Views 2 Watching
  • 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.
  • ODБOïO ODБOï

    Can please someone tell me what can cause this error ?
    or how to find/debug it
    edit :
    i have this output when i compile run my qt project, but i have no idea since when and why ..
    thanks

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @lelev Can you post the exact error/warning message?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    ODБOïO 1 Reply Last reply
    0
    • jsulmJ jsulm

      @lelev Can you post the exact error/warning message?

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by
      #3

      @jsulm hi
      i have this in application output, when i run my program
      Invalid parameter passed to C runtime function.

      jsulmJ 1 Reply Last reply
      0
      • ODБOïO ODБOï

        @jsulm hi
        i have this in application output, when i run my program
        Invalid parameter passed to C runtime function.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @lelev I asked because you wrote "i have this output when i compile my qt project".
        Well, with this amount of information it is impossible to say where exactly it happens. You can try to disable functionality in your app until it disappears, then analize what Qt functionality you're using in the part of your code causing this warning and then you would need to step into Qt code while debugging to find the exact location.
        Alternative is to use strace/ltrace tools.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        ODБOïO 1 Reply Last reply
        2
        • jsulmJ jsulm

          @lelev I asked because you wrote "i have this output when i compile my qt project".
          Well, with this amount of information it is impossible to say where exactly it happens. You can try to disable functionality in your app until it disappears, then analize what Qt functionality you're using in the part of your code causing this warning and then you would need to step into Qt code while debugging to find the exact location.
          Alternative is to use strace/ltrace tools.

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by ODБOï
          #5

          thank you
          @jsulm said in Invalid parameter passed to C runtime function.:

          you wrote "i have this output when i compile my qt project".

          yes sorry, it was mistake, i edited

          @jsulm can i assume it is on c++ side of my project or it also can be in qml ?

          i will try strace/ltrace tools

          jsulmJ 1 Reply Last reply
          0
          • ODБOïO ODБOï

            thank you
            @jsulm said in Invalid parameter passed to C runtime function.:

            you wrote "i have this output when i compile my qt project".

            yes sorry, it was mistake, i edited

            @jsulm can i assume it is on c++ side of my project or it also can be in qml ?

            i will try strace/ltrace tools

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @lelev It's for sure C++, somewhere in Qt - it is calling a function from C standard library with wrong parameter.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            ODБOïO 1 Reply Last reply
            1
            • jsulmJ jsulm

              @lelev It's for sure C++, somewhere in Qt - it is calling a function from C standard library with wrong parameter.

              ODБOïO Offline
              ODБOïO Offline
              ODБOï
              wrote on last edited by ODБOï
              #7

              @jsulm i switched to debug mode expecting more details about the error, but no error is outputed in debug mode, can it help you to help me ?

              kshegunovK 1 Reply Last reply
              0
              • ODБOïO ODБOï

                @jsulm i switched to debug mode expecting more details about the error, but no error is outputed in debug mode, can it help you to help me ?

                kshegunovK Offline
                kshegunovK Offline
                kshegunov
                Moderators
                wrote on last edited by kshegunov
                #8

                Windows, Linux, OSX, other?
                IDE, compiler, debugger?
                Any warnings you get from Qt in the application output pane?
                When and how does the problem manifest itself? Is it a window opening, a file being closed, something more esoteric?

                I don't know about creator but many (more like all) disassemblers allow you to attach a breakpoint on specific kernel calls (e.g. file open), so it's worth researching a bit in that regard. Can it be done in Creator and/or your debugger.

                Read and abide by the Qt Code of Conduct

                ODБOïO 1 Reply Last reply
                2
                • kshegunovK kshegunov

                  Windows, Linux, OSX, other?
                  IDE, compiler, debugger?
                  Any warnings you get from Qt in the application output pane?
                  When and how does the problem manifest itself? Is it a window opening, a file being closed, something more esoteric?

                  I don't know about creator but many (more like all) disassemblers allow you to attach a breakpoint on specific kernel calls (e.g. file open), so it's worth researching a bit in that regard. Can it be done in Creator and/or your debugger.

                  ODБOïO Offline
                  ODБOïO Offline
                  ODБOï
                  wrote on last edited by
                  #9

                  @kshegunov hi,

                  its on windows 7 pro 64bit
                  QtCreator last version
                  mingw73_64

                  @kshegunov said in Invalid parameter passed to C runtime function.:

                  Any warnings you get from Qt in the application output pane?

                  the messages is printed to application output pane as soon i start the program (run button in qt creator)

                  thank you for yr help

                  K 1 Reply Last reply
                  0
                  • ODБOïO ODБOï

                    @kshegunov hi,

                    its on windows 7 pro 64bit
                    QtCreator last version
                    mingw73_64

                    @kshegunov said in Invalid parameter passed to C runtime function.:

                    Any warnings you get from Qt in the application output pane?

                    the messages is printed to application output pane as soon i start the program (run button in qt creator)

                    thank you for yr help

                    K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #10

                    @lelev @kshegunov

                    I have made the same experience. Suddenly this strange message appeared in the application pane. I was wondering how to track where it steams from.

                    I am on windows 10 64 bit, creator was 4.9.2 and IIRC Qt 5.12.3 64 bit.
                    Unfortunately I cannot reproduce at the moment. The update to creator 4.10.0 was interfered by AV and the current installation of that creator version is typically keeping one core completely busy. Therefore I have installed creator 4.9.2.

                    IMHO it is a compiler/linker issue because it is seen in the application window. IIRC I have seen the warning in debug and release compilations.

                    @lelev said in Invalid parameter passed to C runtime function.:

                    the messages is printed to application output pane as soon i start the program (run button in qt creator)

                    Same for me. However, it appeared also lateron in "some kind of bursts" and not single events.

                    Vote the answer(s) that helped you to solve your issue(s)

                    J.HilkJ 1 Reply Last reply
                    3
                    • kshegunovK Offline
                      kshegunovK Offline
                      kshegunov
                      Moderators
                      wrote on last edited by
                      #11

                      It may be something from the debugger (a different version is one thing to try) or Creator itself (another version is an option). It may be something from Qt, but I don't see what public API could trigger it if it appears before the QCoreApplication constructor. It may be some global init in Qt itself too, so another option is to try a bare application that doesn't load Qt at all ...

                      Read and abide by the Qt Code of Conduct

                      1 Reply Last reply
                      3
                      • K koahnig

                        @lelev @kshegunov

                        I have made the same experience. Suddenly this strange message appeared in the application pane. I was wondering how to track where it steams from.

                        I am on windows 10 64 bit, creator was 4.9.2 and IIRC Qt 5.12.3 64 bit.
                        Unfortunately I cannot reproduce at the moment. The update to creator 4.10.0 was interfered by AV and the current installation of that creator version is typically keeping one core completely busy. Therefore I have installed creator 4.9.2.

                        IMHO it is a compiler/linker issue because it is seen in the application window. IIRC I have seen the warning in debug and release compilations.

                        @lelev said in Invalid parameter passed to C runtime function.:

                        the messages is printed to application output pane as soon i start the program (run button in qt creator)

                        Same for me. However, it appeared also lateron in "some kind of bursts" and not single events.

                        J.HilkJ Offline
                        J.HilkJ Offline
                        J.Hilk
                        Moderators
                        wrote on last edited by
                        #12

                        Well that's a common enough warning, that I get regularly is some of my projects as well.

                        @koahnig
                        IIRC I traced it down the use usage of QSettings, but wasn't able to pinpoint it down more


                        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                        Q: What's that?
                        A: It's blue light.
                        Q: What does it do?
                        A: It turns blue.

                        1 Reply Last reply
                        3
                        • L Offline
                          L Offline
                          linoleo
                          wrote on last edited by
                          #13

                          I have the same problem, Qt 5.12.6 mingw73_64 Creator 4.7.1 on Windows 7 Pro 64-bit. It only happens in release mode, even though there is no mode-dependent setting in my .pro file. I do not use QSettings explicitly, but when I fail to set the app's organisation/domain name I get a complaint from QSettings, so it does seem to be invoked behind the scenes.

                          I'm actually chasing the problem that the packaged (with windeployqt) application exits cleanly without doing anything whatsoever, while it works just fine (in debug and release mode) in Creator. Landed here because this error message is my only clue at this point...

                          1 Reply Last reply
                          0

                          • Login

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