Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. DB connections running in parallel crashes

DB connections running in parallel crashes

Scheduled Pinned Locked Moved Solved 3rd Party Software
databasethreadsmultithreaded
3 Posts 2 Posters 440 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.
  • J Offline
    J Offline
    JeniaR
    wrote on last edited by
    #1

    Hi,
    I tried to work with 2 DB connections from 2 QT threads. Module LIBEAY32.dll crashes. It's OpenSSL library ,which can be thread safe, but some callbacks need to be implemented for this to work. So, my conclusion is that QT doesn't do that. Is it a known issue? What's the advice for such design?
    Thanks,
    JR

    jsulmJ 1 Reply Last reply
    0
    • J JeniaR

      Hi,
      I tried to work with 2 DB connections from 2 QT threads. Module LIBEAY32.dll crashes. It's OpenSSL library ,which can be thread safe, but some callbacks need to be implemented for this to work. So, my conclusion is that QT doesn't do that. Is it a known issue? What's the advice for such design?
      Thanks,
      JR

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

      @JeniaR Do you really need threads for DB access? Qt is asynchronous. Also, can you provide the stack trace to see what exactly is happening? Can you show your code (especially: do you create all needed instances in the threads?)?

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

      J 1 Reply Last reply
      0
      • jsulmJ jsulm

        @JeniaR Do you really need threads for DB access? Qt is asynchronous. Also, can you provide the stack trace to see what exactly is happening? Can you show your code (especially: do you create all needed instances in the threads?)?

        J Offline
        J Offline
        JeniaR
        wrote on last edited by
        #3

        @jsulm While I was looking for piece of code to post, I actually found the problem in it. In some place, the connection wasn't passed to a query and it was associated with a "default" connection. @jsulm, thank you for the help!

        1 Reply Last reply
        0
        • SGaistS SGaist has marked this topic as solved on

        • Login

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