* Problem setting up new laptop

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
rob p
Gold
Posts: 29
Joined: 01 Feb 2021 22:03
Family Historian: V7

Problem setting up new laptop

Post by rob p » 25 Mar 2022 22:09

I bought a new laptop and installed my 'other' license of FH7 (7.0.11.0) on it.
I followed the kb-article/family-historian-copy-and-migration-guide strictly.
I copied my projects and data OK, but can't get my settings and customizations. I ran the backup-and-restore plugin, also per instruction. But I get the following error message:

LUA ERROR
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:4799: attempt to compare nil with number
stack traceback:
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:4799: in upvalue 'getTime'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:4815: in upvalue 'intTime'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5967: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5898>
(...tail calls...)
[C]: in function 'iuplua.MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2712: in field 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:6257: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:6297: in main chunk

There is no going forward. Clicking "Continue" does nothing, the plugin can't be terminated, the computer is completely non-responsive; the only way out is Windows Task Manager>End Task. I tried three times, even went back to the source PC and re-created the backup; same.

(Source PC-Windows.10, Target Laptop-Windows.11, both up-to-date; both FH7.0.11.0)

Whassup? Any help?

User avatar
Mark1834
Megastar
Posts: 2147
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Problem setting up new laptop

Post by Mark1834 » 25 Mar 2022 23:08

The error message refers to line numbers in the plugin script, so detailed examination will probably have to wait until Mike comes back on line tomorrow. Technically, you are restoring to a different version of Windows (from 10 onto 11), but all the plugin does is backup and restore two folders and two Registry keys, and I'm not aware of any differences in these between the two Windows versions (which are very similar in their internal plumbing).
Mark Draper

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

Re: Problem setting up new laptop

Post by tatewise » 26 Mar 2022 10:39

Sorry about that error rob.
It is rather odd because it is caused by a file that has an unusual Modified Date.

To investigate further please download and run the attached Backup and Restore Family Historian Settings plugin Version 3.2.1 Date 26 Mar 2022.

When it encounters the problem it should report the Modified Date and the full file path. Click OK to continue.
Let me know what it says so that a workaround can be devised.

If more than one such error is reported then click the Cancel button to abort, then click Continue, and finally use the X Close icon top right of the plugin window.
Last edited by tatewise on 27 Mar 2022 21:22, edited 1 time in total.
Reason: Attachment deleted as later version is attached to later posting
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
rob p
Gold
Posts: 29
Joined: 01 Feb 2021 22:03
Family Historian: V7

Re: Problem setting up new laptop

Post by rob p » 27 Mar 2022 15:39

I first ran the revised plugin (Restore) using the 'same' backup file, and got essentially the same result.
Several 'new' pop-up's showed, each with detail reporting the 'problem date' and the full file path. Example:
Image
I clicked OK through 2 or 3 of these, and then clicked Cancel to abort. At that point, a similar "LUA ERROR" dialog appeared:
LUA ERROR
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:4818: DateLastModified is abnormal
stack traceback:
[C]: in function 'error'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:4818: in upvalue 'intTime'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5488: in local 'doBatchJob'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5536: in upvalue 'doImportRegistry'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:6016: in function <[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:5904>
(...tail calls...)
[C]: in function 'iuplua.MainLoop'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:2712: in field 'ShowDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:6263: in function 'GUI_MainDialogue'
[string "C:\ProgramData\Calico Pie\Family Historian\Pl..."]:6303: in main chunk

, and once again everything was locked up. ...Task Manager>End Task.

I then went back to the Source PC, and tried to re-create a new backup file with the revised plugin. This time, I got a whole new series of warnings - similar to those of the Restore effort - followed by a similar LUA ERROR dialog. Here, however, I was able to abort and close without Task Manager. It created an empty "Family Historian" (backup) folder. (I had saved the previous backup elsewhere.)

I'm really confused now.
Attachments
Screenshot 2022-03-27 093002.jpg
Screenshot 2022-03-27 093002.jpg (23.86 KiB) Viewed 1314 times

avatar
rob p
Gold
Posts: 29
Joined: 01 Feb 2021 22:03
Family Historian: V7

Re: Problem setting up new laptop

Post by rob p » 27 Mar 2022 16:50

Clue?
Out of curiosity, I looked at the various file dates that seem to be of issue. For example, the one shown in my screenshot, ...\Application\Preferences\prefs.dat; the reported 'abnormal' "Date Modified 3/11/22 6:00:14 PM" is actually "...3/11/22 5:00 PM". There is exactly one hour difference in the dates I looked at.
Might this be related to our crazy stupid Daylight Saving Time? The time switch was after 11 Mar. The PC changed automatically to DST; I got the Laptop after. Both computers show the same time right now. Do Windows 10 & 11 handle this differently?
I'm still confused.

I consider my desktop PC as the primary source for my FH projects. I will use the laptop for research trips, and for "show-and-tell" with friends and family. I intended to use Backup and Restore to manually sync them whenever changes are made. I want this to work.

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

Re: Problem setting up new laptop

Post by tatewise » 27 Mar 2022 19:05

Thank you for the feedback Rob. The screenshot of the error message has given me everything I need.

In all my tests so far, the day of the month, and the hour of the day, have always been 2 digits.
But your screenshot shows the leading zeroes have been suppressed:
3/11/2022 6:00:14 whereas the plugin is expecting 03/11/2022 06:00:14

I have found the Settings for 'Change data formats' that customises 'Short date' and 'Long time' and will cater for all the options in the next published version of the plugin.

The attached Backup and Restore Family Historian Settings plugin Version 3.2.2 Date 27 Mar 2022 should fix the problem for your formats.
Last edited by tatewise on 31 Mar 2022 15:57, edited 1 time in total.
Reason: Attachment deleted as later version is attached to later posting
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
rob p
Gold
Posts: 29
Joined: 01 Feb 2021 22:03
Family Historian: V7

Re: Problem setting up new laptop

Post by rob p » 27 Mar 2022 20:28

New problem...
Installed and ran v.3.2.2.
...After the Close Program> OK-Quit Plugin, the next expected dialog (Do you want to continue and import Registry Data Keys [Y/N] ?) appears in a Windows Command Prompt pane. I tried to answer there, and everything closes.

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

Re: Problem setting up new laptop

Post by tatewise » 27 Mar 2022 20:51

The final step of restoring the Registry Keys data is quite unusual.
After clicking OK - Quit Plugin the plugin closes.
Then it is crucial that you close FH itself, leaving just the Command Prompt window.
Enter Y and press Enter to complete the Registry Keys restoration.
The Command Prompt window closes and when you reopen FH all the Windows Registry settings should be restored.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
rob p
Gold
Posts: 29
Joined: 01 Feb 2021 22:03
Family Historian: V7

Re: Problem setting up new laptop

Post by rob p » 27 Mar 2022 21:41

Yes! :D All is well.
I’m sorry if I sent you chasing rabbits. But whatever you did to accommodate my (preferred) date format will be good. Thank you for your work and for your patience!

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

Re: Problem setting up new laptop

Post by tatewise » 28 Mar 2022 14:01

Backup and Restore Family Historian Settings plugin Version 3.3 Date 28 Mar 2022 is now in the Plugin Store.

That caters for all the date-time formats set by 'Change data formats' in the 'Short date' and 'Long time' options in Win 10.


P.S.
I've run some further tests and a few date-time formats are still not handled correctly.
It also relies on 'English' formats, so need to investigate if foreign language formats are different.
Does anyone have any tips for converting file modified date-time to Unix timestamp seconds since 1-Jan-1970 in a plugin?

See end of thread Restoring Settings to New OS Build (20497).
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply