[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] XaAES regression in launch()



On 20/11/2012 00:08, Vincent Rivière wrote:
- TeraDesk does Bus Error at startup

Don't ask me why, but today I have again the Bus Error at startup.

While the TeraDesk process crashes, the offending code is actually in XaAES.
It seems to crash in scrlobj.c, function draw_nesticon(), line 668:

		if (this->prev || this->up)
		{
			pnt[0] = x + x_center;

When testing for this->up, the "this" pointer is trashed, and actually contains the 'XBRA' value. Very strange.

When adding a breakpoint there with CodeWarrior, I see the following.

1) The first 2 calls to that code works fine, while the Bus Error happens on the 3rd breakpoint hit.

2) On the 3rd call, I see that a0 is trashed ("this" pointer), but also sr which has the bogus value of 0x0000.

So I suspect that the bombing code is not called directly, but instead some RTE instruction was called on a corrupted stack and the PC went to that code by mistake.

Well... What to do, now?

--
Vincent Rivière