Battle: FPE in Mystic Sunrise (2k3 1.10 sample game) #653

Closed
fdelapena opened this Issue Nov 27, 2015 · 0 comments

Projects

None yet

1 participant

@fdelapena
Member

This game uses gauge style battle. It seems like something is wrong in some gauge drawing.

Game download.

Not tested if the 2k3 1.10 RPG_RT executable is a custom one for this particular game (it shouldn't as "sample game" but...).

Just try to launch some game battle, e.g. new game, select skip scene and leave the room.

Or just launch any battle, e.g. --battle-test 4 (4 is the battle group ID when leaving the room).

GDB backtrace:

Program received signal SIGFPE, Arithmetic exception.
0x000000000056b629 in Window_BattleStatus::DrawGaugeSystem2 (this=0x2d622d0, x=48, y=40, cur_value=0, max_value=0, which=1) at src/window_battlestatus.cpp:161
161     int gauge_width = 25 * cur_value / max_value;
(gdb) bt f
#0  0x000000000056b629 in Window_BattleStatus::DrawGaugeSystem2 (this=0x2d622d0, x=48, y=40, cur_value=0, max_value=0, which=1) at src/window_battlestatus.cpp:161
        system2 = std::shared_ptr (count 2, weak 1) 0x2d62970
        gauge_x = 16
        gauge_width = 5270735
#1  0x000000000056b41e in Window_BattleStatus::RefreshGauge (this=0x2d622d0) at src/window_battlestatus.cpp:131
        system2 = std::shared_ptr (count 2, weak 1) 0x2d62970
        request = 0x2d62490
        actor = 0x2785990
        i = 0
#2  0x000000000056b111 in Window_BattleStatus::Refresh (this=0x2d622d0) at src/window_battlestatus.cpp:100
No locals.
#3  0x000000000056bdb8 in Window_BattleStatus::OnSystem2Ready (this=0x2d622d0) at src/window_battlestatus.cpp:272
No locals.
#4  0x000000000056c2e6 in std::mem_fun1_t<void, Window_BattleStatus, FileRequestResult*>::operator() (this=0x2355a10, __p=0x2d622d0, __x=0x7fffffffdb40) at /usr/include/c++/5.1.1/bits/stl_function.h:1020
No locals.
#5  0x000000000056c1cc in std::binder1st<std::mem_fun1_t<void, Window_BattleStatus, FileRequestResult*> >::operator() (this=0x2355a10, __x=@0x7fffffffdab0: 0x7fffffffdb40)
    at /usr/include/c++/5.1.1/backward/binders.h:123
No locals.
#6  0x000000000056c131 in boost::detail::function::void_function_obj_invoker1<std::binder1st<std::mem_fun1_t<void, Window_BattleStatus, FileRequestResult*> >, void, FileRequestResult*>::invoke (
    function_obj_ptr=..., a0=0x7fffffffdb40) at /usr/include/boost/function/function_template.hpp:159
        f = 0x2355a10
#7  0x00000000004a0d1a in boost::function1<void, FileRequestResult*>::operator() (this=0x2355a08, a0=0x7fffffffdb40) at /usr/include/boost/function/function_template.hpp:773
No locals.
#8  0x000000000049ff4f in FileRequestAsync::CallListeners (this=0x2d62490, success=true) at src/async_handler.cpp:204
        result = {directory = "System2", file = "ffxiinv2", success = true}
        it = {first = 41, second = {<boost::function1<void, FileRequestResult*>> = {<boost::function_base> = {
                vtable = <void boost::function1<void, FileRequestResult*>::assign_to<std::binder1st<std::mem_fun1_t<void, Window_BattleStatus, FileRequestResult*> > >(std::binder1st<std::mem_fun1_t<void, Window_BattleStatus, FileRequestResult*> >)::stored_vtable+1>, functor = {obj_ptr = <Window_BattleStatus::OnSystem2Ready(FileRequestResult*)>, type = {type = <Window_BattleStatus::OnSystem2Ready(FileRequestResult*)>, 
                    const_qualified = false, volatile_qualified = false}, func_ptr = <Window_BattleStatus::OnSystem2Ready(FileRequestResult*)>, bound_memfunc_ptr = {memfunc_ptr = 
    (void (boost::detail::function::X::*)(boost::detail::function::X * const, int)) 0x56bd9c <Window_BattleStatus::OnSystem2Ready(FileRequestResult*)>, obj_ptr = }, obj_ref = {
                    obj_ptr = <Window_BattleStatus::OnSystem2Ready(FileRequestResult*)>, is_const_qualified = false, is_volatile_qualified = false}, 
                  data = -100 '\234'}}, <std::unary_function<FileRequestResult*, void>> = {<No data fields>}, static args = <optimized out>, static arity = <optimized out>}, <No data fields>}}
#9  0x000000000049fff1 in FileRequestAsync::DownloadDone (this=0x2d62490, success=true) at src/async_handler.cpp:226
No locals.
#10 0x000000000049fc4f in FileRequestAsync::Start (this=0x2d62490) at src/async_handler.cpp:153
No locals.
#11 0x000000000056af7c in Window_BattleStatus::Refresh (this=0x2d622d0) at src/window_battlestatus.cpp:79
        request = 0x2d62490
        actor = 0x2785990
        i = 0
#12 0x000000000056ad18 in Window_BattleStatus::Window_BattleStatus (this=0x2d622d0, ix=0, iy=160, iwidth=244, iheight=80, enemy=false) at src/window_battlestatus.cpp:51
No locals.
#13 0x000000000053b24e in Scene_Battle::CreateUi (this=0x568e700) at src/scene_battle.cpp:140
        commands = std::vector of length 3, capacity 4 = {"Attack", "AutoBattle", "Run"}
#14 0x000000000055442f in Scene_Battle_Rpg2k3::CreateUi (this=0x568e700) at src/scene_battle_rpg2k3.cpp:109
        request = 0x3
(...)
@fdelapena fdelapena added this to the 0.4 milestone Nov 27, 2015
@Ghabry Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Dec 5, 2015
@Ghabry Ghabry Prevent div/0 when SP are 0 (Fix #653) ce53a41
@Ghabry Ghabry closed this in cd24382 Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment