Bug 36652 - MemoryStream.SetCapacity Crashing App
Summary: MemoryStream.SetCapacity Crashing App
Status: RESOLVED NORESPONSE
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 7.9.1.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2015-12-06 05:36 UTC by Dillon Buchananq
Modified: 2016-04-12 15:37 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Dillon Buchananq 2015-12-06 05:36:47 UTC
Latest versions of Xamarin.iOS seem to be RANDOMLY crashing my app with the following dump while building debug & ad-hoc builds:

Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical: Stacktrace:
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at <unknown> <0xffffffff>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <0xffffffff>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at System.IO.MemoryStream.set_Capacity (int) <0x000b7>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at System.IO.MemoryStream.Write (byte[],int,int) <0x000df>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at Mono.Security.Protocol.Tls.SslStreamBase.InternalReadCallback_inner (Mono.Security.Protocol.Tls.SslStreamBase/InternalAsyncResult,byte[],object[],bool,int) <0x002bf>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at Mono.Security.Protocol.Tls.SslStreamBase.InternalReadCallback (System.IAsyncResult) <0x00187>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at System.Net.Sockets.SocketAsyncResult.<ExecuteWorkItem>m__1 (object) <0x00057>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at <unknown> <0xffffffff>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at (wrapper managed-to-native) System.Runtime.Remoting.Messaging.AsyncResult.Invoke (System.Runtime.Remoting.Messaging.AsyncResult) <0xffffffff>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at System.Runtime.Remoting.Messaging.AsyncResult.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x0000b>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x0022b>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x0000b>
Dec  6 00:29:29 Dillon-Buchanans-iPhone CodeHubiOS[434] <Warning>: critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0xffffffff>


This is not consistently reproducable and extremely obnoxious.
Comment 1 Sebastien Pouliot 2015-12-06 15:41:42 UTC
@Martin do you recall any recent change (in C6) that could result in this ?

@Dilon it would help a lot if you can isolate a test case (even if it does crash consistently, we can loop it).
Comment 2 Dillon Buchananq 2015-12-07 06:02:24 UTC
I'll try. As another piece of information, this seems to only occur when running on the device itself - doesn't matter if it's debug or a release build.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-12-07 08:57:30 UTC
This could also be an out-of-memory condition. Could you attach a symbolicated crash report as well? (see http://jmillerdev.net/symbolicating-ios-crash-files-xamarin-ios/ for how to get a crash report)
Comment 4 Marek Safar 2015-12-07 10:39:58 UTC
This looks like not detected OOM exception.

Rodrigo, any idea why?
Comment 5 Rodrigo Kumpera 2015-12-07 15:44:59 UTC
This might be exactly the app dying from an OOM.

Dillion, could you attach more of the log file? What you attached in not enough to tell what's going on.
Comment 6 Dillon Buchananq 2016-02-11 14:56:20 UTC
There is no log file. This is the console from the device and that's all there is to it.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2016-02-11 15:12:21 UTC
@Dillon, can you get the crash report from Xcode then? That might shed some light on this.
Comment 8 Sebastien Pouliot 2016-04-12 15:37:47 UTC
We have not received further information and will assume this is not an issue anymore. If you can still affected by this please re-open the bug and include the requested information. Thanks.