Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error SHE0002 when building CHM with huge HTML files #1087

Open
ChetanRaiyani-CPR opened this issue Nov 18, 2024 · 0 comments
Open

Build error SHE0002 when building CHM with huge HTML files #1087

ChetanRaiyani-CPR opened this issue Nov 18, 2024 · 0 comments

Comments

@ChetanRaiyani-CPR
Copy link

ChetanRaiyani-CPR commented Nov 18, 2024

SHFB version : 2024.9.12.0
Target binaries : .NET 8

When building CHM file with huge HTML files(4000+), it gives SHE0002 build errors.
This is very generic error, So can not solve this error.
Checked Folder read-only property etc, but can not solve this error with anything.

Please refer attachment.
(Due to confidential info, I have hide some information in image)
SHFB_BuildError

Build error :
SHFB: Error SHE0002: Unexpected error during title and keyword HTML extract
at SandcastleBuilder.Utils.BuildEngine.TitleAndKeywordHtmlExtract.ExtractHtmlInfo()
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.Build()

One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner1 source, ParallelOptions parallelOptions, Action1 simpleBody, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body)
at SandcastleBuilder.Utils.BuildEngine.TitleAndKeywordHtmlExtract.ParseFiles(String fileFolder, String localizedOutputFolder)
at SandcastleBuilder.Utils.BuildEngine.TitleAndKeywordHtmlExtract.ExtractHtmlInfo()

Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffsetBytes, Array dst, Int32 dstOffsetBytes, Int32 byteCount)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at SandcastleBuilder.Utils.BuildEngine.BuildProcess.ReportProgress(BuildStep step, String message, Object[] args)
at SandcastleBuilder.Utils.BuildEngine.TitleAndKeywordHtmlExtract.ProcessFile(String basePath, String sourceFile, String localizedOutputFolder)
at SandcastleBuilder.Utils.BuildEngine.TitleAndKeywordHtmlExtract.<>c__DisplayClass35_0.b__0(String file)
at System.Threading.Tasks.Parallel.<>c__DisplayClass42_0`2.b__1()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass176_0.b__0(Object )

Note :
SHFB version : 2022.2.6.0
in this version, CHM generation is successfully carried out. though it gives another problem.
Problem : Microsoft API's link does not appear in built CHM.
Please refer attached image for this issue :
(Due to confidential info, I have hide some information in image)
MSLinkMissing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant