MinGW Runtime Assertion error


I have recently switched PCs and I am trying to get my litecoin wallet over to my new PC. Now I have an issue starting with my old PC, where Litecoin Core keeps crashing. It gives me a MinGW Runtime Assertion error message:

Assertion failed!

Program: C:\Program Files\Litecoin\litecoin-qt.exe
File: validation.ccp, Line 2366

Expression: "setBlockIndexCandidates.empty()

If I click on “Retry”, the runtime terminates the program.

I had not backed up my wallet.dat file and when I now try to replace the wallet.dat file on my new PC, it gives me the same error. I have since uninstalled Core on my new PC, wiping all data, and reinstalled it to have a new, functioning, albeit empty wallet.

What can I do?

Thanks in advance for your help

on the old PC, you need to backup your wallet.

press Windows key, type %appdata%, press enter.
look for litecoin folder, open it.
look for the wallet.dat file, back it up.

All this will work if you are using the default datadir for the wallet.

Back it up how exactly? I have it saved on a USB, but when I replace the wallet.dat file on my new computer with the old one, it gives me the same error message on my new PC. Could the wallet.dat file be corrupted somehow?

back it up again… the time of the backup is important.

yes, you just need to safe the file someplace else.

First of all, thanks for your help, forgot to say that in my last reply! Appreciate you taking the time.

The time of the backup matters? What time should it be? I have backed it up about 30mins ago. I still get the same error message on my old PC when trying to open the wallet.

When replacing the wallet.dat file on my new PC, should I first let the wallet complete the download of the blockchain?

I mean that, the time matters because if better to backup the wallet after transactions have been made.

and yes let the wallet fully sync them restore the old wallet.

I guess that was the problem, I tried to replace the wallet.dat file before completing the sync. All is good now, I have full access to my wallet.

Thanks so much for your help! Really appreciated.

nice to know!

HI Sorry to look dumb here but im having the same error message without having changed pc.
how can i bypass this?
thanks for any help in advance