Re: CPU running at 100%, GUI locks up

Michael Eager <[email protected]> Tue, 9 Mar 2021 11:34:16 -0800
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
On 3/8/21 2:14 PM, Tim Roberts wrote:
> Matthias Brennwald wrote:
>>
>> Performance really cannot be the issue, as I have another Python 
>> program which does pretty much the same "work", using command-line 
>> user interface instead of the wxPython GUI. This CLI program consumes 
>> about 3-5% of CPU on the E3930.
>>
>> I have never really worked with debuggers. Any hints or suggestions on 
>> how/where to start?
> 
> Well, you can do "gdb  python xxx.py", then type "run" to start it.  
> When it hangs, you press Ctrl-C to break into the debugger. "bt" gets a 
> stack trace of the current thread.  You may need a stack trace of all 
> threads, which is likely to be verbose: "thread apply all bt".  Email me 
> a copy if you want some interpretation.

Running a Python executable under GDB is likely to show you a lot about
the workings of the underlying VM and little about the Python program
that the VM is interpreting.  If the problem is in the VM, then this
may help.  If the problem is in the Python code, GDB is not going to
tell you where this is happening.

You can run the program using a Python debugger like PyCharm.  It may
lose control when you go into your lockup, but you can use it to set
breakpoints to bracket where this is happening.

-- 
Michael Eager

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/c27b81d3-9436-0ee6-e821-feb8cd4f5b83%40eagercon.com.