[Mono-list] Crash - Array allocation

Rodrigo Kumpera kumpera at gmail.com
Mon Jul 13 13:23:34 EDT 2009


Start by installing debug symbols for mono and them reporting the bug with
the improved stack trace.
If you can provide a test case on the bug report, fixing it will be a lot
simpler.


On Mon, Jul 13, 2009 at 1:58 PM, rick_l <rick.lamanna at mccdaq.com> wrote:

>
> Hello,
>
> My C# program is crashing on Linux. I get the following stack trace:
>
>  at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_2
> (intptr,intptr,intptr) <0x00004>
>  at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_2
> (intptr,intptr,intptr) <0xffffffff>
>  at MC7000API.DaqDevice.ReadScanData (int) [0x00032] in
> /root/Linux/MC7000Software/Library/MC7000API/api/api.cs:91
>  at AInScanContinuous.AInScanContinuousForm.StartButton_Click
> (object,System.EventArgs) [0x000ca] in
> /root/Linux/AInScanContinuous/AInScanContinuousForm.cs:74
>  at System.Windows.Forms.Control.OnClick (System.EventArgs) [0x0001c] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:6033
>  at System.Windows.Forms.Button.OnClick (System.EventArgs) [0x00024] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:106
>  at System.Windows.Forms.ButtonBase.OnMouseUp
> (System.Windows.Forms.MouseEventArgs) [0x00081] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:634
>  at System.Windows.Forms.Button.OnMouseUp
> (System.Windows.Forms.MouseEventArgs) [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:128
>  at System.Windows.Forms.Control.WmLButtonUp
> (System.Windows.Forms.Message&) [0x00081] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5595
>  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&)
> [0x0017c] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:5332
>  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message&)
> [0x00055] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs:692
>  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message&)
> [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Button.cs:150
>  at System.Windows.Forms.Control/ControlWindowTarget.OnMessage
> (System.Windows.Forms.Message&) [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:234
>  at System.Windows.Forms.Control/ControlNativeWindow.WndProc
> (System.Windows.Forms.Message&) [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs:215
>  at System.Windows.Forms.NativeWindow.WndProc
> (intptr,System.Windows.Forms.Msg,intptr,intptr) [0x00085] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:242
>  at System.Windows.Forms.XplatUIX11.DispatchMessage
> (System.Windows.Forms.MSG&) [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:3424
>  at System.Windows.Forms.XplatUI.DispatchMessage
> (System.Windows.Forms.MSG&) [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:605
>  at System.Windows.Forms.Application.RunLoop
> (bool,System.Windows.Forms.ApplicationContext) [0x0036a] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:982
>  at System.Windows.Forms.Application.Run
> (System.Windows.Forms.ApplicationContext) [0x00014] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:761
>  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form)
> [0x00000] in
>
> /usr/src/packages/BUILD/mono-2.4.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:740
>  at AInScanContinuous.Program.Main () [0x0000b] in
> /root/Linux/AInScanContinuous/Program.cs:17
>  at (wrapper runtime-invoke) object.runtime_invoke_void
> (object,intptr,intptr,intptr) <0xffffffff>
>
> Native stacktrace:
>
>      /usr/bin/mono [0x80cbfe4]
>      /usr/bin/mono [0x80f66bb]
>      [0xffffe410]
>      /usr/bin/mono [0x81d9023]
>      /usr/bin/mono [0x81e5447]
>      /usr/bin/mono [0x81e0074]
>      /usr/bin/mono [0x81df942]
>      /usr/bin/mono [0x81d98dd]
>      /usr/bin/mono [0x81d9ccf]
>      /usr/bin/mono [0x81da009]
>      /usr/bin/mono [0x81dcf7a]
>      /usr/bin/mono [0x81dd231]
>      /usr/bin/mono [0x81dd463]
>      /usr/bin/mono(mono_array_new_full+0x182) [0x81143c2]
>      /usr/bin/mono [0x80a6ebd]
>      [0xb56a6753]
>      [0xb56a6440]
>      [0xb565d8dd]
>      [0xb565d6f0]
>      [0xb565d66d]
>      [0xb565d352]
>      [0xb565d1e6]
>      [0xb565d07a]
>      [0xb5a82df4]
>      [0xb5a005b0]
>      [0xb5a00506]
>      [0xb5a82bbf]
>      [0xb5a82b97]
>      [0xb5a81ce5]
>      [0xb56aee3c]
>      [0xb569d268]
>      [0xb5a1b8e8]
>      [0xb5a1accf]
>      [0xb5a1a8e4]
>      [0xb78e431f]
>      [0xb78e4252]
>      /usr/bin/mono(mono_runtime_exec_main+0xe5) [0x8113825]
>      /usr/bin/mono(mono_runtime_run_main+0x16b) [0x8113fcb]
>      /usr/bin/mono(mono_debugger_main+0x77) [0x80f9c47]
>      /usr/bin/mono(mono_main+0x15bc) [0x80b354c]
>      /usr/bin/mono [0x805af21]
>      /lib/libc.so.6(__libc_start_main+0xe5) [0xb7e43705]
>      /usr/bin/mono [0x805ae51]
>
> =================================================================
> Got a SIGSEGV while executing native code. This usually indicates
> a fatal error in the mono runtime or one of the native libraries
> used by your application.
> =================================================================
>
> My program allocates and copies many arrays. The code at line 91 in api.cs
> is allocating an array inside a method...
>
> double[,] scanData = new double[channelCount, samplesRequested] //
> channelCount = 8, samples requested = 316
>
> This array is passed back to my application. I get the crash when this
> method gets called 100 to 130 times.
> I don’t get an Exception that I can catch. How can I debug this?
>
> Thanks
>
> Rick L
>
> --
> View this message in context:
> http://www.nabble.com/Crash---Array-allocation-tp24461029p24461029.html
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20090713/2d752519/attachment.html 


More information about the Mono-list mailing list