erdomke / InnovatorAdmin

A tool for managing Aras Innovator installations focusing on improving the import/export experience.
http://erdomke.github.io/InnovatorAdmin/
MIT License
59 stars 43 forks source link

Null Pointer Exception on double click on ItemType #132

Open rneuber1 opened 8 years ago

rneuber1 commented 8 years ago

(current version, commit 55a7cf1b6763f223cabaebaa264c9a9730c43875)

Double Clicking on an itemtype in the TOC results in a NULL Pointer exception:

image

The crash occurs in SetDefaultHeaders where this._context is NULL: image

Callback:

>   Innovator.Client.dll!Innovator.Client.Connection.ArasHttpConnection.Innovator.Client.Connection.IArasConnection.SetDefaultHeaders(System.Action<string,string> writer) Line 315 C#
    Innovator.Client.dll!Innovator.Client.Connection.ArasHttpConnection.UploadAml.AnonymousMethod__13(Innovator.Client.IHttpRequest req) Line 272   C#
    Innovator.Client.dll!Innovator.Client.Connection.DefaultHttpService.Execute(string method, string baseUrl, Innovator.Client.Connection.QueryString queryString, System.Net.ICredentials credentials, bool async, System.Action<Innovator.Client.IHttpRequest> configure) Line 62    C#
    Innovator.Client.dll!Innovator.Client.Connection.ArasHttpConnection.UploadAml(System.Uri uri, string action, Innovator.Client.Command request, bool async) Line 269 C#
    Innovator.Client.dll!Innovator.Client.Connection.ArasHttpConnection.Process(Innovator.Client.Command request, bool async) Line 109  C#
    Innovator.Client.dll!Innovator.Client.ConnectionExtensions.ApplyAsync(Innovator.Client.IAsyncConnection conn, Innovator.Client.Command query, bool async, bool noItemsIsError, object[] parameters) Line 41 C#
    InnovatorAdmin.Api.dll!InnovatorAdmin.ArasMetadataProvider.GetProperties(InnovatorAdmin.ItemType itemType) Line 508 C#
    InnovatorAdmin.Api.dll!InnovatorAdmin.Extensions.GetItemTable(Innovator.Client.IReadOnlyResult res, InnovatorAdmin.ArasMetadataProvider metadata) Line 264  C#
    InnovatorAdmin.exe!InnovatorAdmin.Editor.ArasEditorProxy.ResultObject.GetDataSet() Line 332 C#
    InnovatorAdmin.exe!InnovatorAdmin.EditorWindow.EnsureDataTable() Line 614   C#
    InnovatorAdmin.exe!InnovatorAdmin.EditorWindow.SetResult(InnovatorAdmin.IResultObject result, long milliseconds, InnovatorAdmin.OutputType preferred) Line 1285 C#
    InnovatorAdmin.exe!InnovatorAdmin.EditorWindow.Submit.AnonymousMethod__a5(InnovatorAdmin.IResultObject result) Line 1225    C#
    [External Code] 
    InnovatorAdmin.exe!InnovatorAdmin.FormBase.WndProc(ref System.Windows.Forms.Message m) Line 114 C#
    [External Code] 
    InnovatorAdmin.exe!InnovatorAdmin.Program.Main(string[] args) Line 47   C#
    [External Code] 
erdomke commented 8 years ago

Somehow, that connection was logged out (or never fully logged in) which is what is causing the issue. (I can tell because the _http* variables are also not initialized). Did you do anything prior to this happening (open and close windows, test connections, ...) that might have caused this? Does this only occur with that particular connection?

rneuber1 commented 8 years ago

I edited and tested connections (see #131).