Was: Encoding to HEX fails in OS X Build / Is: KeyDown Event Issue on Windows

[code]Function DB_WAG4_User_Auth(Username As String, Password As String) As Boolean
Dim Codiertes_Passwort As String
Dim data As RecordSet

Dim strSQL As String = “select password,id from wag_main_db.wag_main_user where username=’” + Username + “’”

data = WAG4_Server.SQLSelect(strSQL.ConvertEncoding(Encodings.WindowsANSI))

Codiertes_Passwort = EncodeHex(MD5(Password))

If Not WAG4_Server.Error Then

If data <> Nil And Not data.EOF Then
  
  MsgBox EndOfLine + data.Field("password").StringValue.DefineEncoding(Encodings.WindowsANSI) + EndOfLine + Codiertes_Passwort
  
  If Codiertes_Passwort =  data.Field("password").StringValue.DefineEncoding(Encodings.WindowsANSI) Then
    
    WAG4_UserID = data.Field("id").IntegerValue
    
    Return True
    
  End If
  
End If

End If

WAG4_UserID = 0

Return False
End Function
[/code]

The above code works fine when build for Windows 32Bit. It also worked fine for OS X since 2 years. Suddenly it stopped working on OS X.

This is what the MsgBox shows when build for OS X:

This is what the MsgBox shows when running in debugger on OS X:

Why is suddenly OS X not encoding to HEX anymore???

Even the EncodingToHEXMBS does not encode it anymore. Only in Windows Builds and in Debug Mode on OS X.
Cleared Xojo Caches = same.

This all is happening in Xojo 2015 R2.4 on OS X 10.11.1. This is my major project which makes StackOverflows in Xojo 2015 R3, so i can’t test it there.

Tested an older build made with same Xojo on same machine in same OS X version = works. So it must be a Xojo Issue :frowning: :frowning: :frowning:

Please file a bug report with the exact IDE / OS configurations that work, and which ones don’t.

It’s related to my Project. In a new project

MsgBox EncodeHex(MD5("test"))

brings the same results in debugger and in final build.

And because i can’t replicate it in a simple project, i did not made a FR.

Even if i use HexstringMBS or EncodingToHexMBS my OS X App won’t do it. In each new Project it works just fine.
I even uninstalled Xojo using App Delete and rebooted the Mac.

[quote=223943:@Sascha S]
I even uninstalled Xojo using App Delete and rebooted the Mac.[/quote]

Dont use App Delete, use iTrash :wink:

Shame on me! :smiley:

I recently added in the KeyDown Event of my Password Field the following Code:

[code] dim endEditKeys() as String = Array(Encodings.UTF8.Chr(9), Encodings.UTF8.Chr(3), Encodings.UTF8.Chr(13))

if endEditKeys.IndexOf(key) > -1 then
TriggerLogin
end if[/code]

This lead to an empty string in the Method that handles the login. The only strange thing is that this works fine in Windows Builds but not on OS X. I think OS X is doing it right because i do not return True in the event.

I removed the above code and now use a PushButton with the Default=True property and now it works fine again.

So much headaches and i can’t blame anyone but myself :wink:

Thank you to everyone who tried to help!