# CardView in 5.2.2 crashes

**URL:** <https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563>\
**Category:** Help\
**Tags:** cardview\
**Created:** [June 2, 2024, 5:50pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563 "2024-06-02T17:50:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkusB](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MarkusB](https://gramps.discourse.group/u/MarkusB)\
**Post date:** [June 2, 2024, 5:50pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/1 "2024-06-02T17:50:35Z")

</div>

For me (on Win11/Gramps 5.2.2) Card View crashes Gramps frequently. Is it something with my install, or is this a common problem?

---

<div class="post-metadata">

**Author:** ![Patsyblefebre](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/patsyblefebre/32/1315_2.png) [@Patsyblefebre](https://gramps.discourse.group/u/Patsyblefebre)\
**Post date:** [June 3, 2024, 8:45pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/2 "2024-06-03T20:45:35Z")

</div>

> [@MarkusB](#):
>
> Card View crashes Gramps frequently.

Do you see or can you provide the crash message? You might have to start Gramps using the **GrampsAIO64 5.2.2-console** shortcut.

---

<div class="post-metadata">

**Author:** ![MarkusB](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MarkusB](https://gramps.discourse.group/u/MarkusB)\
**Post date:** [June 3, 2024, 8:58pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/3 "2024-06-03T20:58:18Z")

</div>

There is no message. Gramps freezes after switching view either way, but only occasionally, say every 10th switch or so, but no pattern found. Database is locked after restart of Gramps.

---

<div class="post-metadata">

**Author:** ![Patsyblefebre](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/patsyblefebre/32/1315_2.png) [@Patsyblefebre](https://gramps.discourse.group/u/Patsyblefebre)\
**Post date:** [June 3, 2024, 9:04pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/4 "2024-06-03T21:04:34Z")

</div>

Ok does Cardview work when used with either a new blank empty family tree or evenbetter if you can confirm the issue happens using the [Example.gramps](https://gramps-project.org/wiki/index.php?title=Example.gramps) testing family tree please?

Also what version of the Cardview addon are you using as [current version is “0.2024.04241”](https://github.com/cdhorn/CardView/blob/master/src/card_view.gpr.py)?

---

<div class="post-metadata">

**Author:** ![MarkusB](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MarkusB](https://gramps.discourse.group/u/MarkusB)\
**Post date:** [June 4, 2024, 6:53am UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/5 "2024-06-04T06:53:50Z")

</div>

Thanks, will test and revert next week.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 4, 2024, 3:29pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/6 "2024-06-04T15:29:22Z")

</div>

Is this related to the [preferences bug reported in the CardView issue](https://github.com/cdhorn/CardView/issues/239) in @cdhorn GitHub repository?

If so, there is a patch posted there.

---

<div class="post-metadata">

**Author:** ![MarkusB](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MarkusB](https://gramps.discourse.group/u/MarkusB)\
**Post date:** [June 10, 2024, 3:14pm UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/7 "2024-06-10T15:14:09Z")

</div>

- Same thing happens when I test with the [Example.gramps](https://gramps-project.org/wiki/index.php?title=Example.gramps)
- Yes, I’m using the [current version “0.2024.04241”](https://github.com/cdhorn/CardView/blob/master/src/card_view.gpr.py)
- This CardView version seems to have pointers to Gramps 5.2 in the .gpr.py files, so I guess that is not the problem. Unfortunately I have no idea what to do with the patch suggested in the thread above.

The issue is hard to pinpoint, as it happens seemingly at random, but about every 10-20th time I navigate in the view, or switch back/to CardView.  
The console shows the folowing error:

> Warning: DbState: Exception occurred in callback function.  
> Traceback (most recent call last):  
> File “C:\Program Files\GrampsAIO64-5.2.2\gramps\gen\utils\callback.py”, line 424, in emit  
> fn(\*args)  
> File “C:\Program Files\GrampsAIO64-5.2.2\gramps\gui\displaystate.py”, line 611, in db\_changed  
> self.clear\_history()  
> File “C:\Users\marku\AppData\Roaming\gramps\gramps52\plugins\RestoreHist\restorehist.py”, line 52, in clear\_history  
> history.mru = hist[history.nav\_type]  
> ~~~~ ^^^^^^^^^^^^^^^^^^  
> KeyError: ‘Tag’

---

<div class="post-metadata">

**Author:** ![Patsyblefebre](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/patsyblefebre/32/1315_2.png) [@Patsyblefebre](https://gramps.discourse.group/u/Patsyblefebre)\
**Post date:** [June 12, 2024, 6:26am UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/8 "2024-06-12T06:26:58Z")

</div>

> [@MarkusB](#):
>
> \Users\marku\AppData\Roaming\gramps\gramps52\plugins\RestoreHist\restorehist.py”, line 52, in clear\_history

Well this error is for the third party [Restore History](https://github.com/gramps-project/addons-source/tree/maintenance/gramps52/RestoreHist) addon that I don’t use, so please raise a separate issue on the [bug tracker](https://gramps-project.org/bugs/).

The [user manual](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Navigation#Go) briefly mentions the following advice for the addon:

> **You can use the third party RestoreHist [addon](https://gramps-project.org/wiki/index.php/5.2_Addons)**  
> So that a portion of the Go menu can be made to persist between restarts of Gramps. If installed then you can manually clear the stored state by finding and deleting /gramps52/plugins/RestoreHist/hist\_save.ini file from the [user folder](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_User_Directory) (the ~.gramps folder or %Appdata% folder in Windows).

---

<div class="post-metadata">

**Author:** ![MarkusB](https://avatars.discourse-cdn.com/v4/letter/m/7cd45c/32.png) [@MarkusB](https://gramps.discourse.group/u/MarkusB)\
**Post date:** [June 12, 2024, 8:48am UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/9 "2024-06-12T08:48:38Z")

</div>

Well… the ‘Restore History’ (or ‘Restart where you were last working’ as it’s called in the Addon & Plugin Manager) is maybe not the (only) culprit. I uninstalled it, restarted Gramps, and still Gramps crashed when clicking around in Cardview. The console showed no errors, just a list of rendered pages.

I found a way to replicate the crash: when moving between my first known paternal ancestor (A) and his son (B) it crashed. So, to test, I deleted A from the db, restarted Gramps and selected B in the person view, switched to CardView and -Crash. No error in the console. This caused the database to be unusable; I broke the lock, but the file didn’t load, and Gamps hung. Well, no worries, I have backups, and -it seems- the problem went away when I switched to a backup. I can only hope it remains away…

I then re-installed the ‘Restart where you were last working’ and it seems to be working fine. I guess some sort of database corruption must have occurred. Go figure.  
Many thanks for your help, fantastic community here!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [July 12, 2024, 8:49am UTC](https://gramps.discourse.group/t/cardview-in-5-2-2-crashes/5563/10 "2024-07-12T08:49:07Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
