Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Error : Unable to open I2C device. Too many open files
QtWS25 Last Chance

Error : Unable to open I2C device. Too many open files

Scheduled Pinned Locked Moved Unsolved India
6 Posts 3 Posters 1.9k 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.
  • S Offline
    S Offline
    SHUBHAM SINGH RAO
    wrote on 3 Sept 2019, 10:41 last edited by
    #1

    System description-
    I have interfaced Real Time Clock module through I2C data transfer protocol and I am calling this function in every 1 second.
    Task - In addition I have interfaced modem with my hardware as well. I am downloading data through Modem and storing them locally in txt files.

    Problem Statement : After downloading 15 -16 files one by one, the programme suddenly stops with the error message -
    Error : Unable to open I2C device. Too many open files

    I checked all my files they are already closed

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 3 Sept 2019, 22:49 last edited by
      #2

      Hi,

      Are you closing all the files that you are opening in your application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SHUBHAM SINGH RAO
        wrote on 4 Sept 2019, 08:30 last edited by
        #3

        yes I have duly closed all my files and I have also cross checked it using file.handle() command

        J 1 Reply Last reply 4 Sept 2019, 08:32
        0
        • S SHUBHAM SINGH RAO
          4 Sept 2019, 08:30

          yes I have duly closed all my files and I have also cross checked it using file.handle() command

          J Offline
          J Offline
          J.Hilk
          Moderators
          wrote on 4 Sept 2019, 08:32 last edited by J.Hilk 9 Apr 2019, 08:34
          #4

          @shubham-singh-rao has handle is not a function of QFile, are you actually doing this with Qt ?

          ups, it's part of QfileDevice, my bad

          can you show us code?


          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.

          S 1 Reply Last reply 4 Sept 2019, 09:22
          0
          • J J.Hilk
            4 Sept 2019, 08:32

            @shubham-singh-rao has handle is not a function of QFile, are you actually doing this with Qt ?

            ups, it's part of QfileDevice, my bad

            can you show us code?

            S Offline
            S Offline
            SHUBHAM SINGH RAO
            wrote on 4 Sept 2019, 09:22 last edited by
            #5

            @j-hilk which portion of code shall I Share?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 4 Sept 2019, 19:12 last edited by
              #6

              I'd say the code related to I2C.

              Do you have any other processes that are consuming files on your target ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              3 Sept 2019, 10:41

              • Login

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