Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8385841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:46:11+00:00 2026-06-09T17:46:11+00:00

I have a PyQt application that hangs. Qt 4.7.4 (64-bit) Python 2.6.1 GCC 4.2.1

  • 0

I have a PyQt application that hangs.

Qt 4.7.4 (64-bit)
Python 2.6.1
GCC 4.2.1
OSX 10.6.8

The location of the hang varies. If I disable/rewrite one location of hang, the hang occurs somewhere else shortly afterward.

The application performs searches that might return thousands of custom data objects, each of which might contain fifty child objects.

Logging reveals the hang tends to occur in a loop that creates these custom objects.

ALSO

The application uses threading, however the hang occurs even when I disable these threads. (I am using Laszlo Nagy’s stack trace tool to verify this. The hang occurs even when only the main thread and the stack tracer thread are running.)

The application reads and creates image files. It seems unlikely an I/O lock is the culprit, but I have yet to rule it out.

I WONDER

Is there a limit to the number of python objects I can create?

Is there some other limit I might be reaching?

I’m not doing any explicit object deletion for garbage collection. Should I?

Are there any other usual suspects?

EDIT (8/13):

  • QTimer.singleShot is good to know and a hot lead — however this app doesn’t use singleShot.

  • When the application hangs, it claims 100% CPU (and about 140 MB of memory.)

  • I will try strace ASAP and see what it reveals.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:46:12+00:00Added an answer on June 9, 2026 at 5:46 pm

    I tried dtruss (rough equivalent of strace on OSX) but didn’t derive much help from the results.

    At last I took a coworker’s advice and rolled back my source to its last known non-hanging state. Then I reintroduced changes class by class.

    The culprit was a class inheriting from two different QWidget classes, e.g.:

    class undoableWidget(QWidget) :
    ...
    
    class tearableWidget(QTabWidget) :
    ...
    
    class culpritWidget(undoableWidget, tearableWidget):
    
        def __init__(self, parentWidget, tabName):
    
            undoableWidget.__init__(self, parentWidget)
            tearableWidget.__init__(self, parentWidget, tabName)
    

    I’m surprised the application worked at all.

    Further investigation revealed undoableWidget needed not inherit from QWidget in the first place.

    The application no longer hangs, and I am dizzy with relief.

    Thank you for the advice. You have helped improve my debugging habits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Python program that is mostly complete, and there is one thing
I have written a python program with a PyQt GUI that, using the imaplib,
I have a PyQt application that reads and writes data files. I am including
I have a Twisted/PyQt application that (among other things) connects to a bunch of
In my Qt-based application (built using PyQt 4.8.6), I have a class that is
I have a very data-centric application, written in Python / PyQt. I'm planning to
I have a relatively large application written in Python and using PyQT as a
I have a Qt/C++ application that exposes some custom C++ classes via DBus methods
I have a custom data structure that I want to display in a PyQt
I have a fairly simple PyQt application in which I'm placing instances of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.