Open OPNA2608 opened 3 years ago
I don't see anything wrong with what you're doing. When you say "all subprojects" what do you mean exactly? The only subprojects FamiTracker or FamiPlayer need are libfamitracker.so and librtmidi.so.
Sorry for the vagueness. With this build script in mind, I considered NESICIDE, NES Emulator, FamiTracker and FamiPlayer as this repo's subprojects.
I only did the cd build/famitracker; qmake; make
one (+ make install
) instead of building all of those, that's what I meant.
Tried building FamiPlayer with CONFIG+=debug
instead, that one also crashes with a SIGABRT for me.
EnableHtmlHelp
SUPPORT_TRANSLATIONS
Figure out 64-bit version of these asserts...
QObject::connect: No such slot MainWindow::documentSaved()
QObject::connect: (receiver name: 'MainWindow')
CControlBar::SetBarStyle
double free or corruption (out)
Abit of free-form bisecting, not accounting for any changes in your deps download (just picking random commits & testing them):
free(): invalid pointer
like above68ea01712245d30d3272a7ea7681d07598e38657 ("Removing python IDE files.", commit before 71bda1f997c44529ac17d50c58c1526642d7293b):
EnableHtmlHelp
SUPPORT_TRANSLATIONS
Figure out 64-bit version of these asserts...
Segmentation fault (core dumped)
I'll see about trying this on a more common Linux distro like Ubuntu. Assuming this is generally supposed to be working, maybe the code just doesn't like something about my esoteric system.
This helps. I've pushed a fix relative to this breadcrumb:
(this=0x8accf0, pDC=
On Thu, Apr 1, 2021 at 8:17 AM Christoph Neidahl @.***> wrote:
Tried building FamiPlayer with CONFIG+=debug instead, that one also crashes with a SIGABRT for me.
EnableHtmlHelp SUPPORT_TRANSLATIONS Figure out 64-bit version of these asserts... QObject::connect: No such slot MainWindow::documentSaved() QObject::connect: (receiver name: 'MainWindow') CControlBar::SetBarStyle double free or corruption (out)
(debugger backtrace)
Thread 1 ".famiplayer-wra" received signal SIGABRT, Aborted. 0x00007ffff63f733a in raise () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6 (gdb) bt
0 0x00007ffff63f733a in raise () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
1 0x00007ffff63e1523 in abort () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
2 0x00007ffff6437958 in __libc_message () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
3 0x00007ffff643f12a in malloc_printerr () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
4 0x00007ffff6441170 in _int_free () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
5 0x00007ffff7cec432 in CBitmap::CreateCompatibleBitmap (this=0x8accf0, pDC=
, nWidth= , nHeight=8221712) at ../../common/cqtmfc.h:3301 6 0x0000000000726f10 in ?? ()
7 0x00007ffff7d717a2 in CDC::attach (this=0x8accf0, qtParent=
, mfcParent=0x71ce00, transparent= ) at ../../common/cqtmfc.cpp:3214 8 0x00000000008accf0 in ?? ()
9 0x00000000008accf0 in ?? ()
10 0x00000000006c9bf0 in ?? ()
11 0x00007fffffffd140 in ?? ()
12 0x00007ffff7d23df1 in CMainFrame::OnCreate(tagCREATESTRUCTA*) () at Source/MainFrm.cpp:328
13 0x00007ffff7d72482 in CWnd::CreateEx(unsigned int, char const, char const, unsigned int, tagRECT const&, CWnd, unsigned int, void) () at ../../common/cqtmfc.cpp:7992
14 0x00007ffff7d69cb9 in CFrameWnd::Create(char const, char const, unsigned int, tagRECT const&, CWnd, char const, unsigned int, CCreateContext*) () at ../../common/cqtmfc.cpp:8808
15 0x00007ffff7d20c4f in CMainFrame::Create @.=0x8accf0, @.=0x0, lpszWindowName=
, @.***=13565953, rect=..., ***@***.***=0x0, lpszMenuName=0x7c2518 "128", dwExStyle=0, pContext=0x7fffffffd3b0) at Source/MainFrm.cpp:310
16 0x00007ffff7d6a7fd in CFrameWnd::LoadFrame(unsigned int, unsigned int, CWnd, CCreateContext) () at ../../common/cqtmfc.cpp:8859
17 0x00007ffff7d6a902 in CDocTemplate::CreateNewFrame @.=0x756670, @.=0x8d2840, @.***=0x0) at ../../common/cqtmfc.cpp:11146
18 0x00007ffff7d6ac4e in CSingleDocTemplate::OpenDocumentFile (this=0x756670, lpszPathName=0x0, bAddToMRU=1, bMakeVisible=1) at ../../common/cqtmfc.cpp:11279
19 0x00007ffff7d5bf62 in CSingleDocTemplate::OpenDocumentFile (bMakeVisible=1, lpszPathName=0x0, this=
) at ../../common/cqtmfc.cpp:11226 20 CWinApp::OpenDocumentFile (this=0x7ffff7fc9e20
, lpszFileName=0x0) at ../../common/cqtmfc.cpp:11776 21 0x00007ffff7d5b2e3 in CWinApp::ProcessShellCommand @.***=0x7ffff7fc9e20
, rCmdInfo=...) at ../../common/cqtmfc.cpp:11553 22 0x00007ffff7dbdaaf in CFamiTrackerApp::InitInstance() () at Source/FamiTracker.cpp:238
23 0x0000000000413b51 in MainWindow::MainWindow(QWidget*) () at mainwindow.cpp:170
24 0x000000000040e8cc in main () at main.cpp:9
25 0x00007ffff63e2ded in __libc_start_main () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
26 0x000000000040e9aa in _start () at ../sysdeps/x86_64/start.S:120
Abit of free-form bisecting, not accounting for any changes in your deps download (just picking random commits & testing them):
- 71bda1f https://github.com/christopherpow/nesicide/commit/71bda1f997c44529ac17d50c58c1526642d7293b ("Fixes for toolbar impl. Updates to RC generator output."): free(): invalid pointer like above
68ea017 https://github.com/christopherpow/nesicide/commit/68ea01712245d30d3272a7ea7681d07598e38657 ("Removing python IDE files.", commit before 71bda1f https://github.com/christopherpow/nesicide/commit/71bda1f997c44529ac17d50c58c1526642d7293b):
EnableHtmlHelp SUPPORT_TRANSLATIONS Figure out 64-bit version of these asserts... Segmentation fault (core dumped)
(debugger output for completeness' sake)
Thread 1 ".famitracker-wr" received signal SIGSEGV, Segmentation fault. 0x00007ffff7d70214 in CMenu::AppendMenuA(unsigned int, unsigned long, char const*) () at ../../common/cqtmfc.cpp:11864 11864 { (gdb) bt
0 0x00007ffff7d70214 in CMenu::AppendMenuA(unsigned int, unsigned long, char const*) () at ../../common/cqtmfc.cpp:11864
1 0x00007ffff7d04a75 in qtMfcInitMenuResource_IDR_MAINFRAME(CMenu*) () at /nix/store/8l1rciizh6bdqilkfrgqb3sw1m84xh25-qtbase-5.12.10-dev/include/QtCore/qlist.h:115
2 0x00007ffff7d06be3 in qtMfcInitMenuResource(unsigned int, CMenu*) () at cqtmfc_famitracker.cpp:1085
3 0x00007ffff7d5e1c1 in CMenu::LoadMenuA (this=
, @.***=128) at ../../common/cqtmfc.cpp:11815 4 0x00007ffff7d6b266 in CFrameWnd::Create(char const, char const, unsigned int, tagRECT const&, CWnd, char const, unsigned int, CCreateContext*) () at ../../common/cqtmfc.cpp:8714
5 0x00007ffff7d2289f in CMainFrame::Create @.=0x6c1070, @.=0x0, lpszWindowName=
, @.***=13565953, rect=..., ***@***.***=0x0, lpszMenuName=0x6ed4a8 "128", dwExStyle=0, pContext=0x7fffffffd240) at Source/MainFrm.cpp:310
6 0x00007ffff7d6be6d in CFrameWnd::LoadFrame(unsigned int, unsigned int, CWnd, CCreateContext) () at ../../common/cqtmfc.cpp:8780
7 0x00007ffff7d6bf72 in CDocTemplate::CreateNewFrame @.=0x697fd0, @.=0x6b6490, @.***=0x0) at ../../common/cqtmfc.cpp:11004
8 0x00007ffff7d6c2be in CSingleDocTemplate::OpenDocumentFile (this=0x697fd0, lpszPathName=0x0, bAddToMRU=1, bMakeVisible=1) at ../../common/cqtmfc.cpp:11137
9 0x00007ffff7d5dfc2 in CSingleDocTemplate::OpenDocumentFile (bMakeVisible=1, lpszPathName=0x0, this=
) at ../../common/cqtmfc.cpp:11084 10 CWinApp::OpenDocumentFile (this=0x7ffff7fc9c80
, lpszFileName=0x0) at ../../common/cqtmfc.cpp:11634 11 0x00007ffff7d5d343 in CWinApp::ProcessShellCommand @.***=0x7ffff7fc9c80
, rCmdInfo=...) at ../../common/cqtmfc.cpp:11411 12 0x00007ffff7dbec5d in CFamiTrackerApp::InitInstance() () at Source/FamiTracker.cpp:238
13 0x000000000040507c in MainWindow::showEvent(QShowEvent*) () at mainwindow.cpp:87
14 0x00007ffff765c0fe in QWidget::event(QEvent*) () from /nix/store/wb5l04r6dgnajhw39v84y10ayiq13mqm-qtbase-5.12.10/lib/libQt5Widgets.so.5
15 0x00007ffff761ad92 in QApplicationPrivate::notify_helper(QObject, QEvent) () from /nix/store/wb5l04r6dgnajhw39v84y10ayiq13mqm-qtbase-5.12.10/lib/libQt5Widgets.so.5
16 0x00007ffff6c01292 in QCoreApplication::notifyInternal2(QObject, QEvent) () from /nix/store/wb5l04r6dgnajhw39v84y10ayiq13mqm-qtbase-5.12.10/lib/libQt5Core.so.5
17 0x00007ffff7658aa3 in QWidgetPrivate::show_helper() () from /nix/store/wb5l04r6dgnajhw39v84y10ayiq13mqm-qtbase-5.12.10/lib/libQt5Widgets.so.5
18 0x00007ffff765bc63 in QWidgetPrivate::setVisible(bool) () from /nix/store/wb5l04r6dgnajhw39v84y10ayiq13mqm-qtbase-5.12.10/lib/libQt5Widgets.so.5
19 0x000000000040484e in main () at main.cpp:11
20 0x00007ffff63e6ded in __libc_start_main () from /nix/store/90illc73xfs933d06daq6d41njs8yh66-glibc-2.32-37/lib/libc.so.6
21 0x000000000040490a in _start () at ../sysdeps/x86_64/start.S:120
I'll see about trying this on a more common Linux distro like Ubuntu. Assuming this is generally supposed to be working, maybe the code just doesn't like something about my esoteric system.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/christopherpow/nesicide/issues/75#issuecomment-811900806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQR4AY5FHHOU7IS56X6RLTGRW4ZANCNFSM4Z7DK74Q .
I tested the new commit, same errors and backtraces as before.
FWIW compiling & running on Ubuntu 18.04 (over the network) launches just fine.
I put a breakpoint in CMainFrame::CreateToolbars (this=0x786990) at Source/MainFrm.cpp:445
on my local build & the Ubuntu one and stepped through until they deviated/broke. There seems to be a call to CBitmap::Detach
that only happens on my local build? I'll test the Ubuntu build locally after the holidays, let me know if there's anything I could do to help you with debugging this situation.
Edit: The Ubuntu 18.04 machine has Qt 5.9.5, my local machine has 5.12.10. Copying the Ubuntu build's binary & libraries to my local machine and relinking everything against my system libraries makes it launch properly. Stepping through, it doesn't hit the detach code. I guess this is a problem with the build then and nothing that's weird at runtime?
I had a hunch and tested various versions of GCC. GCC 6 and GCC 7 produce binaries that launch fine, GCC 8 and higher seem to cause these launch failures. Ubuntu 18.04's default compiler is GCC 7.4 hence the builds worked fine there, my distro's default compiler is GCC 10.
Thanks for the investigation help! I'll have to take a closer look at the traces you sent. At a glance it seems there's something wrong with the waveform window's Y position.
After working around #73 with some dirty patching of the project files I've successfully built & installed the project in build/famitracker. Upon launching, it prints the following and aborts with
SIGABRT
:(Click for debugger backtrace)
``` Thread 1 ".famitracker-wr" received signal SIGABRT, Aborted. 0x00007ffff63fb33a in raise () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 (gdb) bt #0 0x00007ffff63fb33a in raise () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 #1 0x00007ffff63e5523 in abort () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 #2 0x00007ffff643b958 in __libc_message () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 #3 0x00007ffff644312a in malloc_printerr () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 #4 0x00007ffff6444c8c in _int_free () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 #5 0x00007ffff7cec432 in ?? () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #6 0x00000000008d7900 in ?? () #7 0x00007ffff7d717a2 in CDC::attach(QWidget*, CWnd*, bool) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #8 0x00000000007518f0 in ?? () #9 0x00000000007518f0 in ?? () #10 0x000000000077f890 in ?? () #11 0x00007fffffffceb0 in ?? () #12 0x00007ffff7d23df1 in CMainFrame::OnCreate(tagCREATESTRUCTA*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #13 0x00007ffff7d72482 in CWnd::CreateEx(unsigned int, char const*, char const*, unsigned int, tagRECT const&, CWnd*, unsigned int, void*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #14 0x00007ffff7d69cb9 in CFrameWnd::Create(char const*, char const*, unsigned int, tagRECT const&, CWnd*, char const*, unsigned int, CCreateContext*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #15 0x00007ffff7d20c4f in CMainFrame::Create(char const*, char const*, unsigned int, tagRECT const&, CWnd*, char const*, unsigned int, CCreateContext*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #16 0x00007ffff7d6a7fd in CFrameWnd::LoadFrame(unsigned int, unsigned int, CWnd*, CCreateContext*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #17 0x00007ffff7d6a902 in CDocTemplate::CreateNewFrame(CDocument*, CFrameWnd*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #18 0x00007ffff7d6ac4e in CSingleDocTemplate::OpenDocumentFile(char const*, int, int) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #19 0x00007ffff7d5bf62 in CWinApp::OpenDocumentFile(char const*) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #20 0x00007ffff7d5b2e3 in CWinApp::ProcessShellCommand(CCommandLineInfo&) () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #21 0x00007ffff7dbdaaf in CFamiTrackerApp::InitInstance() () from /nix/store/lxld9304wq6mz08i4m3ma2i4j1irv6xy-famitracker-unstable-2021-03-14/lib/libfamitracker.so.1 #22 0x000000000040607c in ?? () #23 0x00007ffff765c0fe in QWidget::event(QEvent*) () from /nix/store/f0v7b41vx6l7qv9s6f3jrqin7xjifw20-qtbase-5.12.10/lib/libQt5Widgets.so.5 #24 0x00007ffff761ad92 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /nix/store/f0v7b41vx6l7qv9s6f3jrqin7xjifw20-qtbase-5.12.10/lib/libQt5Widgets.so.5 #25 0x00007ffff6c01292 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /nix/store/f0v7b41vx6l7qv9s6f3jrqin7xjifw20-qtbase-5.12.10/lib/libQt5Core.so.5 #26 0x00007ffff7658aa3 in QWidgetPrivate::show_helper() () from /nix/store/f0v7b41vx6l7qv9s6f3jrqin7xjifw20-qtbase-5.12.10/lib/libQt5Widgets.so.5 #27 0x00007ffff765bc63 in QWidgetPrivate::setVisible(bool) () from /nix/store/f0v7b41vx6l7qv9s6f3jrqin7xjifw20-qtbase-5.12.10/lib/libQt5Widgets.so.5 #28 0x000000000040584e in ?? () #29 0x00007ffff63e6ded in __libc_start_main () from /nix/store/hp8wcylqr14hrrpqap4wdrwzq092wfln-glibc-2.32-37/lib/libc.so.6 ```I'm still messing around with this repository. As a test I ran only the following for now:
Please let me know if this is not a supported way of installing/running the application, e.g. if building & installing all subprojects is required for the binary to function.