Tracing .net-abl error

Posted by Ken Ward on 09-Jun-2017 15:09

I'm trying to run a .net window from an ABL window. This has worked just fine in a development environment, but in an installed environment it errors.

Here's the code from the ABL window:

PROCEDURE initializeObject :

  /* Code placed here will execute PRIOR to standard behavior. */

  RUN SUPER.

  /* Code placed here will execute AFTER standard behavior.    */
  
  DEF VAR vLbld AS CLASS rpt.lbld.lblDesign NO-UNDO.
  
  vLblD = NEW rpt.lbld.lblDesign().
  
  WAIT-FOR Application:Run( INPUT vLblD ).
  
  vLblD:Dispose().
  
  DELETE OBJECT vLblD.
  
  APPLY "close" TO THIS-PROCEDURE.

END PROCEDURE.


Here's the error that's generated:

System.NullReferenceException: Object reference not set to an instance of an object.

Stack Trace:

--> initializeObject rpt\lblDesign.w at line 4718  (e:\v2\rcode\rpt\lblDesign.r)
    RunProcedure base\mdi_plus.w at line 32097  (e:\v2\rcode\base\mdi_plus.r)
    USER-INTERFACE-TRIGGER base\mdi_plus.w at line 25540  (e:\v2\rcode\base\mdi_plus.r)
    base\mdi_plus.w at line 26255  (e:\v2\rcode\base\mdi_plus.r)
    sy_start_plus.p at line 19909  (e:\v2\rcode\base\sy_start_plus.r)

.NET StackTrace:
-->   at Progress.ClrBridge.ProxyFactory.CreateConstructors(Type parent, MethodGenerator methodGenerator)
   at Progress.ClrBridge.ProxyFactory.CreateProxyType(IAblClassInfo info, Int32 revision)
   at Progress.ClrBridge.ProxyFactory.GetProxyType(IClassInfo info)
   at Progress.ClrBridge.ClrApi.CreateProxy(IAblClassInfo abltype, Type[] types, Object[] args, UInt64 opaqueid)
   at Progress.ClrBridge.BrgClrFromPro.createProxy(BrgClrFromPro* , otmClass* , Int64 , UInt64 , prmhdr* )


Things I've already checked:

- There is an lblDesign.r file located in the \rpt\lbld\ folder. This was a .cls file in the dvl environment

- other code in our system that references .net Progress windows is working properly.

- the assemblies.xml file and related .dll files are in their approriate folders.


Any help would be greatly appreciated.

Thanks,

Ken

Posted by Laura Stern on 12-Jun-2017 09:50

You don't need to "install" the Telerik dlls.  You just need to put them in the -assemblies directory (default being the current working directory).

You CAN reproduce this in your development environment if you run with r-code - yes?

All Replies

Posted by Laura Stern on 12-Jun-2017 08:17

Does the rpt.lbld.lblDesign class inherit directly from a .NET form or is there another ABL level in the middle?

Posted by Ken Ward on 12-Jun-2017 08:49

It inherits from Telerik's RadForm

USING DistributionOne.d1Controls.LabelEdit.*.
USING DistributionOne.d1Controls.*.
USING DistributionOne.*.

USING Progress.Lang.*.
USING Progress.Windows.Form.
USING System.Windows.Forms.*.
USING System.Drawing.*.
USING Telerik.WinControls.UI.*.
USING TECIT.TBarCode.*.
USING OpenEdge.Core.Assert FROM PROPATH.
USING DistributionOne.d1Controls.eZoomMode FROM ASSEMBLY.
USING rpt.lbld.dlgBarcode FROM PROPATH.
USING Telerik.WinControls.UI.Docking.DocumentTabStrip FROM ASSEMBLY.



BLOCK-LEVEL ON ERROR UNDO, THROW.


CLASS rpt.lbld.lblDesign INHERITS RadForm: 
	

Posted by Laura Stern on 12-Jun-2017 09:35

I think I know what the problem is.  When you are running from a .r, we seem to be missing information on the parent in our type information for the class.  It is true that we don't often keep type information for .NET classes at runtime.  But we get it if we need it.  If that is the problem, I'm REALLY surprised that this has not come up before.  Anyway, you need to log a bug.  Hopefully, you can simplify it down.  The problem is happening on the NEW statement, so this is not related to running a .NET form from an ABL window.  

Posted by Ken Ward on 12-Jun-2017 09:41

Do I need to install Telerik on the client's system or can I just bring the dll's along in our installation?

Posted by Laura Stern on 12-Jun-2017 09:50

You don't need to "install" the Telerik dlls.  You just need to put them in the -assemblies directory (default being the current working directory).

You CAN reproduce this in your development environment if you run with r-code - yes?

Posted by Ken Ward on 12-Jun-2017 10:55

Ok, I got it to throw an error that's at least directly from my code instead of some internal thing.

On top of the DLLs not being there, I didn't know I still had to carry the .resx files along with the .r. I always thought that .resx files were compiled into the program (at least that's how I think it works for .exe files)

Posted by Laura Stern on 12-Jun-2017 12:24

Sorry, now I've lost track of what you're talking about.  What do you mean the "DLLs not being there"?  Are there no Telerik assembly dlls on the machine where you are getting this error?  Is that what you were trying to say before?  Of course you need them!

And yes - you need the .resx files.  .resx files contain translatable strings and such.  So it's possible they won't have anything in them that you need.  If you don't know they should get deployed.  But that shouldn't have anything to do with the error you were getting.

Posted by Ken Ward on 12-Jun-2017 12:29

Sorry for the confusion.

Yes, apparently our install package did not include the Telerik DLLs. That is what was causing the issue.

The comment about the .resx files was a side thing.

Posted by Laura Stern on 12-Jun-2017 12:46

OK.  Good.  Problem solved :-)

This thread is closed