* Multifact

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.
avatar
ColinMc
Superstar
Posts: 442
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Multifact

Post by ColinMc » 19 Dec 2019 14:45

Never used the plugin, but wanted to try it today.

When I clicked on Run, I got the normal Windows sand-timer and nothing else. Eventually I had to force a close of the FH program.

I checked that other Plugins were working OK, then I deleted the Multifact plugin and downloaded and opened it again.

The same thing happens with the timer appearing and the program just hangs. Again I have to force a close.

I appreciate this is not much info to work out why it is crashing, so is there anything I can do to test why it is failing? The only thing I can think off that may be non-standard is that I keep the plugins on One-drive with symbolic link to the Program data folder, but I'm sure others do that.

Colin
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
mjashby
Megastar
Posts: 692
Joined: 23 Oct 2004 10:45
Family Historian: V7
Location: Yorkshire

Re: Multifact

Post by mjashby » 19 Dec 2019 15:05

Colin,

In contrast, I very much doubt that there are many FH users who use symbolic links at all, let alone between the folders you mentioned, but I'd be pleased to be proved wrong. The only way I use them is to avoid the need for multiple copies of linked document/media files

If I remember correctly, the Multifact Plugin requires the presence of a 'dependency' i.e. a pl Folder containing around 38 small lua files which should also be present in the plugin folder. It's possible that your use of symbolic links has confused (doesn't support) that structure, but I could quite possibly be completely wrong.

Mervyn

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

Re: Multifact

Post by tatewise » 19 Dec 2019 15:40

I have the folders C:\Users\Mike\OneDrive\~ Calico Pie and C:\ProgramData\Calico Pie linked.
Multifact runs just fine on Windows 10. (I assume you are running Windows natively on a PC.)
You could also try Research Planner as that also requires the pl library.
That library should exist in C:\ProgramData\Calico Pie\Family Historian\Plugins\pl that holds 38 .lua files.

You could try running the Plugin in debug mode to find where it hangs.
Use Tools > Plugins and click More>> to expand side buttons.
Select Multifact and click Edit to open the Edit/Debug window.
Scroll down to about line 70 and click in the left-hand border to create a break point marked by a large red dot.
Now click the Go command top left to run the script and the red dot should gain a yellow arrow.
Now click the Step Into command to run one statement at a time until the program hangs.
Make a note of how far the Plugin got, and what Line number it reached (shown bottom right).

Multifact.png
Multifact.png (30.36 KiB) Viewed 9600 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Multifact

Post by ColeValleyGirl » 19 Dec 2019 15:54

Colin,

I assume because you'd have said otherwise that you're using Windows? What version?

Can you check that there is a directory called in

Code: Select all

pl
in

Code: Select all

C:\Windows\ProgramData\CalicoPie\FamilyHistoria\Plugins
or the equivalent (depending on your version of windows) as documented at glossary:family_historian_program_data_folder|> Family Historian Program Data Folder? If there is can you check that it has 38 .lua files within it?

The symbolic link may indeed be causing a problem -- I don't know of anyone else who uses that set up.

If the pl directory is missing, you could try downloading the library manually as described at glossary:family_historian_program_data_folder|> Family Historian Program Data Folder and extracting it to the right place yourself (the advice is intended for non-Windows environments but should work for you as well).

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 16:44

Thanks for the responses. I must admit I thought that it would be a bit more common to use the symbolic links. The ability to use the latop and the PC is a huge plus.
  • Running WIn 10 Home 64 V 1909 natively on a PC.

    Research Planner appears to run OK. I've never used it, so I'm not sure how to actually use it, but it opens fine

    I do have the pl directory in C:\ProgramData\Calico Pie\Family Historian\Plugins\pl

    It also appears in D:\OneDrive\Family Historian\05 - FH Data Folder\Plugins\pl

    There are 38 files in the pl folder
My OneDrive folder is in a non-standard location on D:

Using Debug took a LOT of clicks. Eventually it hung on line 881. I did notice however that it was on at least its second iteration through that loop of 880, 881 & 882. It may have been the third, as I did not watch that all that closely initially.

First time through that loop, I probably had a few hundered iterations (didn't count unfortunately) then the prog carried on elsewhere, only to return to a second (or maybe third) trip through those three lines. Again I must have had several hundred loops through just those three lines before it crashed on 881. So presumably it may be some specific value it came across. The attached screen grab may give some of the values that caused the problem.

It may of course be that it only felt like a few hundred, and the number is lower than that, but we certainly looped through 880-882 a lot of times, before returning to it.
Multifact.jpg
Multifact.jpg (491.65 KiB) Viewed 9583 times
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Multifact

Post by ColeValleyGirl » 19 Dec 2019 16:49

OK, that's code executed when reading all your fact files...

How many custom fact sets do you have, and how many facts in each?

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 16:55

Just realised that bit is not very readable. May need to run it again with that section enlarged to view all values.

Multifact 2.jpg
Multifact 2.jpg (99.46 KiB) Viewed 9579 times
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 17:02

Just the three . Funeral, Hobby & Newspaper article. I'm guessing somewhere between 50 & 75 in 1 and 3, and maybe just one or two in Hobbies. Not sure how I check that at the moment, I'll see if I can find out. Not sure how to.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Multifact

Post by ColeValleyGirl » 19 Dec 2019 17:08

Tools > Fact Types >Chooe each custom fact set in turn and count the number of fact definitions in each set... it's the number of fact definitions that matters, not the number of facts of each type.

Also, do you use a lot of "non-English" characters?

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 17:21

Not sure I'm understanding what you mean.

I Just have one set called Custom Facts, and there are 3 in it. Is that what you need?
Multifact 3.jpg
Multifact 3.jpg (52.75 KiB) Viewed 9566 times
Very very few (if any) "non-English" Characters. I thought I had one lady with an accented e, but on checking she hasn't. So it may be zero, but certainly a very low figure.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Multifact

Post by ColeValleyGirl » 19 Dec 2019 17:27

That's what I needed.

It doesn't seem to be a problem related to volume of fac typs

Mike, do you have any suggestions -- it's failing here:

Code: Select all

    function StrUtf16toUtf8(strChar1,strChar2) -- Convert a UTF-16 word or pair to UTF-8 bytes --
        local intUtf16 = string.byte(strChar2) * 0x100 + string.byte(strChar1)
        if intUtf16 < 0x80 then								-- U+0000 to U+007F (ASCII) 
            return string.char(intUtf16)
        end

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Multifact

Post by ColeValleyGirl » 19 Dec 2019 17:37

Colin, would you be willing to provide a copy of your custom fact definitions (the actual file which is in C:\ProgramData\Calico Pie\Family Historian\Fact Types\Custom -- the file called Custom.fhf and any other fhf files in the directory? You can add them as an attachment here.

That way I can test with your files to see if it's something in the files causing a problem.

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 17:48

Absolutely no problem, I really appreciate the work you people do on this. Having seen the code on this, I'm even more impressed than I was before. By the way I hope you don't mind me saying I think you must be crazy to do this!. But thanks all the same, it really is appreciated.

Anyway, files attached as requested.
Custom.rar
(6.77 KiB) Downloaded 150 times
I'm assuming you can unRAR ok.


Colin
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Multifact

Post by ColeValleyGirl » 19 Dec 2019 18:11

Colin -- thanks -- I probably won't be able to test with them until tomorrow now. (And yes, I'm probably crazy :) )

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 18:14

No probs, after all, it is Christmas time, and there's plenty of real work to do!

Thanks
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 19:22

Just thought Id try the debug again. I think it got further than last time but I cant be sure. It hasn't crashed yet, I've been clicking the step into for about 40 mins on and off and I'm getting really sore, so I have to stop now.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by ColinMc » 19 Dec 2019 19:32

Not sure if this helps.

I disabled all the Custom facts sets (simply by adding .safe) to each file name.

When I run Multifact now, I get an error message

Multifact 4.jpg
Multifact 4.jpg (19.28 KiB) Viewed 9549 times
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by tatewise » 19 Dec 2019 20:00

Helen, reviewing the Multifact script indicates it is reading the GroupIndex.fhdata file before anything else.
That also determines the order that the fact set files are processed.
So given that Colin has 7 Fact Sets (in RAR file) plus Standard suggests the problem may be in the GroupIndex.fhdata file or more likely the first Fact Set to be processed.

Colin can you post a copy of your GroupIndex.fhdata file from the C:\ProgramData\Calico Pie\Family Historian\Fact Types\Standard folder.

Unfortunately, hiding all the Fact Set files does not help, and just makes the Plugin fail even earlier.
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: Multifact

Post by ColinMc » 19 Dec 2019 20:10

Ok here's the GroupIndex file.
GroupIndex.fhdata
(262 Bytes) Downloaded 161 times
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by tatewise » 19 Dec 2019 20:34

I have tried a bit of investigative debugging but nothing obvious is revealing itself.

All I have noticed that is slightly irregular, is some files start with a blank line immediately after the BOM, but that should not cause any problems, so the program hang problem is still a mystery.

However, it is nothing to do with the pl library.

Thinking out loud, the Plugin must create C:\ProgramData\Calico Pie\Family Historian\Plugin Data\Multifact.dat which would involve OneDrive via the symbolic link and might be failing somehow.
Colin, does that folder exist yet? ( I know it has a misleading name but Multifact.dat actually is a folder. )
If that now exists then maybe there will be no error.
It will be empty, so it can be safely deleted. If you do that does the error come back?
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: Multifact

Post by ColinMc » 19 Dec 2019 21:39

The folder does exist, and it is empty.

Deleteing it does not help. It still hangs
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by tatewise » 19 Dec 2019 21:50

Colin, was the Plugin still hanging when that Multifact.dat folder existed?

I was expecting it to hang after it was deleted, because I thought the creation process was causing the hang.
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: Multifact

Post by ColinMc » 19 Dec 2019 22:04

Unfortunately, it is hanging with that folder or without.

Sorry
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

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

Re: Multifact

Post by tatewise » 19 Dec 2019 22:34

Can we try another debug session but with different break points.

So with the Edit/Debug window open, use Edit > Go To Line and enter 1816 before clicking OK.
Click in the margin to set a break point on line 1816 which is progbar.Step(1)
A few lines later also set a break point on line 1823 which is return tblFacts
Then use Edit > Go To Line for line 2387 and set a break point there at mySource.CitationState("CLOSE")

Now click Go to run the Plugin and it should stop at line 1816.
In the variables pane below enlarge it enough to reveal filename about the 13th entry.
That will be the name of the Fact Set file about to be processed.
Now click Go and the Plugin will process that file and stop again at the same break point, but for the next filename.
That should repeat 8 times, so note each filename to see which one invokes the hang.

If it does not hang it will eventually reach the break point on line 1823.
If so, then click Go again and it should reach break point on line 2387 after showing the GUI dialogue.
Finally click Go again and Plugin should run OK.

Hopefully somewhere in that sequence the hang point can be more closely identified.
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: Multifact

Post by ColinMc » 20 Dec 2019 08:49

Mike

Really sorry, but I just can't keep this up. I've been at it 15 mins this morning, and I'm not even finished the first file. Last night I timed a session, and on that basis, I've done approx 3000 clicks this morning already. That's on top of the two long sessions I did last night.

My finger aches (and my mouse may never be the same!). I've tried changing fingers, but speed is atrocious

Apart from that the sheer boredom is terrible!

Apologies, we may just have to accept this won't be solved (or at least using this method)
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families

Post Reply