sevaa / dwex

DWARF Explorer - a GUI utility for navigating the DWARF debug information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows app doesn't launch

mnovakovic opened this issue · comments

I installed dwex using pip install dwex on my Windows machine but it won't start. I'm assuming crash on launch? I used Procmon but didn't see anything suspicious.

My CPU is Intel Xeon x64, and Windows 10 version is 19041.630.

Happy to investigate further, please let me know how and what other info you need to debug this.

Works on a fresh machine, so the package (probably) isn't broken.

Can you please open the command line and run "dwex"? it should be in path by default, under Python3x\Scripts.

Works on a fresh machine, so the package (probably) isn't broken.

Can you please open the command line and run "dwex"? it should be in path by default, under Python3x\Scripts.

I did and nothing happens, no error messages or anything. There is a slight delay before the command finishes so something is running obviously, but after about a second the command finishes and that's it.

Let's try another command:

python -m dwex

This one might give better diagnostics.

Let's try another command:

python -m dwex

This one might give better diagnostics.

This actually works and now I have the GUI and I can open the .so file I wanted. Awesome, thanks!

I had to use python3 since python defaults to python2 on my machine and python -m dwex says "No module dwex found" since this is I assume a python3 module. Maybe that's it, maybe dwex.exe runs python and fails because of the same issue? Procmon though says that python3 paths are being used so maybe that's not the issue.

Dwex requires Python3. That could be the reason for your troubles.

I guess you can now check and fix the "DWARF Explorer" shortcut on the Start menu for a proper GUI experience; the executable should be pythonw.exe in the Python 3 installation path. python is a console program, it would flash a console window if run, while pythonw is a GUI one.

Yup I am personally good for now, thanks for the workaround.

As a user though, I would obviously prefer to not have to do this so I believe the real fix would be to make sure that dwex.exe is using the right python though so others who have multiple python installations don't run into the same issue. Pretty sure you agree on this but I understand that finding time to do it is never easy. I'd submit the pull request but I am also swamped.

So pip install dwex worked for you, right? And that installed the program under Python 2. I thought having python_requires=">=3.5" in setup.py would prevent that scenario for all realistic setups. Guess not.

According to the public wizdom, python_requires is only respected in pip since about year 2016. Guess I'll have to check the Python version (sys.version) explicitly. So crude.

Yeah pip install dwex worked for me and it installed it as a python3 module under python3 folder - in essence it did the right thing. However, on my local machine python defaults to python2, so I had to explicitly use python3 -m dwex to make sure dwex is being executed with python3.

I am not sure what dwex.exe (which the start menu item is linked to) does though - I am just assuming it somehow ends up calling python which on my computer is python2. The full path to dwex.exe is inside of python3 installation folder on my computer so that also looks right.

Hope that makes sense - it looks like the installation via pip worked fine on my computer it's just that dwex.exe is failing for some reason - I don't know what dwex.exe does to know why it fails though but it could be due to python defaulting to python2 on my machine.

Dwex.exe is not being generated by me - it's being generated by the pip/setuptools machinery of Python. All I have is a entry_points={"gui_scripts": ["dwex = dwex.__main__:main"]}, line in setup.py, specifying the module and the startup function. For pip, it's sufficient to generate a Windows executable; how exactly does that executable find the right Python, I don't know. In a perfect world, it would be nice to leave an issue on their Github :)

Ah I see, that makes sense. I couldn't find the dwex.exe code by looking at your source and was a little puzzled. Yeah I guess this would be an issue for the pip project.