You are here

[Closed] Gramps 3.4.1 don't start - python crashes

37 posts / 0 new
Last post
MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
[Closed] Gramps 3.4.1 don't start - python crashes

Hi,

as already written in the comment at Gramps blog I downloaded the new 3.4.1 version of Gramps but can't get it working.

Machine is a 32bit Intel with Windows 7 Enterprise. Installation path of the portable installer was F:\GrampsPortable

The installer went through without any problems but trying to start the GrampsPortable afterwards didn't work. Just got a popup from WIndows telling me that python crashed.

I investigated a bit and started python from the commandline with gramps.py but it crashed while trying to convert the calendar name entries from ascii to unicode ( ggettext.py line 89 ) as the strings contained German special chars. I guess this is a general Gramps bug and not introduced with the portable Version thus I also reported it here: http://www.gramps-project.org/bugs/view.php?id=6038

After 'fixing' the unicode problem python still crashed but this time with a DLL not found error when it reached the 'from glib._glib import *' statement in the glib.py file.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
.

What's your locale?
Have you tried launching Gramps Portable standalone or within PortableApps Menu/Platform?
Is Python installed locally on your machine? If yes, what version?

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
It's installed standalone as

It's installed standalone as I don't use the PortableApps Menu/Platform and there is no Python installed on this machine. So the python 2.7 inside the portable package is used.

get-UIculture returns a LCID of 1031 with name de-DE as there is no locale with Win7.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
...

Please try setting LANG=de within GrampsPortable\Data\settings\GrampsPortableSettings.ini

transcender
Offline
Last seen: 7 months 2 weeks ago
Joined: 2012-05-10 09:08
I found this in a log?:457:

I use the portabaleapps version. I found this in a log?:

457: WARNING: Spell.py: line 60: Spelling checker is not installed

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Normal

It's just saying that spell checking isn't installed, which is true for the portable version.

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Changeg LANG= from nothing to

Changed LANG= from nothing to de but this doesn't help. Still crashing with the same out or ASCII range error as the unicode function just accepts chars up to value 127 and the ä in the calendar name 'Hebräisch' is >127

But this is just one problem as I can temporary fix the unicode function with an additional encoding setting in the source file. The bigger problem is the DLL not found problem.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
.

Maybe you could test LANG=en_US, just to be sure it isn't a locale issue.

The problem "DLL not found" occurs if you use python from commandline. It can't find GTK because it's NOT installed. The portable launcher creates the environment so that Gramps finds all its dependencies. If you don't use it, such errors aren't a surprise.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Anti-Virus

What Anti-Virus software do you use?

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
McAfee VirusScan Enterprise +

McAfee VirusScan Enterprise + AntiSpyware Enterprise

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
McAfee...

...seems to cause some problems (see #). Maybe it's the reason for your crash too, I don't know.

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Don't think so as there is

Don't think so as there is nothing loggend in McAfees log and all the other python 2.6 and 2.7 applications work as expected. They are just a bit slower.

MichaelDW
Offline
Last seen: 7 years 2 weeks ago
Joined: 2011-01-05 11:50
Its McAfee again...

At least part of it Has to do with how McAfee handles
the C++ libraries, in its latest 'update'.
I currently have access to two computers one has McAfee the other has Avast.
I came to this conclusion, because on the McAfee computer it would crash with an error about the C++ libraries and python.exe would not quit.

However, on the Avast computer Gramps works without error.

transcender
Offline
Last seen: 7 months 2 weeks ago
Joined: 2012-05-10 09:08
I have mcafee at work and

I have mcafee at work and thats the only the machine it works on ironically enough.

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
English only installation - still crashing

Performed another clean installation of the portable version this time with no additional languages installed and LANG set to en_US. Still crashing but this time I found the log file in the data dir:

Traceback (most recent call last):
File "F:\Software\GrampsPortable341\App\Python27\lib\logging\__init__.py", line 846, in emit
msg = self.format(record)
File "F:\Software\GrampsPortable341\App\Python27\lib\logging\__init__.py", line 723, in format
return fmt.format(record)
File "F:\Software\GrampsPortable341\App\Python27\lib\logging\__init__.py", line 464, in format
record.message = record.getMessage()
File "F:\Software\GrampsPortable341\App\Python27\lib\logging\__init__.py", line 328, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file TransUtils.py, line 223
28667: WARNING: Spell.py: line 60: Spelling checker is not installed

Something is wrong with the translation module I guess. I've added a print for the lang variable after line 209 in TransUtil and got: en_US.UTF-8

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Another attempt - Console

Create a GrampsPortable.ini in the same directory as GrampsPortable.exe. Add the following:

[GrampsPortable]
Console=true
MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Console auto closes - same as Gramps34.log above

Also the console auto closes on quit (pretty hard to see the output) it appears to be the same as written to the Gramps34.log file.
I've added various print statements to the sources to see what is executed and where it stops. At the moment I reached the line gtk.main() in startgtkloop inside the grampsgui.py file. The print statement before the gtk.main() line is still executed and then it crashes.
Sorry that I don't have time left now to investigate further but I try again tomorrow.
Python/Gramps just crashes without logging a special error to the console or log.

Found this in the Win Event Logger:

Name der fehlerhaften Anwendung: pythonw.exe, Version: 0.0.0.0, Zeitstempel: 0x4f84a6ca
Name des fehlerhaften Moduls: libgdk-win32-2.0-0.dll, Version: 2.24.8.0, Zeitstempel: 0x4eca77af
Ausnahmecode: 0xc0000005

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Gramps Issue Tracker

Please post this traceback to the Gramps bug tracking system. The gramps developers might fix it.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
UPX

Gramps Portable is compressed with UPX. You could try decompressing the files, maybe it helps.
The easiest way is using the PortableApps.com AppCompactor (option DECOMPRESS).

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Decompressed - same problem

Decompressed a fresh installation with AppCompactor and got the same result. Some warnings about locale and translations (just warnings) and reached the line gtk.main() Then python crashes with dll problems.
I'm giving up now and use 3.3.1 again. At least this version is working if I restart it every 15 mins or so.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Old environment

If you would like, you could use the old environment (Python 2.6.6 and GTK 2.16) with Gramps 3.4.1. This will produce some other warnings/little bugs, but maybe it won't crash for you. This way I get a log similar to your posted traceback.

  • Install Gramps Portable 3.3.1
  • Rename GrampsPortable\App\Python26 to GrampsPortable\App\myPython26
  • Rename GrampsPortable\App\GTK to GrampsPortable\App\myGTK
  • Create GrampsPortable.ini in the same directory as GrampsPortable.exe:
    [GrampsPortable]
    GTKDirectory=App\myGTK
    PythonDirectory=App\myPython26
  • Upgrade to Gramps Portable 3.4.1
  • Start GrampsPortable.exe
MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Gramps 3.4.2 don't start - python crashes

Just checked the new 3.4.2 release and have to report that I'm still unable to start GrampsPortable. Same problem as with 3.4.1
After double clicking the exe it took about 30s (without any noticeable action) until Win7 displays a python has crashed dialog:

Name of application: pythonw.exe, Version: 0.0.0.0, Timestamp: 0x4f84a6ca
Name of module: libgdk-win32-2.0-0.dll, Version: 2.24.8.0, Timestamp: 0x4eca77af
Exception: 0xc0000005

System: Win 7 Enterprise

And if I replace the libgdk-win32-2.0-0.dll with an older version python keeps crashing due to the incorrect unicode to ascii conversion already mentioned at version 3.4.1. So this is still not fixed also.

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 15 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Local?

Have you tried a local install temporarily to see if it works? If not, please do so.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Well,

there is no local installer (3.4.2) yet. Blum

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Not reproducible

Sorry, but I can't reproduce your issue.
I don't know what files you are editing or replacing nor what other Python or GTK apps you have installed on your machine.

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
I have no other GTK or Python

I have no other GTK or Python apps installed and it is not possible to install any local apps on this computer. I don't own any private Win computer (MacOS user) but we are allowed to use our companies computer in our breaks. But these computers don't allow admin rights and thus no installation onto the local drive with the default installers as they require admin rights.
So we are allowed to use portable apps and all the other portable apps are working fine. Gramps 3.3.1 Portable is also fine (except some Gramps issues with the GUI that I hope are fixed in 3.4).
So the system is just a normal Win7 user account without any python, gtk etc. software installed.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
?

Have you tried this?

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Yes, but this don't work right away

Yes, but this don't work and all I get is this entry in Gramps.log if I try to use the new gramps folder with the old gtk and python one:

11122: ERROR: gramps.py: line 105: Unhandled exception
Traceback (most recent call last):
File "F:\Software\GrampsPortable\App\Gramps\gramps.py", line 110, in
import TransUtils
File "F:\Software\GrampsPortable\App\Gramps\TransUtils.py", line 55, in
elif os.path.exists(os.path.join(const.PREFIXDIR, "share/locale")):
AttributeError: 'module' object has no attribute 'PREFIXDIR'

Then I removed those 2 lines from App\Gramps\TransUtils.py that checs for share/locale as I don't have it. Without these two lines 3.4.2 is starting up with the old GTK/Python26. I'm just importing my family tree and see if it is working otherwise.

So far the only warning is about the missing SpellChecker but this can be ignored.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
...

Something seems broken on your machine (McAfee?).
On Windows the lines 55-56 should be never executed. The portable launcher sets "GRAMPSI18N", the condition in line 51 is true. The condition in line 53 is true as well. Don't know why on your machine the script reaches the elif statement for Linux in line 55.

MacDefender
Offline
Last seen: 11 years 11 months ago
Joined: 2012-09-10 04:59
Hmm, the new 3.4.2 with

Hmm, the new 3.4.2 with python26 version used to work fine for about an hour. Several startups and a few test entries. Everythins as expected. But now after just another restart I got a low level database corrupt message.

Ok, just tried it again today and no problem so far. Using 3.4.2 with old gtk/python26 now and even have the German translation now. No way to use it with python27/new gtk here.

Made several restarts now, rebuild/sort/repair of the db up and down, combined all the citations and so on. For over an hour now really stable and pretty fast compared to 331 although it's still python26. I'm happy now with this solution and can confirm that 3.4.2 is working just fine with python26. No errors (except Spellcheck not found) in the log.

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Ok,

good news. Can we close this bug now?

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 15 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Closing Bug

As it seems to be fixed and the author hasn't responded in 8 months, I'm closing this bug.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
2008 C++ redistributable

Installing the 2008 C++ redistributable package from Microsoft could help you (see #).

Edit: this seems to be a known Python bug (#16188)

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 15 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Unrelated

Not having the proper C++ DLLs causes a very specific bug to present. Whatever needs them will fail to run entirely, it won't run partially. So the app will either display the specific error "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem." or it won't run at all because one EXE is calling another and the called EXE doesn't run at all.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
or it won't run at all

see # or *

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 15 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Not This Thread

Nowhere in this thread is anyone saying it won't run at all. Python crashing (#) can not be caused by not having the VC++ runtimes or bundling the wrong ones. If Python didn't have the required VC++ runtimes, it wouldn't even run. It would either show the reinstall error dialog or nothing (if it was hidden due to being called by another EXE like the portable launcher). Your solution to install the VC++ runtimes isn't related to this thread.

It could be related to the comment in the news story you linked to where they say they got the splash and then nothing else, but that is a different issue. You'd need to investigate further by having them run it directly (sans portable launcher) to see if they get the telltale 'reinstall' dialog. But, it's completely unrelated to the bug being discussed in this thread here.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 4 months 1 week ago
Developer
Joined: 2008-07-23 07:56
Ok,

the reporter here get the 'reinstall' dialog.

People in this thread are talking about the C++ runtimes too, I thought it is related.

Log in or register to post comments