[Mono-bugs] [Bug 67264][Cri] New - string.ctor with encoding obj
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 30 Sep 2004 17:21:14 -0400 (EDT)
unimplemented
In-Reply-To: <bug-67264@chernobyl.ximian.com>
X-Bugzilla-Product: Mono: Runtime
X-Bugzilla-Component: misc
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: Critical
X-Bugzilla-Severity:
X-Bugzilla-Target-Milestone: ---
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by michael_cohen@maxtor.com.
http://bugzilla.ximian.com/show_bug.cgi?id=67264
--- shadow/67264 2004-09-30 17:21:14.000000000 -0400
+++ shadow/67264.tmp.8985 2004-09-30 17:21:14.000000000 -0400
@@ -0,0 +1,88 @@
+Bug#: 67264
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details: SuSE 9.1
+Status: NEW
+Resolution:
+Severity:
+Priority: Critical
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: michael_cohen@maxtor.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: string.ctor with encoding obj
+unimplemented
+
+Description of Problem:
+First, let me apologize. I'm very new to Linux and Mono, but here is the
+problem I'm seeing, as best as I can describe it:
+I have an assembly (built using .NET on windows), which I reference in a
+GTK# project running on Mono/Linux. During the execution of a method in
+that assembly, I try to create a new string in an unsafe block using an
+sbyte*.
+The offending code is probably the code I've pasted below. (I say
+probably, because I am still not
+sure how to use the debugger - again I apologize for not providing more
+info) This code snippet is not complete, but should give you an idea of
+what i'm trying to do:
+ protected override void InitValue()
+ {
+ try
+ {
+ String s;
+
+ s = "";
+ unsafe
+ {
+ s = "";
+ SByte[] s1 = new SByte[mLength];
+ for (int i = 0; i < mLength; i++)
+ {
+ s1[i] = (sbyte)mBuffer.Data[this.ByteOffset + i];
+ }
+ fixed (sbyte* s2 = (sbyte*)&s1[0])
+ {
+ s = new String(s2, 0, mLength,
+System.Text.Encoding.ASCII);
+ }
+ }
+ this.Value = s;
+ }
+ catch (Exception e)
+ {
+ ExceptionHandler.SendErrorMessage(e);
+ return;
+ }
+
+ }
+
+
+My mono version information is:
+ mscorlib 1.0.5000
+
+
+Steps to reproduce the problem:
+1. I do not yet have a test app which will reproduce this, but I can work
+on building one, if you think this would be beneficial
+
+Actual Results:
+** (<unknown>:6401): WARNING **: string.ctor with encoding obj
+unimplemented
+
+** ERROR **: file string-icalls.c: line 189
+(ves_icall_System_String_ctor_encoding): should not be reached
+aborting...
+
+Expected Results:
+ it should create the string
+
+
+
+How often does this happen?
+Every Time
+
+Additional Information: