schimanski Well-Known Member Licensed User Longtime User Nov 11, 2014 #1 Not always, but sometimes I get an errormessage for this line: B4X: If Nachricht.Contains("[@TIP@]§AUTHENxxxx") Then Does somebody knows something about it? Thanks for help. B4X: Error occurred on line: 213 (server) Target is null. Method called: Contains: Stack Trace: ( CoreFoundation <redacted> + 150 libobjc.A.dylib objc_exception_throw + 38 CoreFoundation <redacted> + 0 Foxfinder +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 196 Foxfinder -[B4IShell runMethod:] + 496 Foxfinder -[B4IShell raiseEventImpl:method:args::] + 1846 Foxfinder -[B4IShellBI raiseEvent:event:params:] + 1280 Foxfinder __50-[B4I raiseEventFromDifferentThread:event:params:]_block_invoke + 74 libdispatch.dylib <redacted> + 10 libdispatch.dylib <redacted> + 22 libdispatch.dylib _dispatch_main_queue_callback_4CF + 718 CoreFoundation <redacted> + 8 CoreFoundation <redacted> + 1512 CoreFoundation CFRunLoopRunSpecific + 476 CoreFoundation CFRunLoopRunInMode + 106 GraphicsServices GSEventRunModal + 136 UIKit UIApplicationMain + 1440 Foxfinder main + 116 libdyld.dylib <redacted> + 2 ) Log: Target is null. Method called: Contains: Log: Target is null. Method called: Contains:
Not always, but sometimes I get an errormessage for this line: B4X: If Nachricht.Contains("[@TIP@]§AUTHENxxxx") Then Does somebody knows something about it? Thanks for help. B4X: Error occurred on line: 213 (server) Target is null. Method called: Contains: Stack Trace: ( CoreFoundation <redacted> + 150 libobjc.A.dylib objc_exception_throw + 38 CoreFoundation <redacted> + 0 Foxfinder +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 196 Foxfinder -[B4IShell runMethod:] + 496 Foxfinder -[B4IShell raiseEventImpl:method:args::] + 1846 Foxfinder -[B4IShellBI raiseEvent:event:params:] + 1280 Foxfinder __50-[B4I raiseEventFromDifferentThread:event:params:]_block_invoke + 74 libdispatch.dylib <redacted> + 10 libdispatch.dylib <redacted> + 22 libdispatch.dylib _dispatch_main_queue_callback_4CF + 718 CoreFoundation <redacted> + 8 CoreFoundation <redacted> + 1512 CoreFoundation CFRunLoopRunSpecific + 476 CoreFoundation CFRunLoopRunInMode + 106 GraphicsServices GSEventRunModal + 136 UIKit UIApplicationMain + 1440 Foxfinder main + 116 libdyld.dylib <redacted> + 2 ) Log: Target is null. Method called: Contains: Log: Target is null. Method called: Contains:
Erel B4X founder Staff member Licensed User Longtime User Nov 11, 2014 #2 This error means that the map was not initialized. Upvote 0
schimanski Well-Known Member Licensed User Longtime User Nov 11, 2014 #3 Sorry, to little info: Nachricht is a string in that case and 'contains' the string-function, not a map.... Upvote 0
Sorry, to little info: Nachricht is a string in that case and 'contains' the string-function, not a map....
Erel B4X founder Staff member Licensed User Longtime User Nov 11, 2014 #4 Where are you assigning its value? Upvote 0
schimanski Well-Known Member Licensed User Longtime User Nov 11, 2014 #5 I get the data from a serverstream... B4X: filestream_NewData (Buffer() As Byte) Try Dim Nachricht As String Nachricht = BytesToString(Buffer, 0, Buffer.Length, "windows-1252") Upvote 0
I get the data from a serverstream... B4X: filestream_NewData (Buffer() As Byte) Try Dim Nachricht As String Nachricht = BytesToString(Buffer, 0, Buffer.Length, "windows-1252")
Erel B4X founder Staff member Licensed User Longtime User Nov 11, 2014 #6 This means that BytesToString failed to decode the data as valid string (I've changed the behavior to throw an exception in that case). Are you using AsyncStreams in prefix mode? Upvote 0
This means that BytesToString failed to decode the data as valid string (I've changed the behavior to throw an exception in that case). Are you using AsyncStreams in prefix mode?
schimanski Well-Known Member Licensed User Longtime User Nov 11, 2014 #7 I don't use AsyncStreams.initializePrefix. I only use AsyncStreams.initialize. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 11, 2014 #8 This means that you should expect messages to be split (or merged) and handle this. You can try to use ASCII as the encoding. It will most probably accept any data you give it. Upvote 0
This means that you should expect messages to be split (or merged) and handle this. You can try to use ASCII as the encoding. It will most probably accept any data you give it.
schimanski Well-Known Member Licensed User Longtime User Nov 11, 2014 #9 ASCII works...much thanks for your efforts Upvote 0