A generic error occurred in GDI+
If you got this error ,Remember this it is something wrong with saving images or using memory stream to save them
And more specifically in disposing the memory stream object after using it in other word premateurly disposing the memoryStream object .
In my application it happens when I used the Using ... End using statment
Using MS as new memoryStream
ENd using
Solving it would be just like this
Dim MS as new MemoryStream
Ofcourse you know that I am using the memoryStream to hold the image.
The nasty problem in this error is that the debugger gets confused and does not point to the line cuasing the problem and you think it is other thing.
If you got this error ,Remember this it is something wrong with saving images or using memory stream to save them
And more specifically in disposing the memory stream object after using it in other word premateurly disposing the memoryStream object .
In my application it happens when I used the Using ... End using statment
Using MS as new memoryStream
ENd using
Solving it would be just like this
Dim MS as new MemoryStream
Ofcourse you know that I am using the memoryStream to hold the image.
The nasty problem in this error is that the debugger gets confused and does not point to the line cuasing the problem and you think it is other thing.
No comments:
Post a Comment