Bug 2355 - Assertion on string operations and application crash
Summary: Assertion on string operations and application crash
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-05 23:27 UTC by Nirban Dutta
Modified: 2013-12-05 18:35 UTC (History)
3 users (show)

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


Attachments
Log1- Assertion on string oprtation (2.55 KB, text/plain)
2011-12-05 23:27 UTC, Nirban Dutta
Details
Log2- Assertion on string oprtation (1.25 KB, text/plain)
2011-12-05 23:28 UTC, Nirban Dutta
Details
Log3- Assertion on string oprtation (2.40 KB, text/plain)
2011-12-05 23:28 UTC, Nirban Dutta
Details
Log4- Assertion on string oprtation (2.20 KB, text/plain)
2011-12-05 23:29 UTC, Nirban Dutta
Details


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 Nirban Dutta 2011-12-05 23:27:36 UTC
Created attachment 996 [details]
Log1- Assertion on string oprtation

With the new release 4.0 we are getting frequent Assertion on string operations on simple string operation like String.Join, System.Text.StringBuilder.Append like this:

 * Assertion at ../../../../mono/metadata/sgen-bridge.c:426, condition `!entry->is_bridge' not met
12-07 14:22:26.349: INFO/mono(5779): Stacktrace:
at System.Text.StringBuilder.InternalEnsureCapacity (int) <0x000b7>
at System.Text.StringBuilder.Append (string) <0x000db>
at ProjectCentre.Mobile.Shared.Business.Database.OperationHelpers.SelectHelper.GetQuery () <0x0012f>
at ProjectCentre.Mobile.Shared.Business.Database.DatabaseManager.ExecuteReader<T> (ProjectCentre.Mobile.Shared.Business.Database.OperationHelpers.SelectHelper,ProjectCentre.Mobile.Shared.Business.Database.PcDataReader) <0x000a3>


I have even put explicit dispose of StringBuilder objects.
This happens when we do a large number of tasks like calling 100s DB calls.

Please have a look and advise a fix for this.

This is very important and critical for us.
Comment 1 Nirban Dutta 2011-12-05 23:28:19 UTC
Created attachment 997 [details]
Log2- Assertion on string oprtation

Error Log attached
Comment 2 Nirban Dutta 2011-12-05 23:28:44 UTC
Created attachment 998 [details]
Log3- Assertion on string oprtation

Error Log attached.
Comment 3 Nirban Dutta 2011-12-05 23:29:06 UTC
Created attachment 999 [details]
Log4- Assertion on string oprtation

Error Log attached
Comment 4 Rodrigo Kumpera 2011-12-06 05:05:38 UTC
Hi Nirban,

Can you provide a test app that reproduces the issue?

Thanks,
Rodrigo
Comment 5 Derek Mitchell 2012-03-01 17:02:12 UTC
We are also seeing the same behaviour.

Plenty of System.Text.StringBuilder.InternalEnsureCapacity errors.


02-29 19:25:11.600: I/monodroid-gc(26059): GC cleanup summary: 114 objects tested - resurrecting 48.
02-29 19:25:14.755: I/monodroid-gc(26059): GC cleanup summary: 84 objects tested - resurrecting 76.
02-29 19:25:15.430: I/monodroid-gc(26059): GC cleanup summary: 10 objects tested - resurrecting 10.
02-29 19:25:17.540: I/monodroid-gc(26059): GC cleanup summary: 22 objects tested - resurrecting 19.
02-29 19:25:24.035: I/mono(26059): Stacktrace:
02-29 19:25:24.035: I/mono(26059):   at System.Text.StringBuilder.InternalEnsureCapacity (int) <0x000b7>
02-29 19:25:24.035: I/mono(26059):   at System.Text.StringBuilder.Append (string) <0x000db>
02-29 19:25:24.035: I/mono(26059):   at System.IO.StringWriter.Write (string) <0x00037>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.XmlTextWriter.WriteStartElement (string,string,string) <0x00303>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.DefaultXmlWriter.WriteStartElement (string,string,string) <0x0003b>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.XmlWriter.WriteStartElement (string,string) <0x00033>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriter.WriteStartElement (string,string,object,bool,System.Collections.ICollection) <0x003a3>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriter.WriteStartElement (string,string,object,bool) <0x0004f>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriter.WriteStartElement (string,string,object) <0x00037>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteObject (System.Xml.Serialization.XmlTypeMapping,object,string,string,bool,bool,bool) <0x0064f>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteMemberElement (System.Xml.Serialization.XmlTypeMapElementInfo,object) <0x004fb>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteElementMembers (System.Xml.Serialization.ClassMap,object,bool) <0x002af>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteObjectElementElements (System.Xml.Serialization.XmlTypeMapping,object) <0x0005b>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteObjectElement (System.Xml.Serialization.XmlTypeMapping,object,string,string) <0x000ef>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteObject (System.Xml.Serialization.XmlTypeMapping,object,string,string,bool,bool,bool) <0x006db>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializationWriterInterpreter.WriteRoot (object) <0x0011f>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializer.Serialize (object,System.Xml.Serialization.XmlSerializationWriter) <0x000a7>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializer.Serialize (System.Xml.XmlWriter,object,System.Xml.Serialization.XmlSerializerNamespaces) <0x00103>
02-29 19:25:24.035: I/mono(26059):   at System.Xml.Serialization.XmlSerializer.Serialize (System.Xml.XmlWriter,object) <0x00027>
02-29 19:25:24.035: I/mono(26059):   at DBT.helpers.dbtSerializer.WriteString (object) <0x000af>
02-29 19:25:24.035: I/mono(26059):   at FieldMetrix.Base_TaskAssignment.WriteXMLToString () <0x0002b>
02-29 19:25:24.035: I/mono(26059):   at FieldMetrix.TaskAssignment.CreateTaskAssignment (long,string,long,System.Nullable`1<System.Guid>,string,System.Nullable`1<long>,string,System.Nullable`1<long>,System.Nullable`1<long>,System.Nullable`1<int>,System.Nullable`1<int>,bool,FieldMetrix.TaskType/enuTaskTypes,System.Nullable`1<long>) <0x0087f>
02-29 19:25:24.035: I/mono(26059):   at FieldMetrix.JobAssignment.AddNewTaskAssignment (long,string,System.Nullable`1<long>,string,System.Nullable`1<long>,System.Nullable`1<long>,System.Nullable`1<int>,System.Nullable`1<int>,bool,FieldMetrix.TaskType/enuTaskTypes,System.Nullable`1<long>) <0x00423>
02-29 19:25:24.035: I/mono(26059):   at mfaFieldMetrix.WorkFlowManager.CreateTaskAssignmentOnTheDevice (FieldMetrix.TaskAssignment,string,FieldMetrix.TaskType/enuTaskTypes,System.Nullable`1<long>) <0x002d3>
02-29 19:25:24.035: I/mono(26059):   at mfaFieldMetrix.TaskFormActivity.getTaskAssignment (Resco.Controls.DetailView.DetailItem,FieldMetrix.TaskType/enuTaskTypes,string,System.Nullable`1<long>,string) <0x0039b>
02-29 19:25:24.035: I/mono(26059):   at mfaFieldMetrix.TaskFormActivity.doTaskImage (object,mfaFieldMetrix.TaskFormActivity/CustomIconDetailItem/ItemEventArgs) <0x0012b>
02-29 19:25:24.035: I/mono(26059):   at mfaFieldMetrix.TaskFormActivity.handleCustomIconClicked (object,mfaFieldMetrix.TaskFormActivity/CustomIconDetailItem/ItemEventArgs) <0x00067>
02-29 19:25:24.035: I/mono(26059):   at mfaFieldMetrix.TaskFormActivity/CustomIconDetailItem.OnIconClicked (mfaFieldMetrix.TaskFormActivity/CustomIconDetailItem/ItemEventArgs) <0x00037>
02-29 19:25:24.035: I/mono(26059):   at mfaFieldMetrix.TaskFormActivity/CustomIconDetailItem.OnActiveAreaClicked (int,int) <0x0005b>
Comment 6 Rodrigo Kumpera 2012-03-01 19:06:22 UTC
Hi Derek,

Can you share your app with instructions on how to reproduce it? You can do it through a support ticket so no one else can see it.
Comment 7 PJ 2013-11-19 17:04:55 UTC
This bug has been in the NEEDINFO state with no changes for the last 90 days. Can we put this back into the NEW or CONFIRMED state, or are we still awaiting response?

If there is no change in the status of this bug over the next two weeks, this bug will be marked as NORESPONSE.
Comment 8 PJ 2013-12-05 18:35:07 UTC
This bug has not been changed from the NEEDINFO state since my previous comment, marking as RESOLVED NORESPONSE.

Please feel free to REOPEN this bug at any time if you are still experiencing the issue. Please add the requested information and set the bug back to the NEW (or CONFIRMED) state.