It is currently Mon Jun 26, 2017 8:38 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 9:26 am 
Offline
User avatar

Joined: Thu Jan 08, 2015 11:28 am
Posts: 1088
Location: .NET
is it just me or this code sometimes makes BASIC! crash? it most times crashes for me and sometimes works as intended
discovered by replying to post here: a-little-help-with-bitmaps-t4455.html

Code:
GR.OPEN 255,0,0,0,,-1
GR.COLOR 255,0,0,255
GR.BITMAP.CREATE bitmap_pointer, 50,50

GR.BITMAP.DRAWINTO.START bitmap_pointer
GR.RECT box, 0,0,20,20
GR.BITMAP.DRAWINTO.END

GR.BITMAP.DRAW object, bitmap_pointer, 10,10

GR.RENDER
PAUSE 5

_________________
https://github.com/evolbug
http://toobasic.jimdo.com


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 9:30 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5541
Location: Paris, France
Never crashes on my Honor 5X

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 9:33 am 
Offline
User avatar

Joined: Thu Jan 08, 2015 11:28 am
Posts: 1088
Location: .NET
mougino wrote:
Never crashes on my Honor 5X

Nicolas


did you try running it lots of times?

_________________
https://github.com/evolbug
http://toobasic.jimdo.com


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 9:45 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5541
Location: Paris, France
About 10 times

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 9:54 am 
Offline
User avatar

Joined: Thu Jan 08, 2015 11:28 am
Posts: 1088
Location: .NET
mougino wrote:
About 10 times


that's really strange, for me it crashes like every other time.

_________________
https://github.com/evolbug
http://toobasic.jimdo.com


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 10:59 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1147
Location: From Blighty
I can confirm your findings evolbug, BASIC! crashes; but can't replicate a sequence when it crashes, 7...10...went to 17 run times... as you run your code in short succession.

I don't know what to think, I am not sure what gets "flushed" out when BASIC! returns to the Editor mode?

At the time of running your example, my RAM was about 70% full, 0.95Gb out of 1.35Gb was free. I don't know if that has any bearing, and BASIC! was fluctuating around 20 - 25Mb of that RAM usage.

Maybe the Android system prioritised in killing BASIC! off? But I can't see how or why as RAM isn't ramping up much?

Mog


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 11:22 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1147
Location: From Blighty
Afterthought:

What happens on your device evolbug with a GR.CLOSE before returning to the Editor?

Mog


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Thu Jul 28, 2016 2:30 pm 
Offline
User avatar

Joined: Thu Jan 08, 2015 11:28 am
Posts: 1088
Location: .NET
Mog wrote:
Afterthought:

What happens on your device evolbug with a GR.CLOSE before returning to the Editor?

Mog


it doesnt seem to crash. so apparently something doesn't get unloaded or something gets stuck somewhere

_________________
https://github.com/evolbug
http://toobasic.jimdo.com


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Fri Jul 29, 2016 9:05 am 
Offline
User avatar

Joined: Sat Oct 04, 2014 5:45 am
Posts: 653
evolbug wrote:
that's really strange, for me it crashes like every other time.

May be your eyes are quite quick every other time to actually see the square ?
May be the remainder of times it just "crashes" because of a slow eye ?
What about changing the pause 5 to pause 2000 ?
It works for me on my slow bottom of the range Chinese test phone.
I am not sure if Nicolas really tested your code, maybe just an excuse to mention his new phone :mrgreen:

_________________
Download and tutorial for RFODESIGNER
https://sites.google.com/site/rfodesigner/


Top
 Profile  
 
 Post subject: Re: crash with bitmaps
Unread postPosted: Fri Jul 29, 2016 9:15 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5541
Location: Paris, France
:lol:
maybe I tested, maybe not :)

(but honestly I did test it)

_________________
- Creator of the Android BASIC! Compiler


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred