![]() |
|
#1
|
|||
|
|||
|
ArgumentOutOfRangeException
Hi
I have one mp3 file that fails when I try to do aread on the file. It works fine with all my other files. ultraId.Read(fileList[i].FullName); returns this: System.ArgumentOutOfRangeException was unhandled Message="Non-negative number required.\r\nParameter name: value" Source="mscorlib" ParamName="value" StackTrace: at System.IO.FileStream.set_Position(Int64 value) at HundredMilesSoftware.UltraID3Lib.ID3v1Tag..ctor(Bi naryReader A_0, String A_1) at HundredMilesSoftware.UltraID3Lib.UltraID3.Read(Str ing trackFileName) at KCplayer.MainForm.ScanDirectory(Object basePathObject) in E:\work\mp3player\KCplayer\MainForm.cs:line 115 at System.Threading._ThreadPoolWaitCallback.WaitCallb ack_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWa itCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack) at System.Threading._ThreadPoolWaitCallback.PerformWa itCallback(Object state) InnerException: Please help Regards Kim |
|
#2
|
|||
|
|||
|
solved
Hi
The problem was that the file itself was corrupted somehow. Kim |
|
#3
|
|||
|
|||
|
Yep.. you should place your code in a try ... catch block to handle those "bad encoded mp3 files"...
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|