B4J Question Rpi3 and std:bad_alloc

micro

Well-Known Member
Licensed User
Longtime User
Hi to all
with Rpi2 and the same programs all work fine but with new board Rpi3 crash the program in this
line:
B4X:
If streamser.IsInitialized = False Then streamser.Initialize(jser.GetInputStream, Null, "streamser")
The object streamser is AsyncStreams

This is the log
B4X:
Program started.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

If i comment the line code, it's work.
 

micro

Well-Known Member
Licensed User
Longtime User
What is the date and size of your jssc.jar ?

this line
B4X:
If streamser.IsInitialized = False Then streamser.Initialize(jser.GetInputStream, Null, "streamser")
is only the initialization the streamer after the open and settings com, without sending any data.

The project is UI, but i repeat if i remove (comment) this line work properly.
The project data is 5432 kb (on disk)

Thanks
 
Upvote 0

micro

Well-Known Member
Licensed User
Longtime User
Found the error:
With Raspi2 the first com in ListPorts is ttyS0 while in Raspi3 is ttyAMA0.
ttyAMA0 generates the exception.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…