Internal error: Failed to load Master TOC - #2
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Internal error: Failed to load Master TOC - #2
I now have the same problem as described in WebHelp Topic: Internal error: Failed to load Master TOC (Originally posted on that board but moved here as it isn't a WebHelp etc. problem)
We have two users, two PCs, collaborating on source control.
Flare on my PC was OK, but my colleague was getting this problem when trying to open the TOC or build HTML Help. We just synched our projects and now I have the same problem. [Observation - before the issue arose, my .fltoc was not binary (could open and read in TextPad). Now the .fltoc appears to be binary (garbage in TextPad).]
I can replace the .fltoc file with one backed up on my machine about a month ago and it works just fine - plain text.
Smells of a corrupted .fltoc. Any other suggestions?
We have two users, two PCs, collaborating on source control.
Flare on my PC was OK, but my colleague was getting this problem when trying to open the TOC or build HTML Help. We just synched our projects and now I have the same problem. [Observation - before the issue arose, my .fltoc was not binary (could open and read in TextPad). Now the .fltoc appears to be binary (garbage in TextPad).]
I can replace the .fltoc file with one backed up on my machine about a month ago and it works just fine - plain text.
Smells of a corrupted .fltoc. Any other suggestions?
You do not have the required permissions to view the files attached to this post.
Some mornings it just doesn't seem worth it to gnaw through the leather straps.
Re: Internal error: Failed to load Master TOC - #2
Was the TOC file ever edited outside of Flare? There was another post about someone doing that and the other program apparently saved the file as UTF8 even though the first line of the file said it was UTF16 or vice versa -- can't remember which way it's supposed to be. I think the error message was a bit different, though.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Re: Internal error: Failed to load Master TOC - #2
No, it wasn't ever edited outside Flare.
The TOC was generated on my PC, checked into source control from where it was loaded onto my colleague's PC. The TOC (and consequently the HTMLHelp build) never worked on her PC. Her version got checked into source control and thence onto my PC. Source control rollbacks don't work.
FYI support are onto it.
The TOC was generated on my PC, checked into source control from where it was loaded onto my colleague's PC. The TOC (and consequently the HTMLHelp build) never worked on her PC. Her version got checked into source control and thence onto my PC. Source control rollbacks don't work.
FYI support are onto it.
Some mornings it just doesn't seem worth it to gnaw through the leather straps.
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
Hi Andrew,
I'm also experiencing this issue.
I opened up TOCs in a hex editor as my text editor also choked on those that Flare sneered at.
I was under the impression that the files were pure ASCII xml with a fltoc extensions.
There are some garbage characters at the top of the file. Changing those characters to match those in the projects I own allows me to work with them. However, once I commit the project, the owner of that project can no longer use that TOC. A TOC must be transferable.
This requires an explanation. When I commit a project, if another team member cannot fetch that project and compile it, that indicates a serious issue that could have serious repercussions. If I fall onto a subway track tonight and the other writer can't publish, I'd like to warn you ahead of time that an extremely angry product manager is going to visit La Jolla with a look to knocking it off into the water.
Bring your water wings, guy. He's mean. Hey, can you look down onto Black's Beach from there?
I'm also experiencing this issue.
I opened up TOCs in a hex editor as my text editor also choked on those that Flare sneered at.
I was under the impression that the files were pure ASCII xml with a fltoc extensions.
There are some garbage characters at the top of the file. Changing those characters to match those in the projects I own allows me to work with them. However, once I commit the project, the owner of that project can no longer use that TOC. A TOC must be transferable.
This requires an explanation. When I commit a project, if another team member cannot fetch that project and compile it, that indicates a serious issue that could have serious repercussions. If I fall onto a subway track tonight and the other writer can't publish, I'd like to warn you ahead of time that an extremely angry product manager is going to visit La Jolla with a look to knocking it off into the water.
Bring your water wings, guy. He's mean. Hey, can you look down onto Black's Beach from there?
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Re: Internal error: Failed to load Master TOC - #2
AHA!
Yes, this is serious. It has recurred for us; I am the only one who can edit the TOC and generate compiled help.
Trent - are you submitting a bug report?
Yes, this is serious. It has recurred for us; I am the only one who can edit the TOC and generate compiled help.
Trent - are you submitting a bug report?
Some mornings it just doesn't seem worth it to gnaw through the leather straps.
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
Andrew Heard wrote:AHA!
Yes, this is serious. It has recurred for us; I am the only one who can edit the TOC and generate compiled help.
Trent - are you submitting a bug report?
It's in the system now.
The problem is that from somehow, we're getting UTF-16 project imports from Frame, while Word is giving us UTF-8. Flare can read either one. Projects generated by default from Flare are UTF-8.
The kicker is that the imported files have byte-ordering prefixes and those from Flare do not.
I had to use a hex editor to open the corrupt files. I think everything, especially if you need to mix two types of projects under a master project, should be UTF-8.
This file is for project built from a word import: This file is a default generated for a dummy project: UTF-16 with byte-ordering prefix: I don't know why such projects the other writer created will compile on their system and not on mine. Both of us can compile the dummy project. We at first suspected it was some oddity from CVS, but we've ruled out that issue since we can both compile the dummy.
For expediency, we're going to manually normalize the files as UTF-8 without byte-ordering.
It isn't hard to do if you know a little perl and have a hex editor. But it's going to take time.
You do not have the required permissions to view the files attached to this post.
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Re: Internal error: Failed to load Master TOC - #2
Trent - you said "It isn't hard to do if you know a little perl and have a hex editor. But it's going to take time."
Why do you need perl? When I changed my TOC to UTF-8 I just edited it in Notepad, and then it opened in Flare without the error. Just curious.
Jenny.
Why do you need perl? When I changed my TOC to UTF-8 I just edited it in Notepad, and then it opened in Flare without the error. Just curious.
Jenny.
Jenny
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
Mine UTF-16 files were in double-byte format. That's what those columns of zeros are. After stripping the zeros with a little perl script, I discovered that a couple had broken CR/LFs (0d 0a). The files that were corrupt wouldn't open in a text editor.
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Re: Internal error: Failed to load Master TOC - #2
Thank you, thank you, thank you!
Guys, I didn't understand everything in the above post, but it was enough to figure out that if I edited each of my corrupt TOCs in Notepad to remove those little square thingies, then my TOCs would no longer be corrupt!
This has been a huge issue for us and to have a solution is fantastic!
Thanks again!
Emily
Guys, I didn't understand everything in the above post, but it was enough to figure out that if I edited each of my corrupt TOCs in Notepad to remove those little square thingies, then my TOCs would no longer be corrupt!
This has been a huge issue for us and to have a solution is fantastic!
Thanks again!
Emily
Re: Internal error: Failed to load Master TOC - #2
What source control are you using, TFS?
If you submit your bug feedback request here, the more likely it'll get fixed or included in a future release
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
Open Utilities PageLayout Resizer for Flare/Blaze | Batch builder
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
We're using CVS.
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Re: Internal error: Failed to load Master TOC - #2
We encountered this problem with source control as well. The UTF-8 files were working fine, but the UTF-16 TOC files were getting garbled. We changed the source control to check the FLTOC files in as binary instead of plain text, and this solved the issue. We never saw those junk characters at the beginning of the file, however. In Notepad, the line breaks were being replaced with three boxes, so we had to go through and replace these with line breaks again before checking them in so Flare could read them.
Thought I'd throw that out, in case anyone has the same issue.
Thought I'd throw that out, in case anyone has the same issue.
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
We ended up cleaning them all. I wrote a perl script to make the change. It is odd though.
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Re: Internal error: Failed to load Master TOC - #2
So is this a source control problem, a Flare problem or a local system problem?
We've just had a recurrence of same. Cleaned up (thanks for the tips, TtT) by removing leading chars, hex 00 and extra groups of line breaks in TextPad.
Question is - why only the TOC file? There are thousands of other UTF-16 files in a project.
Need to get this sorted - have submitted another support case.
____EDIT____
My Perforce guru colleague suggests that it may be because the fltoc file is not a true text or xml file, thus confusing the source control.
Have set one version to binary and another to text (8-bit). Will report back.
We've just had a recurrence of same. Cleaned up (thanks for the tips, TtT) by removing leading chars, hex 00 and extra groups of line breaks in TextPad.
Question is - why only the TOC file? There are thousands of other UTF-16 files in a project.
Need to get this sorted - have submitted another support case.
____EDIT____
My Perforce guru colleague suggests that it may be because the fltoc file is not a true text or xml file, thus confusing the source control.
Have set one version to binary and another to text (8-bit). Will report back.
Some mornings it just doesn't seem worth it to gnaw through the leather straps.
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
Hey, thanks! Great find. I never considered how source control was dealing with the file. I'd sure like to find out once and for all what's breaking those darned things.Andrew Heard wrote:So is this a source control problem, a Flare problem or a local system problem?
We've just had a recurrence of same. Cleaned up (thanks for the tips, TtT) by removing leading chars, hex 00 and extra groups of line breaks in TextPad.
Question is - why only the TOC file? There are thousands of other UTF-16 files in a project.
Need to get this sorted - have submitted another support case.
____EDIT____
My Perforce guru colleague suggests that it may be because the fltoc file is not a true text or xml file, thus confusing the source control.
Have set one version to binary and another to text (8-bit). Will report back.
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Re: Internal error: Failed to load Master TOC - #2
This could be the final word - save the fltoc as binary in source control.
This recommended by Madcap support (and my local source control guru).
Submitted as binary - can now be shared without breaking. Can also do a diff in text mode, so I'm hoping that it will be mergeable.
Incidentally, saved a couple of other test fltocs as Text (UTF-8, I believe) - these were not shareable and returned the same error as the UFT-16 versions. When converted to binary they were fine.
This recommended by Madcap support (and my local source control guru).
Submitted as binary - can now be shared without breaking. Can also do a diff in text mode, so I'm hoping that it will be mergeable.
Incidentally, saved a couple of other test fltocs as Text (UTF-8, I believe) - these were not shareable and returned the same error as the UFT-16 versions. When converted to binary they were fine.
Some mornings it just doesn't seem worth it to gnaw through the leather straps.
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
Great work! Thanks, Andrew!!
This is probably a good idea for all of Flares oddball extensions.
This is probably a good idea for all of Flares oddball extensions.
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Re: Internal error: Failed to load Master TOC - #2
Just to update this - I've been in touch with MadCap support and it's now a full fledged bug. Please add your weight to this so it gets fixed soon and the UTF-16 related pain stops.

TOC files should be encoded as UTF-8 (after being edited) instead, we are encoding them as UTF-16. This is a bug and I have passed it on to our development team.
Re: Internal error: Failed to load Master TOC - #2
I had this problem a few years ago using VSS and found out the binary option worked (pity I didn't spot this thread earlier). Anyway, it doesn't have any knock-on effects.
Re: Internal error: Failed to load Master TOC - #2
Yes the binary option would work - however it's not helpful when it comes to many popular tasks such as merge and diff. There's no reason to use UTF-16 so hopefully MadCap will fix this up for us. 
-
trent the thief
- Propellus Maximus
- Posts: 614
- Joined: Wed Feb 01, 2006 6:21 am
- Location: Off in the dark....
Re: Internal error: Failed to load Master TOC - #2
How often does a person need to diff and merge a TOC? I've need to do that to a few source files, but never had it come up in a TOC.helen wrote:Yes the binary option would work - however it's not helpful when it comes to many popular tasks such as merge and diff. There's no reason to use UTF-16 so hopefully MadCap will fix this up for us.
But still, I'd be great for them to fix this.
I submitted it long ago. I'm glad someone else is yelling about it
Trent.
Certifiable.

umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Are you on Flare's Slack channels? PM me for an invitation! 
Certifiable.
umm...
I meant MAD Certified.
Official Propeller Beanie Owner
Re: Internal error: Failed to load Master TOC - #2
Granted not often, but that's not an excuse.
It's just another overhead for those of us using source control systems so hopefully it will be fixed soon.
Re: Internal error: Failed to load Master TOC - #2
I'm conflicted here: Glad to see this UTF-16 issue get some attention after so many years. Frustrated to see folks still suffering from it after so many years.
Once I figured out what was happening, I've always been puzzled that Flare declares its XML files as UTF-8 ("encoding=utf-8") but then saves them with the UTF-16 byte order mark (BOM), causing much wailing and gnashing of teeth when using revision control systems like CVS that are bad at handling binary files and dependent on file endings.
Once I figured out what was happening, I've always been puzzled that Flare declares its XML files as UTF-8 ("encoding=utf-8") but then saves them with the UTF-16 byte order mark (BOM), causing much wailing and gnashing of teeth when using revision control systems like CVS that are bad at handling binary files and dependent on file endings.
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Re: Internal error: Failed to load Master TOC - #2
When more than one writer is editing the TOC. We now have three writers working on the same project simultaneously, all of whom could have reason to modify the TOC.trent the thief wrote:
How often does a person need to diff and merge a TOC?
Perforce will do a diff and merge on a .fltoc saved as binary.helen wrote:Yes the binary option would work - however it's not helpful when it comes to many popular tasks such as merge and diff.
UPDATE
Merge corrupts the fileI wrote:Perforce will do a diff and merge on a .fltoc saved as binary.
Last edited by Andrew Heard on Tue Nov 17, 2009 12:11 am, edited 3 times in total.
Some mornings it just doesn't seem worth it to gnaw through the leather straps.
-
Andrew Heard
- Sr. Propeller Head
- Posts: 139
- Joined: Tue Aug 19, 2008 12:17 am
- Location: Perth, Western Australia
Re: Internal error: Failed to load Master TOC - #2
Update -
Problem still there - when TOC is merged, it gets corrupted and cannot be shared. Even when set to binary, sets to UTF-16 and adds junk characters.
In this case, it also overwrote a large portion of the file with junk, so that the original content is unrecoverable.
Problem still there - when TOC is merged, it gets corrupted and cannot be shared. Even when set to binary, sets to UTF-16 and adds junk characters.
In this case, it also overwrote a large portion of the file with junk, so that the original content is unrecoverable.
You do not have the required permissions to view the files attached to this post.
Some mornings it just doesn't seem worth it to gnaw through the leather straps.