We are getting the following error event for a chm files when trying to index them.
We are getting the exception via index.Events.ErrorOccurred += ...
System.ArgumentException: MaxValue can't be less than StartValue
at ..ctor(Int32 , Int32 )
at e..ctor(Nullable`1 , IList`1 , FormattedTextOptions )
at e..ctor( , Nullable`1 , FormattedTextOptions )
at .(Nullable`1 , TextOptions )
at GroupDocs.Parser.Parser.GetText(TextOptions options)
at .(Document , , String )"
I attached a file with this behavior:
Documentation.zip (885.8 KB)
Here is one more file with this problem. It was too large to upload here: DDBACSdk.chm - Google Drive
@jamsharp
The error message you are encountering, System.ArgumentException: MaxValue can't be less than StartValue
, typically indicates that there is an issue with the parameters being passed to a method or constructor, specifically regarding the range of values. This can occur during the indexing process when the library attempts to process certain files, such as CHM files in your case.
To troubleshoot this issue, consider the following steps:
-
Check the Input Files: Ensure that the CHM files you are trying to index are not corrupted and are in a valid format. Sometimes, malformed files can lead to unexpected exceptions.
-
Review the Indexing Options: When you are setting up the indexing options, ensure that all parameters are correctly configured. For instance, if you are specifying ranges or limits, make sure that the maximum value is greater than or equal to the starting value.
-
Event Handling: Since you are using the ErrorOccurred
event to capture exceptions, you can enhance your error handling to log more details about the specific file that caused the error. This can help you identify if the issue is isolated to certain files.
Here is a sample code snippet that demonstrates how to handle the ErrorOccurred
event and log additional information:
index.Events.ErrorOccurred += (sender, args) =>
{
// Log the error message
Console.WriteLine("Error occurred: " + args.Message);
// Optionally log the document that caused the error
if (args.DocumentFullPath != null)
{
Console.WriteLine("Document causing the error: " + args.DocumentFullPath);
}
};
- Consult Documentation: If the problem persists, refer to the official documentation or community forums for any known issues related to CHM file indexing. There may be specific configurations or updates that address this error.
If you continue to experience difficulties, consider sharing the specific CHM file that triggers the error with the support team for further analysis.
If you have any additional questions or need further assistance, feel free to ask!
@jamsharp
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SEARCHNET-3478
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
I attached one more file with a similar callstack: DDBACSdk.chm - Google Drive
1 Like