2

I have an abnormal exception in a Linux mono assembly.

Unhandled Exception: System.ObjectDisposedException: The object was used after being disposed.
at System.Net.Sockets.Socket.ReceiveAsync (System.Net.Sockets.SocketAsyncEventArgs e) [0x00000] in <filename unknown>:0
at cloudBus.TCPConnection.Receive () [0x0003d] in /home/xyz/cloudBus/TCPServer.cs:26
...

I want to get line number and filename for ReceiveAsync. I did compile in with -debug flag and execute with --debug. I also get full mono from Git and recompile it but I can't get debug info.

What option to use to get the exception line info? I think this is mono make option but can't find it.

When found I'll try to fix this bug, only reproductible on Linux, and report correction.

skolima
  • 31,963
  • 27
  • 115
  • 151
Remi THOMAS
  • 854
  • 6
  • 11

3 Answers3

0

You could build Mono from source, if you want to track this problem on git HEAD version.

On the other hand, Debian should have debug/development versions of Mono available as well, that will give you debugging info for your installed version.

skolima
  • 31,963
  • 27
  • 115
  • 151
0

I have found.

To build framework with debug info, in the file mono/mcs/build/config.make

add the line

MCS_FLAGS = -debug

Remi THOMAS
  • 854
  • 6
  • 11
0

On Debian the package mono-dbg provides debugging information for System.*. For your own code have a look at mono debug information with exceptions on debian? .

Community
  • 1
  • 1
mab
  • 431
  • 1
  • 5
  • 15