1

Closed

Issue with Parsing Traces & Resolving Names

description

Hi,

I've come across an issue with the way you are parsing the log files but this only becomes apparent when a specific type of error is logged AND you have resolving names turned on. The following is an extract from a log file that illustrates the problem:
[2013-11-13 08:20:53.681] Process: w3wp |Organization:5db68b43-7672-47a4-af3a-9b2ebb38ac79 |Thread:   34 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 4250c8ca-4b24-47ac-b1be-c0555e013ac6 | ErrorInformation.LogError  ilOffset = 0x17
    at ErrorInformation.LogError()  ilOffset = 0x17
    at ErrorInformation..ctor(Exception exception, Uri requestUrl, Boolean logError)  ilOffset = 0x1ED
    at MainApplication.Application_Error(Object sender, EventArgs eventArguments)  ilOffset = 0x7C
    at EventHandler.Invoke(Object sender, EventArgs e)  ilOffset = 0xFFFFFFFF
    at HttpApplication.RaiseOnError()  ilOffset = 0x26
    at ApplicationStepManager.ResumeSteps(Exception error)  ilOffset = 0x82
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)  ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)  ilOffset = 0xFC
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)  ilOffset = 0x45
>MSCRM Error Report:
--------------------------------------------------------------------------------------------------------
Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Error Number: 0x80048306

Error Message: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 755d5474-ac3c-e311-a98a-00215aaf6ac7, OwnerId: c92c4e79-feba-dd11-9027-002264043419,  OwnerIdType: 8 and CallingUser: 5fa9efaa-16be-dd11-bad7-002264043419. ObjectTypeCode: 4230, objectBusinessUnitId: f2cc0a7f-b5b7-dd11-8615-002264043419, AccessRights: 524296 

Error Details: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 755d5474-ac3c-e311-a98a-00215aaf6ac7, OwnerId: c92c4e79-feba-dd11-9027-002264043419,  OwnerIdType: 8 and CallingUser: 5fa9efaa-16be-dd11-bad7-002264043419. ObjectTypeCode: 4230, objectBusinessUnitId: f2cc0a7f-b5b7-dd11-8615-002264043419, AccessRights: 524296 

Source File: Not available

Line Number: Not available

Request URL: http://crm/xxxxx/_grid/cmds/dlg_assign.aspx?iId=%7b755D5474-AC3C-E311-A98A-00215AAF6AC7%7d&iIndex=0&iObjType=4230&iTotal=1&ownerId=%7b5FA9EFAA-16BE-DD11-BAD7-002264043419%7d&ownerType=8

Stack Trace Info: [CrmException: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 755d5474-ac3c-e311-a98a-00215aaf6ac7, OwnerId: c92c4e79-feba-dd11-9027-002264043419,  OwnerIdType: 8 and CallingUser: 5fa9efaa-16be-dd11-bad7-002264043419. ObjectTypeCode: 4230, objectBusinessUnitId: f2cc0a7f-b5b7-dd11-8615-002264043419, AccessRights: 524296 ]
   at Microsoft.Crm.Dialogs.AssignDialogForm.ConfigureForm()
   at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
The first line of this trace item causes a new TraceInfo to be created, then the line that starts "[HttpUnhandledException: Exception of type" (still part of the same trace item) causes this trace item to be re-added to the TraceInfo collection.

The problem code is in MainForm.cs, lines 535 to 546. This is how they currently are:
if (ti != null)
{
    traces.Add(ti);
}

 var lineParts = line.Split('|');

if (lineParts.Length == 1)
 {
    ti.Description += lineParts[0];
    continue;
}
This is how it should be written to resolve the issue:
 var lineParts = line.Split('|');

if (lineParts.Length == 1)
 {
    ti.Description += lineParts[0];
    continue;
}

if (ti != null)
{
    traces.Add(ti);
}
Closed Nov 13, 2013 at 11:59 AM by tanguy92

comments

wrote Nov 13, 2013 at 11:59 AM

Résolu à l'aide de l'ensemble de modifications 24138 : Correct issue 918

tanguy92 wrote Nov 13, 2013 at 12:00 PM

I guess you already compiled your own corrected version

I will publish this updated version later.