MantisBT - lxdream
View Issue Details
0000069lxdreamSH4public2009-12-09 12:372010-01-15 22:19
EnigmaticCoder 
 
normalcrashalways
newopen 
0.9 
 
0000069: sh4/sh4trans.c:238: xlat_get_code_by_vma: Assertion `(sh4_icache.page_vma == ((sh4r.pc) & sh4_icache.mask))' failed.
I've tried this on 0.9.1 and 0.8.4.

I'd like to preface this bug by saying that it could be caused by an error on my end, but I can't find one. Also, my program works on the hardware, but crashes when run on the emulator, giving me this error:

sh4/sh4trans.c:238: xlat_get_code_by_vma: Assertion `(sh4_icache.page_vma == ((sh4r.pc) & sh4_icache.mask))' failed.

Here's the code
//Main.cpp
...
//If this if statment is commented out, the program runs fine
if (levels[gameState.getCurrentLevel()].levelComplete(enemies))
    gameState.nextLevel();
...

And the functions:
int GameState::getCurrentLevel() const
{
    return currentLevel;
}

bool Level::levelComplete(std::vector<Enemy> &enemies)
{
    for (std::vector<Enemy>::iterator it = enemies.begin();
            it != enemies.end(); ++it)
    {
        if (!it->getDead())
            return false;
    }

    return true;
}

I saw a similar bug already posted that was resolved. Was that resolved in a newer version than I'm testing? If it's not a bother, could you update me about this bug via email: EnigmaticCoder [atttt] hotmail [dotttt] com

If you need any more code, I'd be happy to send it to you.
No tags attached.
Issue History
2009-12-09 12:37EnigmaticCoderNew Issue
2009-12-09 15:36EnigmaticCoderNote Added: 0000079
2009-12-09 16:53EnigmaticCoderNote Added: 0000080
2009-12-09 17:24EnigmaticCoderNote Added: 0000081
2010-01-10 17:18nkeynesNote Added: 0000085
2010-01-15 22:19EnigmaticCoderNote Added: 0000086

Notes
(0000079)
EnigmaticCoder   
2009-12-09 15:36   
The funny thing is, this game ran great for weeks. It wasn't until today that I had issues.
(0000080)
EnigmaticCoder   
2009-12-09 16:53   
You know, I'm having more trouble with my game than just this crash. I have a similar bug that makes the hardware reset too. I'm thinking more and more that this is an error on my end.
(0000081)
EnigmaticCoder   
2009-12-09 17:24   
Ah, I think I just figured this out.

I missed the case when enemies.size() == 0. Sorry!
(0000085)
nkeynes   
2010-01-10 17:18   
I assume that this is working for you now and can be closed?

(Yes, this error message is bad and needs to die, but that's a separate problem I think - what it's really saying is that your program tried to execute from an undefined memory region (ie jumped to somewhere outside RAM) )
(0000086)
EnigmaticCoder   
2010-01-15 22:19   
Yes it's working and can be closed.