You are here

Bug Gramps Portable 3.3.1 db loading issue

26 posts / 0 new
Last post
edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Bug Gramps Portable 3.3.1 db loading issue

I have been experimenting with moving this app between computers and have run into an issue with Windows7. If you create a db on a WinXP machine it will not open on a Win7 machine. If you create it on a Win7 machine, you can move it to either a WinXP or Win7 machine and it will open. However you can not move it back to the first Win7 machine. It will get to the 12% mark loading the database and report an error. After the error the db is locked. If you take it back to the second machine the db can be unlocked and opened without problem. On XP machines the db will move without problem, on 7 machines it seens to get tied to the second computer it is opened in.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Permissions?

How is your flash drive formatted?
Where is Gramps Portable installed?
Do you have write access to this path (on Win7)?
Have you tried moving Gramps Portable around on your Win7 machine (for example from D:\GrampsPortable to C:\test\mov ing\GrampsPortable)? Does this work?

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Flash drive is formated

Flash drive is formated fat32. Gramps portable is installed on flash drive in the portable apps directory. I do have write access to drive. I haven't tried moving GrampsPortable since the problem is not with the program but opening a database that was created on the first Win7 machine and then opened in another Win7 machine. In about a week I should have a third Win7 computer to work with for additional testing. From what I have seen it appears that after the database has been opened on a second computer some enviromental setting ties it to the second computer. Have even tried this with a fresh database without any data inputted and still had the same problem. Had orriginally posted this to the gramps-project.org site and they pointed me to the PortableApps site. See http://www.gramps-project.org/bugs/view.php?id=5650 for a more complete reprot on the tests I performed trying to pinpoint the source of the problem.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
.

From my portable point of view, moving it around on your computer is the same as moving it to another machine. The database path changes (in case you use the default database path) and the portable launcher gets busy.
It's not working on your Win7 desktop only, right? Maybe some other software is interfering. Do you have Python or GTK runtime installed locally?
I don't have Win7 available for testing, but you're the first one reporting an issue (more than 50,000 downloads).

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
It does work on my Win7 until

It does work on my Win7 until I have opended it on a second Win7 computer. It works fine on the second computer but if you take to a third Win7 or back to the first Win7 the database will no longer load. Python and GTK are not installed locally on any of the machines. It also will not work when then database has been opened or created on a WinXP machine. If you would like to see the error messages let me know. Never had a problem until I tried moving the drive to another computer running Win7.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
...

Could you please try moving it around on the first and second machine? (Just rename the installation folder)
Error messages don't help me because I'm not a Gramps developer.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
I'll run some tests

I'll run some tests now and I'll post my results. Just finished, I created a test database on the flash drive on a Win7 machine. I then copied the Gramps directory to two different hard drives on the computer and was able to run the program and open the database. I then renamed the directory on the flash drive, ran the program and created a second test database. Copied the database directory to one of the hard drive locations, and was able to open it with the hard drive copy of the program.

I then put the flash drive in the second Win7 machine and opened the first test database. I also created a third test database. I copied the Gramps directory to the hard drive and was able to run it from there and open first and third databases. I did not open the second database on this machine.

Returning the flash drive to the first computer, I was only able to open the second database. The first and third databases failed to open reporting an error in the Berkley db environment.

Also created a new Portable Apps flash drive on a XP machine, installed Gramps Portable and created two test databases. Tried to open them on a second XP machine and they failed to open with the same error.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Sorry,

I can't reproduce.

There are several bug reports "DbEnvironmentError detected" for Gramps (all operating systems), most of them are marked resolved with a fix in upcoming Gramps 3.3.2. Maybe you have luck and the next version solves your problem. At the moment I don't see a bug in the portable code.

Thanks for your tests.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
I agree, believe problem is

I agree, believe problem is in Gramps code. They recomend always creating a new database from backup when moving to a different computer. That works but is not really portable.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Well,

they recommend not using Windows at all. Blum

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
New test

Bart, I was contacted by one of the Gramps developers and asked to try testing with the latest versions of bsddb/pybsddb. He said they were at versions 5.3.13/5.3.0 , Could you tell me how to incorporate them into your Gramps Portable package? To see their request, see my Gramps bug report at http://www.gramps-project.org/bugs/view.php?id=5650. As I said I have several machines making it easy for me to perform testing. Someone else also reported the same problem to them bug id=5660.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
I'm not sure

I guess you'll have to recompile Python with its dependencies (and maybe GTK runtime) yourself and put it into the appropriate folder.
At the moment Gramps Portable uses officially released Python and GTK binaries only.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Already done

The Gramps developer who contacted me did that for me and posted the file for me to download. I have it and will let you know if it helps.

Sorry for the delay in response, My wife was in the hospital yeaterday for surgery and this is first time I've had to check my computer. Hope to get the testing done tonight.

I have completed the testing and it did not solve or change the problem. I will continue to work with the Gramps developers and let you know what we find out.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
I think I found the problem

Run this test. Before inserting your USB drive run your Computer Managment tool. It can be found under start-programs-administrative tools menu. Then go to the disk managment tool. In the bottom right panel find your cdrom drive and either remove it or change its drive letter to somthing higher like "M". Then insert your Gramps Portable drive. It should be assigned the previous cdrom drive letter, if not set it to that letter. Create a test database, open and save it. Close Gramps and safely remove the USB drive. Go back into the disk managment tool and give the cdrom drive back its orriginal drive letter. Put the Gramps Portable drive back in and see if you can open the test database. My testing indicates that if the database was created in a computer where the assigned drive letter happens to be the same as the cdrom drive in the computer you move it to the path does not get changed for that database and it will fail to open. If you reassign drive letters it will then work.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Wow,

nice find. I can reproduce now. Thanks for investigating.

Unfortunately I can't fix it. The portable launcher adjusts all paths in gramps.ini (family tree database path, base path for relative media paths, ...) if the drive letter (or path) changes. It doesn't check whether the last path is now assigned to an optical drive.
I'm not a database expert, but maybe some internal database routines think it is read only now (due to optical drive) and thus report the error, although the family tree database path has been changed to another drive with write access.

Very confusing, but I think it is something the Gramps core developers will have to fix. In the meantime, your workaround works like a charm.

Thanks again. Smile

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Now to get it fixed

I've been working with one of the core developers. You can follow the progress at the Mantis Bug link I posted to you earlier. If you want to join the thread at that link, you could help them understand how the portable launcher works. I sure the problem is in the database handling code. Just need to find it.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Database path

The Gramps developer has asked me to try to change the database path to a path relative to the gramps portable working directory. Could the launcher be modified to do that?

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Yes and no

Let the launcher write a fixed "relative path" to gramps.ini would be a bad idea, since the user can change the family tree database path within the Gramps GUI. You could try setting a relative path on your own though (Preferences->Family Tree->Family Tree Database path). The launcher doesn't touch a relative path, absolute paths will be adjusted if necessary.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Thanks for the tip

I did not see where I could set it from within Gramps. I agree the launcher should be left as is. Even setting a relative path is only a workaround that might cause other problems. There is a problem with the code that the developers have to fix. They are aware of it now, so we'll see what happens.

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
new release

Bart,
The Gramps developers want me to test version 3.3.2. Could you reply to this when you get the GrampsPortable version ready for download.

Will let you know how the tests work out. Thanks Ed

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
No windows builds yet

There aren't windows builds for 3.3.2 or 3.4.0 yet. The portable version will be ready a few days after the local version. Probably we'll skip Gramps Portable 3.3.2 though.

Edit: At the moment Gramps Portable 3.4.0 isn't planned. Some comments on the Gramps mailing list:

Josip (packager win AIO installer)Thing is that 3.4.0 Gramps version is quite broken on Windows so there is no point to release it. For when will it be fixed, there is no time-line set [...]

Stephen George (packager win installer)Since I see many comments that 3.4.0 is broken for windows I am reluctant to publicly publish the minimal installer it generated as if it is that broken it will generate many bug reports.

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Still broken

The issue still exists in 3.4.0.

eisa729
Offline
Last seen: 1 month 3 weeks ago
Joined: 2010-05-04 19:52
Gramps 3.4.1 Released

FYI

edherbst
Offline
Last seen: 6 years 7 months ago
Joined: 2012-03-28 10:07
Problem still exists in 3.4.1

Problem still exists in 3.4.1 but have found an easier work around. Just put any disk in the drive prior to starting GrampsPortable. It appears that when loading the database it checks to see if its saved path still exists. If not,then it saves its current location. However if the path exists but cannot be accessed, like an empty cd drive, then the crash occurs.
I have passed my finding on to the Gramps developers. Perhaps wiht this more refined problem description they can locate the problem and fix it.
In any case if anyone else contacts you with the same problem you have a really easy solution.
FYI Your suggestion that it might be a read only problem was close to the actual problem. I was testing the read only angle by mapping the cd drive to a read only directory. That didn't cause the problem but I realized that although you can see an empty optical drive in Windows explorer, and even open it to an empty drive, at the command prompt you get the error message "The system cannot find the drive specified.".

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Thanks

Thanks for the tip. This workaround should be easy even for unexperienced users. Smile

Bart.S
Offline
Last seen: 2 weeks 2 days ago
Developer
Joined: 2008-07-23 07:56
Log

I don't know if it'll help the developers but you could add your \GrampsPortable\Data\settings\gramps\Gramps34.log to your report.

Log in or register to post comments