* Backup & Restore Plugin error

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Backup & Restore Plugin error

Post by ColinMc » 01 Feb 2022 11:01

Last night i hit an error on opening the plugin

Code: Select all

[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1563: attempt to index a nil value (local 'strText')
stack traceback:
	[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:1563: in field 'FileLines'
	[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:4767: in upvalue 'doSetProgramVersions'
	[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5907: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5905>
	(...tail calls...)
	[C]: in function 'iuplua.MainLoop'
	[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2439: in field 'ShowDialogue'
	[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5926: in function 'GUI_MainDialogue'
	[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5966: in main chunk
I had been moving quite a few media file locations, and I made a couple of Fact alterations, but other than that, I can't think of anything I've done to change things since the plugin run last (successfully) on the 29th Jan.

Running v3.1 of plugin and 7.09 FH
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Backup & Restore Plugin error

Post by tatewise » 01 Feb 2022 11:25

That is very strange. The Plugin is running a Batch command file script and saving the results in:
C:\ProgramData\Calico Pie\Family Historian\Plugin Data\
Please check that folder and post the contents of any Backup and Restore Family Historian Settings.bat or .dat or .reg files.

The error message is saying there is no text in the Backup and Restore Family Historian Settings.reg file.

The changes you made should not impact the plugin. Is the error repeatable?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & Restore Plugin error

Post by ColinMc » 01 Feb 2022 14:34

I only have a .dat and a .reg file in that location contents as follows

Backup and Restore Family Historian Settings.dat

Code: Select all

return {
-- Table: {1}
{
   ["Balloon"]="NO",
},
}

The .reg file is empty - as you suggest.

I've done a search, and have no other .bat .dat or .reg files anywhere (other than inside backups). The Recycle bin also has no copies of them and it was last emptied on 28th Jan ie before the plugin ran successfully on the 29th, so if I'd deleted it accidentally - and I'm certain I was never anywhere near that folder - it should have been there.

The error is repeatable. It happened twice last night, and again twice this morning. Incidentally, if I exit the LUA error screen, FH is shut down as well.

I suspect it is not relevant, but here's the 29th Jan versions of .bat & .dat from the backup location. I cannot see any .reg files inside older backups.


Backup and Restore Family Historian Settings.bat

Code: Select all

		@ECHO OFF
		ECHO.
		ECHO REG QUERY "HKLM\SOFTWARE\Calico Pie" /S
		ECHO.
		REG QUERY "HKLM\SOFTWARE\Calico Pie" /S > "C:\ProgramData\Calico Pie\Family Historian\Plugin Data\Backup and Restore Family Historian Settings.reg"
		(IF ERRORLEVEL 1 ECHO. PAUSE)
		ECHO.
		EXIT


Backup and Restore Family Historian Settings.dat

Code: Select all

return {
-- Table: {1}
{
   ["Balloon"]="NO",
},
}
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Backup & Restore Plugin error

Post by tatewise » 01 Feb 2022 15:03

Thank you for the feedback. Unfortunately, the problem is still a mystery.
There won't be any of those files in the Recycle Bin because they get permanently deleted unconditionally.
It has been mentioned before, but Exit in the Lua Error popup means Exit & Close FH. Strange but true.
Those backup copies of the two files contain exactly what they should.
The .reg file is usually deleted so won't appear in the backups.

That the Backup and Restore Family Historian Settings.bat file is missing is unexpected.
Please run the plugin again and while the Lua Error is displayed check for that .bat file and post its contents.

The only other suggestions are to download the Plugin again and if that does not fix it then reinstall FH.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & Restore Plugin error

Post by ColinMc » 01 Feb 2022 16:26

Thanks for the help so far.

Just run the plugin again, and this time it opened as expected. The .bat file is there now - but disappears after completion - presumably under plugin control.

Code: Select all

		@ECHO OFF
		ECHO.
		ECHO REG QUERY "HKLM\SOFTWARE\Calico Pie" /S
		ECHO.
		REG QUERY "HKLM\SOFTWARE\Calico Pie" /S > "C:\ProgramData\Calico Pie\Family Historian\Plugin Data\Backup and Restore Family Historian Settings.reg"
		(IF ERRORLEVEL 1 ECHO. PAUSE)
		ECHO.
		EXIT

The only difference is that I re-booted the machine in between the last attempt and just now.

I've just run the plugin 5 times in quick succession and it completes happily without issue. So all seems well now.

A mystery - no doubt caused by some WIn 10 issue in the background, as it cleared itself. Thanks again for your time (and expertise)
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Backup & Restore Plugin error

Post by tatewise » 01 Feb 2022 16:45

Yes, I should have suggested that a PC Restart might help and remember that next time a similar error arises.

I have been experimenting and may have stumbled on a possible explanation.
The plugin relies on the batch CMD prompt to run the .bat file.
In Windows 10, the CMD prompt has been superseded by the Windows PowerShell.
If the plugin .bat file is run in the Windows PowerShell it creates an empty .reg file :!:
So I wonder if somehow Windows 10 had 'lost' the CMD prompt and was substituting the Windows PowerShell.

I had discovered a workaround that is compatible with both the CMD prompt and the Windows PowerShell but relies on all PC these days being 64-bit and not 32-bit.
However, hopefully, the PC Restart solution is a permanent fix and does not need a workaround.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & Restore Plugin error

Post by ColinMc » 01 Feb 2022 17:17

Thanks for the confirmation.

As an aside, I do not have a .reg file anywhere on my PC. Once the plugin completes and tidies up, should there be a .reg file?
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Backup & Restore Plugin error

Post by tatewise » 01 Feb 2022 17:22

No, the plugin tidies up the .reg files as it goes because some are quite large.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Backup & Restore Plugin error

Post by ColinMc » 01 Feb 2022 17:28

Again, Thanks. Hopefully the end of this topic
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

Post Reply