Page 1 of 1

Use of .Net Components result in error

Posted: Wed Nov 23, 2022 2:17 am
by marcel.heij
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?

Re: Use of .Net Components result in error

Posted: Thu Nov 24, 2022 9:31 am
by Dino
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.

Re: Use of .Net Components result in error

Posted: Thu Nov 24, 2022 9:52 pm
by marcel.heij
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.

Re: Use of .Net Components result in error

Posted: Fri Nov 25, 2022 1:08 am
by Dino
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