You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gPodder silently fails to start if a python27.dll without a full Python installation is found in PATH #286
If the program cannot find python/pygtk it silently fails on windows.
Such an exception should be caught and result in a popup notifying the user that they need to install / reinstall / repair python. instead of silent failure.
changed the title [-]If python / pygtk is not installed the program should notify the user[/-][+]If python / pygtk is not found the program should notify the user[/+]on Apr 21, 2017
Alright. so the site I posted actually forwards you to sourceforge when you click on the file.
Also, I copied the installation file to my laptop and tested it there, and it showed that popup just fine (or rather, first it showed a popup saying i don't have python, then when i installed python saying i do not have pyGTK).
So the problem is not with the file i used to install it.
that being said, let me run a few more tests
... ok this is pretty weird. I suspect it might be python 3 related?
some tests on my desktop:
test 1:
When on my desktop I have:
Python 2.7.13
Python 3.6.1 x32
Python 3.6.1 x64
PyGTK 2.24.2
python launcher
Program runs
--
test 2:
have installed
Python 2.7.13
Python 3.6.1 x32
Python 3.6.1 x64
python launcher
receive error message
--
test 3:
have installed
Python 3.6.1 x32
Python 3.6.1 x64
python launcher
silent failure with no error message received.
--
test 4:
have installed
Python 3.6.1 x32
python launcher
silent failure with no error message received.
--
test 5:
have installed:
python launcher
silent failure with no error message received.
--
test 6:
uninstalled everything python related
silent failure with no error message received.
--
test 7:
reinstalled python 2.7.13 and it alone
received an error saying that it needs PyGTK
--
test 8:
installed pyGTK 2.24.2 for python 2.7
then uninstalled pyhon, leaving only pygtk without python
silent failure.
--
Of particular note is test 6. On my laptop if everything is uninstalled i will recieve a notification saying I need python (not PyGTK, but base python). But on my desktop I do not receive that message if everything is uninstalled.
Ok, further testing on different systems shows it is not related to python 3 after all. various combination of installation and uninstallation of latest version of python 2 and python 3 have not caused any anomalies on my laptop (which is a recently clean installed version of windows).
Maybe it is related to having had an older version of python 2 at some point which didn't uninstall correctly on my desktop.
Regardless, I had simply assumed this feature is missing when in fact it is an anomalous behavior that occurs solely on my one specific desktop machine. As such, unless more people can come forward with the same issue then this can be chalked up to something being off with my desktop and this ticket closed.
That reads pretty clearly to me that it will show a message box and not continue unless if is able to load a Python dll.
Based on that I see a few options:
It silently failed, prior to showing the message.
It found a dll it thought was Python and loaded it, only to silently fail later.
Some issue occurred in the act of showing the message itself.
It has been a long time since I have done anything with C, so I honestly don't remember if there is anything you can do to give us more information on what is the actual failure reason. Or if it will more fall to us to try to recreate the failure environment to debug (or give you a different implementation that will give us the needed trace information).
Thank you for the info, this gave me an idea and I managed to figure out specifically what the issue is in a reproducible manner.
By searching for python*.dll I found many many instances of it that came bundled with a wide variety of programs.
I have tracked down the problem to a program called Nmap, https://nmap.org/
specifically nmap 7.40. Specifically this file:
C:\Program Files (x86)\Nmap\python27.dll
If this file exists and phython is not installed then gpodder silently fails. If this file is in the recycling bin when python is not installed then gpodder gives me a popup telling me I need to install python 2.7
I have tested deleting/restoring this file 3 times. it is definitely the culprit.
I have only the vaguest of idea of what it is that nmap does wrong that causes this issue though. What should I tell them that they need to fix in the bug report to them (they are also open source).
in the meantime I emailed their dev and asked them to take a look at this bug report.
Nmap developer here: I'm not sure exactly what to do about this, but I do have one idea: one of our install options is to add the Nmap install directory to the system PATH, so that you can use the nmap command from the command shell. But the PATH is also used for locating DLLs. So if you remove the Nmap directory from the Windows PATH environment variable, does it fix the problem?
If this turns out to be the cause, we may be able to restructure our installation to keep the Python DLLs and zenmap executable in a separate directory that is not added to the PATH.
Another Nmap developer here: As Dan rightly suggested, removing the PATH variable seems to work. Look like the zenmap executable needs to be moved to a subdirectory @dmiller-nmap
changed the title [-]If python / pygtk is not found the program should notify the user[/-][+]gPodder silently fails to start if a python27.dll without a full Python installation is found in PATH[/+]on Jun 3, 2017
In addition to moving the file from nmap out of the %PATH% (much appreciated), I guess what silently happens in that some imports for Python fail, and this is why gPodder is seen failing "silently".
Possibly it fails in one of those three files (due to it not finding the Python standard library most likely):
I've also created http://bugs.python.org/issue30560 (cross-linking this here), maybe for future use cases, Python could allow us to gracefully handle such situations (at least show a MessageBox() and then abort).
Activity
[-]If python / pygtk is not installed the program should notify the user[/-][+]If python / pygtk is not found the program should notify the user[/+]adamvoss commentedon Apr 22, 2017
How did you acquire, and how do you run, gPodder?
I have definitely seen the following on Windows:
The version of gPodder you installed may also be relevant information.
taltamir commentedon Apr 24, 2017
That is odd, this popup you posted didn't show up on my system.
I downloaded gpodder-3.9.3-setup.exe from http://gpodder.org/downloads
I have windows 10x64 with the latest major update (creators edition). For full system details here is an attached dxdiag
DxDiag.txt
I will try testing it on some more systems
taltamir commentedon Apr 24, 2017
Alright. so the site I posted actually forwards you to sourceforge when you click on the file.
Also, I copied the installation file to my laptop and tested it there, and it showed that popup just fine (or rather, first it showed a popup saying i don't have python, then when i installed python saying i do not have pyGTK).
So the problem is not with the file i used to install it.
that being said, let me run a few more tests
... ok this is pretty weird. I suspect it might be python 3 related?
some tests on my desktop:
test 1:
When on my desktop I have:
Python 2.7.13
Python 3.6.1 x32
Python 3.6.1 x64
PyGTK 2.24.2
python launcher
Program runs
--
test 2:
have installed
Python 2.7.13
Python 3.6.1 x32
Python 3.6.1 x64
python launcher
receive error message
--
test 3:
have installed
Python 3.6.1 x32
Python 3.6.1 x64
python launcher
silent failure with no error message received.
--
test 4:
have installed
Python 3.6.1 x32
python launcher
silent failure with no error message received.
--
test 5:
have installed:
python launcher
silent failure with no error message received.
--
test 6:
uninstalled everything python related
silent failure with no error message received.
--
test 7:
reinstalled python 2.7.13 and it alone
received an error saying that it needs PyGTK
--
test 8:
installed pyGTK 2.24.2 for python 2.7
then uninstalled pyhon, leaving only pygtk without python
silent failure.
--
Of particular note is test 6. On my laptop if everything is uninstalled i will recieve a notification saying I need python (not PyGTK, but base python). But on my desktop I do not receive that message if everything is uninstalled.
taltamir commentedon Apr 24, 2017
Ok, further testing on different systems shows it is not related to python 3 after all. various combination of installation and uninstallation of latest version of python 2 and python 3 have not caused any anomalies on my laptop (which is a recently clean installed version of windows).
Maybe it is related to having had an older version of python 2 at some point which didn't uninstall correctly on my desktop.
Regardless, I had simply assumed this feature is missing when in fact it is an anomalous behavior that occurs solely on my one specific desktop machine. As such, unless more people can come forward with the same issue then this can be chalked up to something being off with my desktop and this ticket closed.
adamvoss commentedon Apr 26, 2017
Thank you for your detailed testing!! Here is the code governing the Python check: https://github.com/gpodder/gpodder/blob/master/tools/win32-launcher/gpodder.c#L210-L227
That reads pretty clearly to me that it will show a message box and not continue unless if is able to load a Python dll.
Based on that I see a few options:
It has been a long time since I have done anything with C, so I honestly don't remember if there is anything you can do to give us more information on what is the actual failure reason. Or if it will more fall to us to try to recreate the failure environment to debug (or give you a different implementation that will give us the needed trace information).
taltamir commentedon Apr 26, 2017
Thank you for the info, this gave me an idea and I managed to figure out specifically what the issue is in a reproducible manner.
By searching for python*.dll I found many many instances of it that came bundled with a wide variety of programs.
I have tracked down the problem to a program called Nmap,
https://nmap.org/
specifically nmap 7.40. Specifically this file:
C:\Program Files (x86)\Nmap\python27.dll
If this file exists and phython is not installed then gpodder silently fails. If this file is in the recycling bin when python is not installed then gpodder gives me a popup telling me I need to install python 2.7
I have tested deleting/restoring this file 3 times. it is definitely the culprit.
I have only the vaguest of idea of what it is that nmap does wrong that causes this issue though. What should I tell them that they need to fix in the bug report to them (they are also open source).
in the meantime I emailed their dev and asked them to take a look at this bug report.
dmiller-nmap commentedon Apr 28, 2017
Nmap developer here: I'm not sure exactly what to do about this, but I do have one idea: one of our install options is to add the Nmap install directory to the system PATH, so that you can use the
nmapcommand from the command shell. But the PATH is also used for locating DLLs. So if you remove the Nmap directory from the Windows PATH environment variable, does it fix the problem?If this turns out to be the cause, we may be able to restructure our installation to keep the Python DLLs and zenmap executable in a separate directory that is not added to the PATH.
Varunram commentedon Apr 28, 2017
Another Nmap developer here: As Dan rightly suggested, removing the PATH variable seems to work. Look like the zenmap executable needs to be moved to a subdirectory @dmiller-nmap
elelay commentedon Apr 28, 2017
That would be great, thanks!
[-]If python / pygtk is not found the program should notify the user[/-][+]gPodder silently fails to start if a python27.dll without a full Python installation is found in PATH[/+]thp commentedon Jun 3, 2017
In addition to moving the file from nmap out of the
%PATH%(much appreciated), I guess what silently happens in that some imports for Python fail, and this is why gPodder is seen failing "silently".Possibly it fails in one of those three files (due to it not finding the Python standard library most likely):
Not sure where in that it fails, but googling for how to catch any fatal Python errors, I found this:
https://stackoverflow.com/questions/7688374/how-to-i-catch-and-handle-a-fatal-error-when-py-initialize-fails
When reproducing the "silently fails" bug, can you try running gPodder in a
cmdwindow and see if that prints any error messages there?thp commentedon Jun 3, 2017
I've also created http://bugs.python.org/issue30560 (cross-linking this here), maybe for future use cases, Python could allow us to gracefully handle such situations (at least show a
MessageBox()and then abort).elelay commentedon Jun 14, 2018
We use Python3 since gPodder 3.10.2.