PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Following in the tracks of hanging bug

I've downloaded source, compiled it in VS2005 for PPC2003. Than modified sample TestApplication to show number of frames passed.

Unfortunately, on both tested devices this bug appears ( I hoped that may be it vanished ) After about 32000 frames on one device and 43000 on another.

Do you tried to catch this bug?

Now with the source code I could make some deeper debug and can explain what happens when game in thats hanging state. The game doesn't fully hangs, indeed it doesn't hangs at all. But picture on the screen remains the same despite the fact that onNextFrame() is called, it changed backbuffer, GXBeginDraw() called, backbuffer coppied by memcpy, GXEndDraw(), all called and returned S_OK, but picture on the screen doesn't want to update, I don't know realy what to do and to think in this situation.
summer_goth · 23 Mar 2007, 08:03 UTC
Nomad what program did you use to get the project from the site?

I've downloaded some client, but haven't tried it out yet. Not all that sure as to how this thing works.
TortoiseSVN

When installed it is used from explorer's context menu.
To get sources I've done following steps. Created new folder. In that folder called context menu->SVN Checkout and than entered url https://svn.pocketmatrix.net/gledplay/ and pressed OK. Accepted all security certificates.
That's all whas was needed to do.
summer_goth · 23 Mar 2007, 13:13 UTC
Ah cool, thanks. :)
Nomad, can you post the part of the code where you are talking about?

Thanks
On thursday-friday I had analized code more thoroughly. And now have some results.

First of all I want aswer for Matias's request:
Nomad, can you post the part of the code where you are talking about?


I use your TestApplication in GlepPlay's solution under VS2005. I've changed onNextFrame in the following way
Code:

static int y = 0;
static int delta = 1;
static int frames = 0;

y += delta; if( y >= 315 || y <= 0 ) delta = -delta; frames++;
pBackBuffer->fillRect(RGB(0,frames%255,y%255));
mainPanel->drawFormattedText(10,y,Font::getSystemFontWithBorder(),
Font::LEFT_ALIGN, TEXT( "HOLA MUNDO! Frame # %d." ), frames );

return ReturnCode::OK;


Fist of all I've seen that you use 3 types of graphical buffer output which depends on platform's capabilities, and have seen that if application runs on VGA device, but not in VGA state than GAPI is used instead of FrameBuffer.
I have 2 devices. On one framebuffer creation fails but other newer VGA device supports it. I've changed onConfig()
Code:
config.dwHighResolution = HighResolution::ENABLED;

to support high resolution so output on VGA device runs trough FrameBuffer. After that on VGA device TestApplication runs without hang. I've tested it for couple of hours.

So from that moment I've thought that the problem was in GAPI hadling. But while I debuged TestApplication on that other device with GAPI I've discovered that the problem is not only in GAPI. The problem is in Fps class when GAPI is used. I've got to know it when commented following lines in Application::MainLoop()
Code:

// Wait for next frame
if (m_bActiveWindow || m_config.bMinimizedActive)
m_pTimer->wait();

After I've commented them the TestApplication runs fine on other older GAPI only device too.

That are my results for now.

Best regards! Nomad.
summer_goth · 26 Mar 2007, 08:41 UTC
Nice work so far Nomad.
Great Work nomad, now I am not at home. At night I will check it; but it sounds great.
Nomad, thank you very much! I just knew that one day someone gonna catch this anoying bug!
Its only half or work that must be done.
The task for now is to find out what is wrong with fps class, because simply commenting it is not a solution, as it does a great job saving battery power.