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.5k 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.
  • O Offline
    O Offline
    ODБOï
    wrote on 19 Sept 2019, 14:29 last edited by ODБOï
    #1

    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

    J 1 Reply Last reply 19 Sept 2019, 14:44
    0
    • O ODБOï
      19 Sept 2019, 14:29

      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

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 19 Sept 2019, 14:44 last edited by
      #2

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

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

      O 1 Reply Last reply 19 Sept 2019, 14:55
      0
      • J jsulm
        19 Sept 2019, 14:44

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

        O Offline
        O Offline
        ODБOï
        wrote on 19 Sept 2019, 14:55 last edited by
        #3

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

        J 1 Reply Last reply 19 Sept 2019, 15:01
        0
        • O ODБOï
          19 Sept 2019, 14:55

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

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 19 Sept 2019, 15:01 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

          O 1 Reply Last reply 19 Sept 2019, 15:07
          2
          • J jsulm
            19 Sept 2019, 15:01

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

            O Offline
            O Offline
            ODБOï
            wrote on 19 Sept 2019, 15:07 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

            J 1 Reply Last reply 19 Sept 2019, 15:08
            0
            • O ODБOï
              19 Sept 2019, 15:07

              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

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 19 Sept 2019, 15:08 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

              O 1 Reply Last reply 19 Sept 2019, 15:15
              1
              • J jsulm
                19 Sept 2019, 15:08

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

                O Offline
                O Offline
                ODБOï
                wrote on 19 Sept 2019, 15:15 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 ?

                K 1 Reply Last reply 19 Sept 2019, 15:42
                0
                • O ODБOï
                  19 Sept 2019, 15:15

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

                  K Offline
                  K Offline
                  kshegunov
                  Moderators
                  wrote on 19 Sept 2019, 15:42 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

                  O 1 Reply Last reply 19 Sept 2019, 16:18
                  2
                  • K kshegunov
                    19 Sept 2019, 15:42

                    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.

                    O Offline
                    O Offline
                    ODБOï
                    wrote on 19 Sept 2019, 16:18 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 19 Sept 2019, 19:09
                    0
                    • O ODБOï
                      19 Sept 2019, 16:18

                      @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 19 Sept 2019, 19:09 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 20 Sept 2019, 08:41
                      3
                      • K Offline
                        K Offline
                        kshegunov
                        Moderators
                        wrote on 19 Sept 2019, 19:14 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
                          19 Sept 2019, 19:09

                          @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 20 Sept 2019, 08:41 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 26 Nov 2019, 10:49 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