Opened 5 years ago

Closed 5 years ago

#1792 closed defect (done)

ApplicationManager cannot find types when a programmable operator has been used

Reported by: abeham Owned by: abeham
Priority: high Milestone: HeuristicLab 3.3.7
Component: PluginInfrastructure Version: 3.3.7
Keywords: Cc:

Description

I'm working with a modified algorithm that contains a programmable operator. After some time when I run that algorithm or compile the operator, type discovery fails. For example, a click to the "New Problem" button in an algorithm returns an exception and an empty list. This is the exception:

System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
   at System.IO.Path.GetFullPath(String path)
   at HeuristicLab.PluginInfrastructure.SandboxApplicationManager.<>c__DisplayClass13.<>c__DisplayClass15.<GetTypes>b__e(String location)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at HeuristicLab.PluginInfrastructure.SandboxApplicationManager.<>c__DisplayClass13.<GetTypes>b__d(Assembly asm)
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at HeuristicLab.Core.Views.TypeSelector.Configure(IEnumerable`1 baseTypes, Boolean showNotInstantiableTypes, Boolean showGenericTypes, Boolean assignableToAllTypes, Func`2 typeCondition)
   at HeuristicLab.Core.Views.TypeSelector.Configure(Type baseType, Boolean showNotInstantiableTypes, Boolean showGenericTypes, Func`2 typeCondition)
   at HeuristicLab.Core.Views.TypeSelector.Configure(Type baseType, Boolean showNotInstantiableTypes, Boolean showGenericTypes)
   at HeuristicLab.Optimization.Views.AlgorithmView.newProblemButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

It's just an assumption, but it could be that it is thrown because the programmable operator emits new types which may not have an assembly location.

Change History (7)

comment:1 follow-up: Changed 5 years ago by gkronber

  • Owner changed from gkronber to mkommend
  • Status changed from new to assigned

This is most likely caused or related to the changes in r7502 (#1779).

comment:2 Changed 5 years ago by mkommend

  • Status changed from assigned to accepted

comment:3 Changed 5 years ago by mkommend

r7586: Readded check if assembly location is null or string.Emtpy in type discovery.

comment:4 in reply to: ↑ 1 Changed 5 years ago by mkommend

Replying to gkronber:

This is most likely caused or related to the changes in r7502 (#1779).

You were right that the error is related to r7502. The problem was the assemblies generated by the CSharpCodeCodeProvider were not detected.

comment:5 Changed 5 years ago by mkommend

  • Owner changed from mkommend to abeham
  • Status changed from accepted to reviewing

comment:6 Changed 5 years ago by abeham

  • Status changed from reviewing to readytorelease

comment:7 Changed 5 years ago by gkronber

  • Resolution set to done
  • Status changed from readytorelease to closed
  • Version changed from 3.3.6 to 3.3.7
Note: See TracTickets for help on using tickets.