Document (.doc) converting to .txt is causing app to hang

1 Answer 111 Views
WordsProcessing
Lee
Top achievements
Rank 1
Lee asked on 19 Oct 2022, 10:05 AM

I'm doing a recursive file search through a lot of documents (1000000+) for a client, depending on the document type/age/size/name/path the app may read the document.

this is the read code

Dim docprovider As New Doc.DocFormatProvider()
		Using input As Stream = File.OpenRead(_fname)
			Dim TxtFormatProvider As New TxtFormatProvider
			text = TxtFormatProvider.Export(docprovider.Import(input))
		End Using

Occasionally the app will hang waiting for the

TxtFormatProvider.Export(docprovider.Import(input))

Thread to return.

I'm guessing the input stream of the .doc file is malformed in someway, and I'm not really concerned about it, but how can I get the thread to quit so the app can go to the next file?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Oct 2022, 08:40 AM

Hello Lee,

How large is the file that you are converting? 

I want to ask you to make sure that the exceptions in Visual Studio are enabled and to test this in debug mode. This way we will see if an exception occurs. If yes please send us the stack trace and we will try to identify what is causing this. 

The best approach for such cases is to submit a support ticket and attach your file there. This way we can properly investigate the case and determine what is causing any issues. 

I am looking forward to your reply.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
WordsProcessing
Asked by
Lee
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or