Asa reported in https://github.com/bitcoin/bitcoin/issues/25146, when configured to load with a wallet that cannot be loaded, there is a segfault during the shutdown procedure.
I have been able to trace this segfault to the SplashScreen
where the it appears that it is executing an interfaces::Handler
that is accessing an object that has already been deleted. This seems to be related to this comment about cleaning up WalletController
. Deleting m_splash
at the same place appears to resolve the problem. However I am not sure if that is a viable long term fix.
Note that the segfault does not always occur for me. I believe this is due to deletion order which is not always the same. So sometimes m_splash
is deleted before contexts are deleted, and sometimes after those contexts are deleted. I believe the segfault is due to accessing those contexts after deletion.