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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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 last edited by
        #3

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

        J.HilkJ 1 Reply Last reply
        0
        • S SHUBHAM SINGH RAO

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

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by J.Hilk
          #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
          0
          • J.HilkJ J.Hilk

            @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 last edited by
            #5

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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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

              • Login

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