Since you appear to be using a custom version of berkely db I would assume that it is caused by the former.
To avoid having to redownload and reevaluate the entire chain one could copy a valid state of the chain and simply copy that back, should this error surface again.
Got another bug report to work on this morning.
This same problem also happened with the earlier version of Panda I was running, before you switched me to this latest version.
1. I open PandaBank.
2. The loading screen says Loading Block Index...
3. Switch to web browser (or any other app) to do something else while Panda is loading.
4. A while later later, PandaCoin-Qt quits unexpectedly
5. A quick read of the crash report indicates...
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
Assertion failed: (pindex->pprev || pindex->GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet)), function GetStakeModifierChecksum, file src/kernel.cpp, line 391.
...
6. Attempt to reopen PandaBank
7. Keep PandaBank active without switching to any other app... wait forever (we never progress beyond the loading screen which says Loading Block Index).
8. Finally get tired of waiting and switch to another app to do something while waiting...
9. When switching apps, the loading screen is hidden until you go back to PandaBank, and when it is hidden, an error window is revealed to have been behind it! Viola.
10. The error screen has an exclamation point on a stop sign and says, Error loading blkindex.dat.
11. Click "OK".
12. PandaBank closes with clicking "OK"
13. Navigate to to ~/Library/Application\ Support/Pandacoin/ and delete all its contents except for wallet.dat
14. Empty the Trash
15. Open PandaBank
16. It works.
17. Now it will take a long time to get things back to normal, through syncing.
I attempted to make a quick video of this to help you troubleshoot. https://youtu.be/HjUSjLIGuu0 Thanks for everything
~John
This may be due to how I had you install Berkely. Did the trouble begin after you downloaded our snapshot? Is it happening now if you close and re-open PandaBank? It might be a good idea to close PandaBank and brew uninstall berkeley-db4 and then brew install berkeley-db@4. I had a typo the first time I asked you to install it. I second guessed myself and diverged from our recommended version, the berkeley-db@4 is what we are using on ours.