Closed JCog closed 1 month ago
Okay I did at least manage to figure out the the issue started with 88687e1d8d724b6dfa5bf6cc983632766cc7b67e. Still not sure what's going on, but that's definitely where the problem is.
That commit added the flags -DNON_MATCHING and -DAVOID_UB. If I were a betting man I'd say they're the cause
Well I made a little bit more progress here. Any effect that tries to dma_copy()
something more than 0x1000
bytes crashes. Looping through gEffectTable
, there are two more effects that do so: EFFECT_TUBBA_HEART_ATTACK
and EFFECT_FIREWORK_ROCKET
. I don't know why that's the limit though.
Every single effect (except for EFFECT_QUIZMO_ANSWER
, oddly) is bigger in dx than building vanilla with --shift
and --modern-gcc
by varying amounts. I also don't know why this is, but my guess is that that's the underlying cause here.
As a side note, this seems to be the cause of #67.
Effects being bigger than vanilla is definitely unintended, but I worry about that upper limit. @rainchus is likely to know more about this
Any time
fx_aura()
is used, the game crashes with a segfault inosInvalICache()
. This includes the intro sequence, Fire Shell, Master 3, and Final Bowser. Backtracing from a crash on Bowser gives me the following:This doesn't seem to happen with the vanilla repo using
--shift
and--modern-gcc
, so I assume something must have been changed that broke this, but beyond that I have no idea what's going on.