You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for my annoyance, but when I try to clone a Bitmap, from time to time I get a System.NullReferenceException exception:
at (wrapper unknown) ImagePixelEnumerator.Helpers.Pixels.NonIndexed.PixelDataPArgb8888:PtrToStructure (intptr,object)
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
at ImagePixelEnumerator.Helpers.Pixel.ReadRawData (IntPtr imagePointer) [0x00000] in d:\Users\Anders\Documents\Visual Studio 2013\Projects\aforge\Sources\System.Drawing\Helpers\Pixel.cs:272
at ImagePixelEnumerator.Helpers.ImageBuffer.ReadPixel (ImagePixelEnumerator.Helpers.Pixel pixel, System.Byte[] buffer) [0x0001f] in d:\Users\Anders\Documents\Visual Studio 2013\Projects\aforge\Sources\System.Drawing\Helpers\ImageBuffer.cs:211
at ImagePixelEnumerator.Helpers.ImageBuffer+<>c__DisplayClass5.b__4 (ImagePixelEnumerator.Helpers.LineTask lineTask) [0x00075] in d:\Users\Anders\Documents\Visual Studio 2013\Projects\aforge\Sources\System.Drawing\Helpers\ImageBuffer.cs:492
at System.Threading.Tasks.Parallel+c__AnonStorey52[TSource,TLocal].<>m__0 (Int32 i) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Parallel.cs:2318 at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey31[TLocal].<>m__1 () [0x000ed] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Parallel.cs:1204
The code is following:
public Bitmap ProcessImage(Bitmap src)
{
if (src == null)
{
return null;
}
The project is a portable library, I get this error when using it in Droid project. First time when I call this code everything works fine, but then is I call it subsequently, at one step the code just crashes with the exception.
Thank you,
Andrew
The text was updated successfully, but these errors were encountered:
@AndrewKaplanovsky Strange. I will look into this as soon as I have time, but I will be away for a few weeks now. Please note that I just now have published updates on NuGet which I hope will solve the issue with Image.Save on Windows Universal.
Hi Anders,
Sorry for my annoyance, but when I try to clone a Bitmap, from time to time I get a System.NullReferenceException exception:
at (wrapper unknown) ImagePixelEnumerator.Helpers.Pixels.NonIndexed.PixelDataPArgb8888:PtrToStructure (intptr,object)
at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type)
at ImagePixelEnumerator.Helpers.Pixel.ReadRawData (IntPtr imagePointer) [0x00000] in d:\Users\Anders\Documents\Visual Studio 2013\Projects\aforge\Sources\System.Drawing\Helpers\Pixel.cs:272
at ImagePixelEnumerator.Helpers.ImageBuffer.ReadPixel (ImagePixelEnumerator.Helpers.Pixel pixel, System.Byte[] buffer) [0x0001f] in d:\Users\Anders\Documents\Visual Studio 2013\Projects\aforge\Sources\System.Drawing\Helpers\ImageBuffer.cs:211
at ImagePixelEnumerator.Helpers.ImageBuffer+<>c__DisplayClass5.b__4 (ImagePixelEnumerator.Helpers.LineTask lineTask) [0x00075] in d:\Users\Anders\Documents\Visual Studio 2013\Projects\aforge\Sources\System.Drawing\Helpers\ImageBuffer.cs:492
at System.Threading.Tasks.Parallel+c__AnonStorey5
2[TSource,TLocal].<>m__0 (Int32 i) [0x00000] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Parallel.cs:2318 at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3
1[TLocal].<>m__1 () [0x000ed] in /Users/builder/data/lanes/3415/7db2aac3/source/mono/external/referencesource/mscorlib/system/threading/Tasks/Parallel.cs:1204The code is following:
public Bitmap ProcessImage(Bitmap src)
{
if (src == null)
{
return null;
}
}
The project is a portable library, I get this error when using it in Droid project. First time when I call this code everything works fine, but then is I call it subsequently, at one step the code just crashes with the exception.
Thank you,
Andrew
The text was updated successfully, but these errors were encountered: