Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on loading cart through OSD #4388

Closed
JoakimLarsson opened this issue Dec 10, 2018 · 4 comments
Closed

Segfault on loading cart through OSD #4388

JoakimLarsson opened this issue Dec 10, 2018 · 4 comments

Comments

@JoakimLarsson
Copy link
Contributor

JoakimLarsson commented Dec 10, 2018

I got a full build from Dec 10 and when I start it up without driver argument just -debug and -window, select the Vectrex driver, run it and then select my cart through the File Manager it immediately Segfaults. If I run it with the vectrex as argument and a -cart argument it works fine. When I run it by gdb it has a different behaviour and segfaults on exit instead. Once even gdb hung so I had to kill it with kill -KILL
It is on Linux 16.04 standard Ubuntu with Nvidia drivers. Here are two segfaults from when I exited gdb:

`Thread 1 "vectrexMame64" received signal SIGSEGV, Segmentation fault.
0x00007ffff4b84c28 in main_arena () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
(gdb) bt
#0 0x00007ffff4b84c28 in main_arena () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x0000000000799c7d in debug_view::set_visible_size(debug_view_xy) ()
#2 0x000000000050e701 in DebuggerView::paintEvent(QPaintEvent*) ()
#3 0x00007ffff676bfc8 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4 0x00007ffff686ab8e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5 0x00007ffff5e36172 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6 0x00007ffff672903c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7 0x00007ffff672e516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8 0x00007ffff5e3638b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007ffff6764ab9 in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff6765101 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff6736856 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff6736a8c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff6754c5f in QWidgetPrivate::syncBackingStore() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff676bdc8 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff6881dbb in QMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff672905c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff672e516 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff5e3638b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff5e38786 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff5e8c3c3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff08c0197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff08c03f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff08c049c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff5e8c7cf in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ffff5e3646a in QCoreApplication::processEvents(QFlagsQEventLoop::ProcessEventsFlag, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00000000005087b0 in debug_qt::debugger_update() ()
#27 0x00000000013f9141 in video_manager::frame_update(bool) ()
#28 0x0000000000521192 in mame_machine_manager::create_ui(running_machine&) ()
#29 0x00000000013648f7 in running_machine::start() ()
#30 0x0000000001365ea9 in running_machine::run(bool) ()
#31 0x0000000000523c84 in mame_machine_manager::execute() ()
#32 0x00000000005b504d in cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&) ()
#33 0x00000000005b53e8 in cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&) ()
#34 0x0000000000521b81 in emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&) ()
#35 0x000000000042b81f in main ()


Thread 1 "vectrexMame64" received signal SIGSEGV, Segmentation fault.
0x0000000000508c02 in debug_qt::init_debugger(running_machine&) ()
(gdb) bt
#0 0x0000000000508c02 in debug_qt::init_debugger(running_machine&) ()
#1 0x00000000007b8d8c in debugger_manager::debugger_manager(running_machine&) ()
#2 0x000000000136632f in running_machine::start() ()
#3 0x0000000001367919 in running_machine::run(bool) ()
#4 0x0000000000523d64 in mame_machine_manager::execute() ()
#5 0x00000000005b514d in cli_frontend::start_execution(mame_machine_manager*, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&) ()
#6 0x00000000005b54e8 in cli_frontend::execute(std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&) ()
#7 0x0000000000521c61 in emulator_info::start_frontend(emu_options&, osd_interface&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >&) ()
#8 0x000000000042b73f in main ()
(gdb)
[1]+ Stopped gdb --args ./vectrexMame64 -window -debug
`

@angelosa
Copy link
Member

angelosa commented Feb 4, 2021

Cannot repro with current 0.228 on Windows.
Does this still applies on Linux 16.04?

@JoakimLarsson
Copy link
Contributor Author

I have upgraded to Ubuntu 18.04 now so I can't test 16.04 anymore, I will try to get some cycles to build a full build on 18.04 some time soon though, I'll let you know the results

@firewave
Copy link
Contributor

I am not able to reproduce this with 0.249 on either Windows or Linux. Also no UBSAN/ASAN errors.

@cuavas
Copy link
Member

cuavas commented Nov 15, 2022

Another instance of #3006 or #9786, fixed by 76541e8.

@cuavas cuavas closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants