FBA The Creator

The True Multiplatform PC / PocketPC Opensource Development Tool - Read Only Mode - Kept only for historical purposes - Thank you all ;)
It is currently Mon Jun 17, 2019 3:42 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Jun 07, 2009 9:39 pm 
Offline
User avatar

Joined: Sat May 30, 2009 2:57 pm
Posts: 18
Location: Germany Frankonia
Dear evilmajo, hello FBA community..

When tracing through the program, the actual screen output comes 1 frame(loop) to late.

The easiest way to recreate:
- Load the tutorial project 09b / Gfx Font into the IDE
- you should also see/ watch the Stack Dump panel
- set a breakpoint at line #23 or somewhere above the statement "count = count + 1"
Now we need to follow the code (mentally), watch the app window and the var "count" in the Stack Dump
- run the app, Stop: the app window black (o.k.), count == 0 (o.k.)
- run the app, Stop: the app window black (hmmh, there should be drawn the countervalue 0), count == 1 (o.K.)
- run the app, Stop: the app window shows the digits (hmmh, counter displays 1, but should be 2), count == 2 (o.K.)

And I tried to debug the actions in a grid, again, again... Tough Luck, that the grid isn't shown in the Stack Dump.

By the way. when the app-window hides my code and I want to move it aside, i first click in the titlebar of the IDE, then in the titlebar of the app and then it can be moved i.e. over the Project Explorer.

_________________
[x] -- Click at the [x] while pressing [SHIFT] + [ALT] + [NUM-LOCK] simultanously.


Top
   
PostPosted: Mon Jun 08, 2009 7:10 am 
Offline
FBA Administrator
FBA Administrator
User avatar

Joined: Fri Mar 21, 2008 11:19 pm
Posts: 238
Location: Rome - Italy
Birger,

unfortunately that's how the FBA gameloop works :)
In shorts, you won't see anything on the screen until your mainloop completes: when your mainloop function exits, the screen is redrawn.
So if you draw something in the middle of the mainloop and then pause your execution, your window won't be updated until your mainloop completes :)

Regards.


Top
   
PostPosted: Mon Jun 08, 2009 12:17 pm 
Offline
User avatar

Joined: Sat May 30, 2009 2:57 pm
Posts: 18
Location: Germany Frankonia
Hi evilmajo;
yes, as you wrote it should be - I fully agree.

o.K., I tried it again :oops: - It's only the first screen, that's missing (when the count should display 0).

And - it's NOT unfortunatly how FBA mainloop works :)
It's similiar to a classic automation controller, at framestart the inputs are read, then execution, at the end writing to the outputs.
And that's the hit: with FBA you don't need to push a button, therefore the application starts running.

Have a nice time. thx Birger

_________________
[x] -- Click at the [x] while pressing [SHIFT] + [ALT] + [NUM-LOCK] simultanously.


Top
   
PostPosted: Mon Jun 08, 2009 8:52 pm 
Offline
User avatar

Joined: Sat May 30, 2009 2:57 pm
Posts: 18
Location: Germany Frankonia
jepp again, with another detail,

mainloop did draw several times to the screen (the screen is painted), before it stops at a breakpoint.
Then the first screen output isn't painted (mainloop was stopped for the second time at that breakpoint).
When mainloop has it third stop at same breakpoint, then the screen as drawn after the second stop is painted.

_________________
[x] -- Click at the [x] while pressing [SHIFT] + [ALT] + [NUM-LOCK] simultanously.


Top
   
PostPosted: Thu Jun 11, 2009 11:46 am 
Offline
User avatar

Joined: Sat May 30, 2009 2:57 pm
Posts: 18
Location: Germany Frankonia
How to debug your application seeing the first screen frame output
The idea was, to start the app in the IDE,
then raise an event and stop the app with reinitialized variables at the breakpoint when the first frame is seen on the screen.

It's all written in the attached Source/FBA Project.
Don't wonder, I set the projects frame rate to 200.


Attachments:
File comment: only projectfile and resources directory w/o fba_win32 subdir
09bb.gfx.font.debug.test.fbp.zip [18.36 KiB]
Downloaded 459 times

_________________
[x] -- Click at the [x] while pressing [SHIFT] + [ALT] + [NUM-LOCK] simultanously.
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited