winpdb icon indicating copy to clipboard operation
winpdb copied to clipboard

Bug Winpdb crash

Open mikhoul opened this issue 7 years ago • 8 comments

Hi @bluebird75

I was trying to debug a script and when I press "go" (play button it crash python: https://i.imgur.com/U2vHybx.png

Here's a link to the script in my dropbox if you want to try: https://dl.dropboxusercontent.com/s/bayohh14d1wtufy/MergeXMLTV.py

I'm under Windows 7 x64 using Python 3.6.4 32bit

If you need more information just ask me :smile:

Regards :octocat:

mikhoul avatar Feb 22 '18 18:02 mikhoul

Which version of winpdb are you using ?

bluebird75 avatar Mar 01 '18 06:03 bluebird75

@bluebird75 2.5.0

In meantime I used another fork https://github.com/braidedlogix/winpdb and it worked, it did not crash.

If you need more information just let me know.

Regards :octocat:

mikhoul avatar Mar 01 '18 15:03 mikhoul

Yes, It crashes for me too (Win 10, Anaconda 64, Python 3) when you open any file (both as an argument to winpdb.bat or GUI through "File -> Launch -> Browse") Something wrong - https://pastebin.com/ZEbgsrbs

But in original console there is - https://pastebin.com/MaEQVL8N

After some time I got launched GUI without loaded file and this information in it's console *** NEW: Use CTRL-N for auto completion in the following commands: launch, *** eval and exec. *** Password has been set to a random password. *** Starting debuggee... *** Failed to find script.

P.S. I use http://cmder.net/ as a terminal on Windows to get output

... as I understand this >>"C:\Windows\system32\cmd.exe" /C """H:\Anaconda3\python.exe" "H:\Anaconda3\lib\site-packages\rpdb2.py" --debug --debugee --pwd="fnb_nQrb" --chdir --rid=4605460 "h:\job\tensorflow_ex\tests.py" "" should be >>"c:\Windows\System32\cmd.exe" /C H:\Anaconda3\python.exe H:\Anaconda3\lib\site-packages\rpdb2.py --debug --debugee --pwd="sdfsdf" --chdir --rid=4605460 H:\JOB\tensorflow_exp\tests.py ""

to work, without some "" in paths

psychedel avatar Apr 08 '18 13:04 psychedel

@bluebird75 Maybe quoting depending on OS may solve the problem, I found pieces for Mac and only winlower function but the last one is not for quotes. If you know this part of the code - will it be easier for you to fix this issue? Of if you have no time now, I will try to dig more. Thanks!

psychedel avatar Apr 08 '18 14:04 psychedel

Running Slackware-14.2/x86 with Python-3.6.4 and wxPython-4.0.1. Installed using 'python3 setup.py install' and opened winpdb with the module's name. As soon as I pressed the F6 key winpdb segfaulted.

I'm willing to test fixes on linux when you have some available.

rs-aesi avatar Apr 27 '18 15:04 rs-aesi

Hi. Porting winpdb to python3 / phoenix is too demanding and too technical for me. I'll just give up. If you feel like trying to solve the bug reported, please do.

bluebird75 avatar May 07 '18 09:05 bluebird75

On Mon, 7 May 2018, Bluebird75 wrote:

Hi. Porting winpdb to python3 / phoenix is too demanding and too technical for me. I'll just give up. If you feel like trying to solve the bug reported, please do.

I'm using Python3's built-in pdb running in an emacs shell. It does the job quite well.

Regards,

Rich

rs-aesi avatar May 07 '18 12:05 rs-aesi

I know this bug is from a long time ago. I checked the relevant code and indeed, the overquoting is problematic. Instead of passing a string with overquote to subprocess.Popen(), rpdb should pass a list of argument and let Python subprocess handle the quoting, it would work much better.

To be improved.

bluebird75 avatar Jul 03 '20 20:07 bluebird75