<div class="markdown_content"><p>Wonferful. You ovelooked this line in the log:<br/>
01-25 08:19:39.838   200   200 F DEBUG   : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x9fc7106a</p>
<p>BUS_ADRALN clearly means misaligned address.</p>
<p>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.</p>
<p>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.</p>
<hr/>
<p><strong> <a class="alink" href="http://sourceforge.net/p/ohrrpgce/bugs/2017/">[bugs:#2017]</a> When Android port is compiled with debug=0 battles crash the whole app at the end of any attack</strong></p>
<p><strong>Status:</strong> open<br/>
<strong>Milestone:</strong> OHRRPGCE<br/>
<strong>Created:</strong> Sun Jan 24, 2016 04:22 AM UTC by Bob the Hamster<br/>
<strong>Last Updated:</strong> Mon Jan 25, 2016 04:23 PM UTC<br/>
<strong>Owner:</strong> nobody</p>
<p>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.</p>
<p>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.</p>
<p>Here is a copy of Wandering Hamster build with debug=0 that reproduces the crash <a href="http://hamsterrepublic.com/tmp/wandering-hamster-crash.apk" rel="nofollow">http://hamsterrepublic.com/tmp/wandering-hamster-crash.apk</a></p>
<hr/>
<p>Sent from sourceforge.net because ohrrpgce@lists.motherhamster.org is subscribed to <a href="https://sourceforge.net/p/ohrrpgce/bugs/">https://sourceforge.net/p/ohrrpgce/bugs/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/ohrrpgce/admin/bugs/options.">https://sourceforge.net/p/ohrrpgce/admin/bugs/options.</a>  Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>