Use of .Net Components result in error

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
marcel.heij
Posts: 14
Joined: Thu Aug 15, 2019 4:35 pm

Use of .Net Components result in error

Post by marcel.heij » Wed Nov 23, 2022 2:17 am

We are trying to use a .Net component to determine the file encoding of files we have to process.
We tried two components:
1. https://gist.github.com/TaoK/945127?per ... id=3448173
2. https://github.com/khalidsalomao/SimpleHelpers.Net

Both components work fine when we use it in a simple C# console app, but when we register it in the Lansa repository under ".Net Components" and try to use it in a reusable part we get errors like (with a large file and large sample size):
-----------------------------------------------------------------------
Message : Error invoking method <DetectTextFileEncoding>. Exception Details: Exception has been thrown by the target of an invocation. ---- RuntimeMethodHandle::InvokeMethod ---- Exception of type 'System.OutOfMemoryException' was thrown.

Routine : File LpNetDnpClrInstance at line 774.

-----------------------------------------------------------------------
for the first component and errors like:
-----------------------------------------------------------------------
Message : (0885) - Access violation (exception code c0000005) at address 6FEC4750 should be reported to your product vendor as soon as possible by supplying the files X_ERR.LOG and X_RUN.DMP in directory E:\lansa\tmp\.
Routine : X_RUN

-----------------------------------------------------------------------
for the second component.

Does somebody has a clue why Lansa throws these errors?

User avatar
Dino
Posts: 324
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Use of .Net Components result in error

Post by Dino » Thu Nov 24, 2022 9:31 am

Does the Exception of type 'System.OutOfMemoryException' happen when using it from command line over a large sample as well? Or the command line was used only for a small test?

The c0000005 most times is related to windows updates, different versions of dll's, things like that. If you report this to support and submit the trace file more information could be obtain from that.

marcel.heij
Posts: 14
Joined: Thu Aug 15, 2019 4:35 pm

Re: Use of .Net Components result in error

Post by marcel.heij » Thu Nov 24, 2022 9:52 pm

Via command line all works fine, also with a very large sample size. In Lansa it works with a small sample size, but with a large sample size it is giving the out of memory exception.

User avatar
Dino
Posts: 324
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Use of .Net Components result in error

Post by Dino » Fri Nov 25, 2022 1:08 am

You may want to take a look to this other post, as one of those maybe can do what you are trying to do with that .net component without the need of that additional piece:

viewtopic.php?f=3&t=2477
viewtopic.php?f=3&t=2577&p=7593&hilit=mime#p7607

Post Reply