Can anyone help me out with this. I'm really baffled as to why this is happening. I wonder if it's something to do with async and the way mono builds up the aggregate exception but the behavior is certainly different than the .NET Framework and I am wondering if there is something I can do to get the correct stack trace.
Thanks! On Mon, Aug 18, 2014 at 2:16 PM, giulianob <[email protected]> wrote: > Can anyone explain to me why when I do exception.StackTrace it does not > give > me the full call stack but when I call Environment.StackTrace it does? > > For example, here's the callstack when I catch an exception and call > exception.StackTrace > ================ > 2014-08-18 14:10:28,243 [Threadpool worker] ERROR Persistance.IDbManager - > Stack from exception: at MySql.Data.MySqlClient.MySqlStream.ReadPacket () > [0x00000] in <filename unknown>:0 > at MySql.Data.MySqlClient.NativeDriver.GetResult (System.Int32& > affectedRow, System.Int64& insertedId) [0x00000] in <filename unknown>:0 > ================ > > And here is an exception when I call Environment.StackTrace from the place > where the exception is caught: > > ================ > 2014-08-18 14:10:28,244 [Threadpool worker] ERROR Persistance.IDbManager - > Stack from environment: at System.Environment.get_StackTrace() in > /build/buildd/mono-3-opt-3.2.8/mcs/class/corlib/System/Environment.cs:line > 261 > at > Persistance.Managers.MySqlDbManager.HandleGeneralException(System.Exception > e, System.Data.Common.DbCommand command) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Persistance/Managers/MySqlDbManager.cs:line > 926 > at > > Persistance.Managers.MySqlDbManager.ExecuteNonQuery(MySql.Data.MySqlClient.MySqlCommand > command) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Persistance/Managers/MySqlDbManager.cs:line > 904 > at Persistance.Managers.MySqlDbManager.Query(System.String query, > Persistance.DbColumn[] parms) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Persistance/Managers/MySqlDbManager.cs:line > 383 > at Game.Comm.SystemCommandLineModule.ThrowSqlError(Game.Comm.Session > session, System.String[] parms) in > /var/lib/jenkins/jobs/Server_Build/workspace/server/Game/Comm/CmdLine > Commands/SystemCommandLineModule.cs:line 35 > at Game.Comm.CommandLineProcessor.Execute(Game.Comm.Session session, > System.String cmd, System.String parms) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Game/Comm/CommandLineProcessor.cs:line > 67 > at > > Game.Comm.ProcessorCommands.CommandLineCommandsModule.CommandLine(Game.Comm.Session > session, Game.Comm.Packet packet) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Game/Comm/ProcessorCommands/CommandLineCommandsModule.cs:line > 55 > at Game.Comm.Processor.Execute(Game.Comm.Session session, > Game.Comm.Packet packet) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Game/Comm/Processor.cs:line > 49 > at Game.Comm.Session.Process(Game.Comm.Packet packet) in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Game/Comm/Session.cs:line > 92 > at Game.Comm.AsyncTcpServer+<ReadLoop>c__async1.MoveNext() in > > /var/lib/jenkins/jobs/Server_Build/workspace/server/Game/Comm/AsyncTcpServer.cs:line > 301 > at Dawn.Net.Sockets.SocketAwaiter.<.ctor>b__0(System.Object param0, > System.Net.Sockets.SocketAsyncEventArgs param1) > at > > System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(System.Net.Sockets.SocketAsyncEventArgs > e) in > > /build/buildd/mono-3-opt-3.2.8/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:line > 177 > at System.Net.Sockets.SocketAsyncEventArgs.ReceiveCallback(IAsyncResult > ares) in > > /build/buildd/mono-3-opt-3.2.8/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:line > 253 > at System.Net.Sockets.SocketAsyncEventArgs.DispatcherCB(IAsyncResult > ares) in > > /build/buildd/mono-3-opt-3.2.8/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:line > 222 > ================ > > I have the mdb files and running with --debug if that makes a difference. > > Thanks > > > > -- > View this message in context: > http://mono.1490590.n4.nabble.com/Exception-stacktrace-does-not-contain-full-call-stack-tp4663558.html > Sent from the Mono - General mailing list archive at Nabble.com. > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > -- Giuliano Barberi
_______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
