Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. why out of memory error??
Forum Updated to NodeBB v4.3 + New Features

why out of memory error??

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 257 Views 1 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.
  • D Offline
    D Offline
    ds3216
    wrote on last edited by
    #1

    5ef79d56-c9cf-4821-a439-2d3e85848585-image.png

    While showing the vision image, I open the camera with opencv and convert the image to qimage and then to qpixmap.
    It keeps fluttering and crashing, and at some point it crashes... but since the crash occurred in a certain part of QT itself, I understand the clear reason.
    Please tell me.

    J.HilkJ 1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Crash is somewhere deep, but try going back in stack trace and find last place where it was in your code. Look for problems there - maybe some dangling pointer or something. If you find no problems there, try with a different Qt version, maybe you've hit some Qt bug.

      (Z(:^

      1 Reply Last reply
      1
      • D ds3216

        5ef79d56-c9cf-4821-a439-2d3e85848585-image.png

        While showing the vision image, I open the camera with opencv and convert the image to qimage and then to qpixmap.
        It keeps fluttering and crashing, and at some point it crashes... but since the crash occurred in a certain part of QT itself, I understand the clear reason.
        Please tell me.

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

        @ds3216 how are you converting the cv::mat to an QImage ?

        depending on the QImage constructor used it assumes shared data that outlives itself

        When I used OpenCV back in the day, I found this awesome repository by Debao Zhang

        those conversions are save and sound as they copy data appropriately


        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
        2
        • J Offline
          J Offline
          John Van
          wrote on last edited by
          #4

          Check if shallow copy is used with QImage and cv:: mat. Check for multi-threaded exceptions and whether the UI has been changed in non GUI threads.

          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