login about faq

I am experimenting with base58 encoding in EncryptStringENC and EncodeString methods. I was trying to encode a Guid string (w/o braces) as base58 (the reason is irrelevant) when I decided to try random strings. If I specify e.g. the single character "f" as input, Visual Studio 2015 closes immediately. No crash message or anything. In some tests I manage to get a System.StackOverflowException, but mostly VS2015 closes without warning. Even if I wrap the code in try/catch it still does not catch the exception.

I have to acknowledge that base58 encoding may not be the proper choice or even possible in some cases, but I still do not believe that the application should not crash.

I created a new empty win32 console application targeting .NET Framework 4.5.2 and x86 platform for the test and installed Chilkat 9.5.0.52 from Nuget.

The code for the test:

var crypt = new Crypt2();
crypt.UnlockComponent("xxxx");
crypt.VerboseLogging = true;
crypt.DebugLogFilePath = "...";
var strOutput = crypt.EncodeString("f", "utf-8", "base58");

and/or:

var crypt = new Crypt2();
crypt.UnlockComponent("xxxx");
crypt.VerboseLogging = true;
crypt.DebugLogFilePath = "...";
crypt.CryptAlgorithm = "none";
crypt.EncodingMode = "base58";
crypt.Charset = "utf-8";
var strOutput = crypt.EncryptStringENC("f");

In both cases it makes no difference if I specify "ansi" or "utf-8" as charset or leave it out completely. If I try many other input strings, e.g. "abc123", "ijijij" it works fine, but e.g. "xyzxyz" does not.

The debug log does not provide much help unfortunately (include both success and failure output):

EncodeString:
    DllDate: Aug 26 2015
    ChilkatVersion: 9.5.0.52
    UnlockPrefix: xxxxxx
    Username: xxxx:xxxx
    Architecture: Little Endian; 32-bit
    Language: .NET 4.5
    VerboseLogging: 1
    inputString: ijijij
    charset: ansi
    encoding: base58
    result: uVeZm5Db
    (leaveContext 15ms)
EncodeString:
    DllDate: Aug 26 2015
    ChilkatVersion: 9.5.0.52
    UnlockPrefix: xxxx
    Username: xxxx:xxxx
    Architecture: Little Endian; 32-bit
    Language: .NET 4.5
    VerboseLogging: 1
    inputString: xyzxyz
    charset: ansi
    encoding: base58

and from EncryptStringENC:

EncryptStringENC:
    DllDate: Aug 26 2015
    ChilkatVersion: 9.5.0.52
    UnlockPrefix: xxxx
    Username: xxxx::xxxx
    Architecture: Little Endian; 32-bit
    Language: .NET 4.5
    VerboseLogging: 1
    szInput: 6
    cryptDetails:
        algorithm: none
        keyLength: 128
        paddingScheme: 0
        cipherMode: cbc
        encodingMode: base58
        charset: utf-8
        secretKeyLen: 0
        iv: (empty)
        dataNumBytes: 6
        dataHex: 7879 7A78 797A
        (leaveContext 15ms)
    encryptData2:
        algorithm: none
        (leaveContext)
    szOutput: 6
EncryptStringENC:
    DllDate: Aug 26 2015
    ChilkatVersion: 9.5.0.52
    UnlockPrefix: xxxx
    Username: xxxx:xxxx
    Architecture: Little Endian; 32-bit
    Language: .NET 4.5
    VerboseLogging: 1
    szInput: 6
    cryptDetails:
        algorithm: none
        keyLength: 128
        paddingScheme: 0
        cipherMode: cbc
        encodingMode: base58
        charset: utf-8
        secretKeyLen: 0
        iv: (empty)
        dataNumBytes: 6
        dataHex: 696A 696A 696A
        (leaveContext 31ms)
    encryptData2:
        algorithm: none
        (leaveContext 16ms)
    szOutput: 6
    Success.
    (leaveContext 47ms)

I ran the same tests with Visual Studio 2013 that does not appear to close without warning, however it does not provide any more detail. The following event log gets added from Visual Studio 2015 though:

The description for Event ID 0 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Error Handler Exception: System.ServiceModel.CommunicationException: There was an error reading from the pipe: Unrecognized error 109 (0x6d). ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: There was an error reading from the pipe: Unrecognized error 109 (0x6d). ---> System.IO.PipeException: There was an error reading from the pipe: Unrecognized error 109 (0x6d).
   at System.ServiceModel.Channels.PipeConnection.OnAsyncReadComplete(Boolean haveResult, Int32 error, Int32 numBytes)
   --- End of inner exception stack trace ---
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.ConnectionStream.EndRead(IAsyncResult asyncResult)
   at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
   --- End of inner exception stack trace ---
   at System.Net.Security.NegotiateStream.EndRead(IAsyncResult asyncResult)
   at System.ServiceModel.Channels.StreamConnection.EndRead()
   --- End of inner exception stack trace ---
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
   at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext) \r\n    at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Channels.TransportDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
   at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)

the message resource is present but the message is not found in the string/message table

asked Oct 01 '15 at 14:28

roan98dk's gravatar image

roan98dk
326192034


link

answered Oct 01 '15 at 19:18

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

There have been 2 releases since this prerelease, but neither of the release notes mention this as being fixed. Is that an oversight or has it still not been included in the final release?

(Nov 13 '15 at 05:56) roan98dk

I tested with 9.5.0.54 and can confirm the fix. I would still have liked to see this in the release notes, but I presume this to be an oversight?

(Nov 13 '15 at 06:47) roan98dk

Thanks, I'll investigate..

link

answered Oct 01 '15 at 15:41

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Thanks, the new win32 build works great :-)

Can I ask what was the problem and whether it was only related to base58?

And also an estimated release date of the next Nuget package including this fix?

link

answered Oct 02 '15 at 08:47

roan98dk's gravatar image

roan98dk
326192034

edited Oct 02 '15 at 08:50

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×17
×14
×13
×7
×1

Asked: Oct 01 '15 at 14:28

Seen: 1,308 times

Last updated: Nov 13 '15 at 06:47

powered by OSQA