[Ohrrpgce] [ohrrpgce:bugs] #2017 When Android port is compiled with debug=0 battles crash the whole app at the end of any attack

TeeEmCee teeemcee at users.sf.net
Tue Jan 26 03:14:11 PST 2016


Wonferful. You ovelooked this line in the log:
01-25 08:19:39.838   200   200 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x9fc7106a

BUS_ADRALN clearly means misaligned address.

Funny, as soon as I read that this was related to attacks I guessed this had to do with the animation stack. On a little inspection, it's obvious what the problem is: the stack contains a mix of 32 bit and 16 bit values, leading to misalignment (until only a few months ago it only had 16 bit values). I'm not sure why it doesn't crash with debug=2, but it might be that temporarily storing the pointer in another variable causes different instructions to be emitted which can tolerate unaligned access.

Anyway the solution is easy: I replaced each popw/pushw with popdw/pushdw, and simplified the stack code. But I managed to break battles.Can't figure out what I've done wrong, will try again later.


---

** [bugs:#2017] When Android port is compiled with debug=0 battles crash the whole app at the end of any attack**

**Status:** open
**Milestone:** OHRRPGCE
**Created:** Sun Jan 24, 2016 04:22 AM UTC by Bob the Hamster
**Last Updated:** Mon Jan 25, 2016 04:23 PM UTC
**Owner:** nobody


The Wobbler noticed a serious bug in the Android port. It seems that when it is compiled with debug=0 the battles always crash at the end of the first attack.

I have no idea why this is happening, but I temporarily went back to compiling with debug=2 for Android games that use the battle system until we figure out what is going on.

Here is a copy of Wandering Hamster build with debug=0 that reproduces the crash http://hamsterrepublic.com/tmp/wandering-hamster-crash.apk


---

Sent from sourceforge.net because ohrrpgce at lists.motherhamster.org is subscribed to https://sourceforge.net/p/ohrrpgce/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/ohrrpgce/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20160126/0f5377f0/attachment.htm>


More information about the Ohrrpgce mailing list