Repeated call to convert (via COM) causes VB.net to crash!
Posted: 2010-06-24T04:44:17-07:00
I'm using the imagemagick object to batch convert images. If I call the CONVERT method after about 400-500 attempts the application starts lagging, before finally crashing/hanging.
If I replace the line by instead just doing a SHELL, then all is fine...
ie: Instead of this
Do this...
The call is being made from a threaded environment, but surely that can't be to blame?
It's like clockwork too! About 400-500 converts, and the CONVERT fails (via the COM).
And I've tried this on Vista64 and XP.
If I replace the line by instead just doing a SHELL, then all is fine...
ie: Instead of this
Code: Select all
ImageMagick.Convert(public_txtSourcePath + FileName, "-resize", "200x150", "-background", "black", "-gravity", "center", "-extent", "200x150", "-quality", "60", "-strip", public_txtThumbPath + FileName.ToLower)
Code: Select all
Dim command As String = "convert.exe """ + public_txtSourcePath + FileName + """ -resize 200x150 -background black -gravity center -extent 200x150 -quality 60 -strip """ + public_txtThumbPath + FileName.ToLower + """"
Shell(command, AppWinStyle.Hide, True)
It's like clockwork too! About 400-500 converts, and the CONVERT fails (via the COM).
And I've tried this on Vista64 and XP.