singalen / wesnoth

iOS development fork of Wesnoth
http://www.wesnoth.org/
GNU General Public License v2.0
3 stars 0 forks source link

Crash in latest master after turning a screen on and off #84

Closed singalen closed 6 years ago

singalen commented 6 years ago

Stack:

The bad address is 0x10c9d0000.

I found that 0x10c9d0000 is the value of frame_buffer.surface_.pixels pointer.

Let's see where it invalidates...

0 0x0000000101c41458 in BlitRGBtoRGBPixelAlpha at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/lib/SDL2-2.0.5/src/video/SDL_blit_A.c:472

1 0x0000000101c2fdb4 in SDL_SoftBlit at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/lib/SDL2-2.0.5/src/video/SDL_blit.c:88

2 0x0000000101c915dc in SDL_LowerBlit at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/lib/SDL2-2.0.5/src/video/SDL_surface.c:553

3 0x0000000101c91978 in SDL_UpperBlit at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/lib/SDL2-2.0.5/src/video/SDL_surface.c:650

4 0x000000010013add4 in sdl_blit(surface const&, SDL_Rect, surface&, SDL_Rect) at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/battleforwesnoth/../../../src/sdl/utils.hpp:34

5 0x0000000100f9d90c in gui2::canvas::blit(surface&, SDL_Rect) at /Users/vic/src/wesnoth/wesnoth/src/gui/core/canvas.cpp:1447

6 0x0000000100f67830 in gui2::panel::impl_draw_background(surface&, int, int) at /Users/vic/src/wesnoth/wesnoth/src/gui/widgets/panel.cpp:71

7 0x00000001019d8b40 in gui2::widget::draw_background(surface&, int, int) at /Users/vic/src/wesnoth/wesnoth/src/gui/widgets/widget.cpp:397

8 0x000000010100cf0c in gui2::window::draw() at /Users/vic/src/wesnoth/wesnoth/src/gui/widgets/window.cpp:748

9 0x0000000101026180 in decltype((std::__1::forward<gui2::window&>(fp0)).fp(std::1::forward<>(fp1))) std::1::__invoke<void (gui2::window::&)(), gui2::window&, void>(void (gui2::window::&&&)(), gui2::window*&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4232

10 0x0000000101026110 in std::1::bind_return<void (gui2::window::)(), std::__1::tuple<gui2::window>, std::1::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>, __is_valid_bind_return<void (gui2::window::*)(), std::1::tuple<gui2::window>, std::__1::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&> >::value>::type std::1::apply_functor<void (gui2::window::)(), std::1::tuple<gui2::window*>, 0ul, std::1::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&> >(void (gui2::window::&)(), std::__1::tuple<gui2::window>&, std::1::tuple_indices<0ul>, std::__1::tuple<gui2::widget&, gui2::event::ui_event&&, bool&, bool&>&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:2206

11 0x00000001010260e0 in std::1::bind_return<void (gui2::window::)(), std::__1::tuple<gui2::window>, std::1::tuple<gui2::widget&&&, gui2::event::ui_event&&, bool&&&, bool&&&>, __is_valid_bind_return<void (gui2::window::*)(), std::1::tuple<gui2::window>, std::__1::tuple<gui2::widget&&&, gui2::event::ui_event&&, bool&&&, bool&&&> >::value>::type std::1::bind<void (gui2::window::)(), gui2::window*>::operator()<gui2::widget&, gui2::event::ui_event, bool&, bool&>(gui2::widget&&&, gui2::event::ui_event&&, bool&&&, bool&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:2239

12 0x0000000101025f40 in decltype(std::1::forward<std::1::bind<void (gui2::window::)(), gui2::window>&>(fp)(std::1::forward<gui2::widget&, gui2::event::ui_event, bool&, bool&>(fp0))) std::1::invoke<std::1::bind<void (gui2::window::)(), gui2::window>&, gui2::widget&, gui2::event::ui_event, bool&, bool&>(std::1::bind<void (gui2::window::)(), gui2::window>&&&, gui2::widget&&&, gui2::event::ui_event&&, bool&&&, bool&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4291

13 0x0000000101025eec in void std::1::invoke_void_return_wrapper::call<std::1::bind<void (gui2::window::)(), gui2::window>&, gui2::widget&, gui2::event::ui_event, bool&, bool&>(std::1::bind<void (gui2::window::)(), gui2::window>&&&, gui2::widget&&&, gui2::event::ui_event&&, bool&&&, bool&&&) at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional_base:359

14 0x0000000101025d28 in std::1::function::func<std::1::bind<void (gui2::window::)(), gui2::window>, std::1::allocator<std::1::bind<void (gui2::window::)(), gui2::window> >, void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event&&, bool&, bool&) at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1552

15 0x0000000100220fe0 in std::__1::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)>::operator()(gui2::widget&, gui2::event::ui_event, bool&, bool&) const at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1903

16 0x000000010021fce0 in bool gui2::event::implementation::fire_event<std::1::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >(gui2::event::ui_event, std::1::vector<std::__1::pair<gui2::widget, gui2::event::ui_event>, std::1::allocator<std::1::pair<gui2::widget, gui2::event::ui_event> > >&, gui2::widget, gui2::widget) at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/battleforwesnoth/../../../src/gui/core/event/dispatcher_private.hpp:434

17 0x00000001001fdb38 in bool gui2::event::fire_event<std::__1::function<void (gui2::widget&, gui2::event::ui_event, bool&, bool&)> >(gui2::event::ui_event, gui2::event::dispatcher, gui2::widget) at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/battleforwesnoth/../../../src/gui/core/event/dispatcher_private.hpp:506

18 0x00000001001fc2ec in gui2::event::dispatcher::fire(gui2::event::ui_event, gui2::widget&) at /Users/vic/src/wesnoth/wesnoth/src/gui/core/event/dispatcher.cpp:147

19 0x0000000101690394 in gui2::event::sdl_event_handler::draw() at /Users/vic/src/wesnoth/wesnoth/src/gui/core/event/handler.cpp:602

20 0x000000010168e220 in gui2::event::sdl_event_handler::draw_everything() at /Users/vic/src/wesnoth/wesnoth/src/gui/core/event/handler.cpp:618

21 0x000000010168d79c in gui2::event::sdl_event_handler::handle_event(SDL_Event const&) at /Users/vic/src/wesnoth/wesnoth/src/gui/core/event/handler.cpp:428

22 0x0000000100022af4 in events::pump() at /Users/vic/src/wesnoth/wesnoth/src/events.cpp:630

23 0x00000001010127b0 in gui2::window::show(bool, unsigned int) at /Users/vic/src/wesnoth/wesnoth/src/gui/widgets/window.cpp:547

24 0x0000000101213c08 in gui2::dialogs::modal_dialog::show(unsigned int) at /Users/vic/src/wesnoth/wesnoth/src/gui/dialogs/modal_dialog.cpp:89

25 0x0000000101124950 in do_gameloop(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::__1::allocator > > > const&) at /Users/vic/src/wesnoth/wesnoth/src/wesnoth.cpp:869

26 0x00000001011225fc in ::wesnoth_main(int, char **) at /Users/vic/src/wesnoth/wesnoth/src/wesnoth.cpp:1155

27 0x000000010111fdf8 in ::SDL_main(int, char **) at /Users/vic/src/wesnoth/wesnoth/projectfiles/Xcode-iOS/battleforwesnoth/battleforwesnoth/ios/SDLMain.mm:106