Re: CPU running at 100%, GUI locks up

"'bht' via wxPython-users" <[email protected]> Tue, 9 Mar 2021 09:02:14 -0800 (PST)
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
I'd also second Marc's comment. Relating where you are stuck within the 
Python ".exe" may not be easy to relate to where the problem is with your 
Python code. I also find it very useful to single-step through code in the 
Python debugger (I typically do this in Spyder) to isolate the Python 
statement causing a problem. 

Brian

On Monday, March 8, 2021 at 5:07:20 PM UTC-6 Marc wrote:

> On Mon, Mar 8, 2021 at 2:14 PM Tim Roberts <[email protected]> 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.
>>
>> -- 
>>
>>  
> Before jumping into gdb (which, until you learn it, will confuse the heck 
> out of you), I recommend the "poor man's debugger" - i.e. insert lots of 
> print() or console.log() statements throughout your code.  It's free, it's 
> easy, you can make your statements as terse or as informative as you want, 
> and it's the fastest way I know to narrow down your search for the culprit. 
>  
>

-- 
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/33a48682-6ffd-4075-be1b-dbb88f3faccen%40googlegroups.com.