Hi,
don't know, if this really is a bug or some sort of misconfiguration of my system or just my fault. However, I thought it's better to post such things. If this is the wrong place to post this, I apologize.
Setup:
Windows 7 64 bit Professional.
Java JDK 7 for 32 bit
When I run a small example in Debug-Mode, I get error messages. When I run the example in Release mode, or from command line, everything is fine.
Example:
Log:
Thank you!
don't know, if this really is a bug or some sort of misconfiguration of my system or just my fault. However, I thought it's better to post such things. If this is the wrong place to post this, I apologize.
Setup:
Windows 7 64 bit Professional.
Java JDK 7 for 32 bit
When I run a small example in Debug-Mode, I get error messages. When I run the example in Release mode, or from command line, everything is fine.
Example:
B4X:
Sub Process_Globals
Private reader As TextReader
End Sub
Sub AppStart (Args() As String)
Dim sys As JavaObject
sys.InitializeStatic("java.lang.System")
reader.Initialize(sys.GetField("in"))
Log("Enter name: ")
Log("You have entered: " & ReadLine)
Log("Enter family name: ")
Dim f As String = ReadLine
Log("Family: " & f)
End Sub
Sub ReadLine As String
Return reader.ReadLine
End Sub
B4X:
Enter name:
main._readline (java line: 82)
java.io.IOException: Das Handle ist ungültig
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:272)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at java.io.BufferedReader.fill(BufferedReader.java:154)
at java.io.BufferedReader.readLine(BufferedReader.java:317)
at java.io.BufferedReader.readLine(BufferedReader.java:382)
at anywheresoftware.b4a.objects.streams.File$TextReaderWrapper.ReadLine(File.java:539)
at b4j.example.main._readline(main.java:82)
at b4j.example.main._appstart(main.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.main(main.java:26)
Thank you!