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

Crash on loading saved Audacity project #2216

Closed
imciner2 opened this issue Dec 2, 2021 · 6 comments · Fixed by #2227
Closed

Crash on loading saved Audacity project #2216

imciner2 opened this issue Dec 2, 2021 · 6 comments · Fixed by #2227
Assignees
Labels
community build bugs Bug in non-official builds, such as distro-repos or self-compiled ones crash / freeze catastrophic errors P1 Highest level priority (ship blocker / must fix)

Comments

@imciner2
Copy link
Contributor

imciner2 commented Dec 2, 2021

Describe the bug

I am getting a reliable crash on loading a saved .aup3 project on my current testing build of an Audacity RPM.

Here is what I am doing:

  1. Start Audacity
  2. Record a small file
  3. Save it
  4. Close Audacity
  5. Reopen Audacity
  6. Open the saved file
  7. See it crash

Here is the backtrace for when it crashed:

audacity: /home/imcinerney/dev/fedora/audacity/audacity/Audacity-3.1.2-Source/libraries/lib-xml/XMLWriter.cpp:472: void XMLUtf8BufferWriter::WriteAttr(const string_view&, const string_view&): Assertion `mInTag' failed.

Thread 1 "audacity" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
44	      return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007ffff5e908c3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff5e436b6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff5e2d7d3 in __GI_abort () at abort.c:79
#4  0x00007ffff5e2d6fb in __assert_fail_base (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:92
#5  0x00007ffff5e3c3a6 in __GI___assert_fail (assertion=0x7ffff7d7fc8b "mInTag", file=0x7ffff7d7fdc8 "/home/imcinerney/dev/fedora/audacity/audacity/Audacity-3.1.2-Source/libraries/lib-xml/XMLWriter.cpp", line=472, function=0x7ffff7d7fd78 "void XMLUtf8BufferWriter::WriteAttr(const string_view&, const string_view&)")
    at assert.c:101
#6  0x00007ffff7d7a650 in XMLUtf8BufferWriter::WriteAttr(std::basic_string_view<char, std::char_traits<char> > const&, std::basic_string_view<char, std::char_traits<char> > const&) (this=this@entry=0x7fffffffbd00, name="snapto", value="off")
    at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/libraries/lib-xml/XMLWriter.cpp:472
#7  0x0000555555be38d6 in ProjectSerializer::Decode(wxMemoryBuffer const&) (buffer=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/ProjectSerializer.cpp:490
#8  0x0000555555bbf560 in ProjectFileIO::LoadProject(wxString const&, bool) (this=0x555556e1cf40, fileName=..., ignoreAutosave=false) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/ProjectFileIO.cpp:2023
#9  0x0000555555bcb4ab in ProjectFileManager::ReadProjectFile(wxString const&, bool) (this=0x555556e3e930, fileName=..., discardAutosave=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/ProjectFileManager.cpp:160
#10 0x0000555555bcc9bb in ProjectFileManager::OpenProjectFile(wxString const&, bool) (this=0x555556e3e930, fileName=..., addtohistory=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/ProjectFileManager.cpp:1000
#11 0x0000555555bcd9c0 in ProjectFileManager::OpenFile(std::function<AudacityProject& (bool)> const&, wxString const&, bool) (chooser=..., fileNameArg=<optimized out>, addtohistory=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/ProjectFileManager.cpp:987
#12 0x0000555555bd98d3 in ProjectManager::OpenProject(AudacityProject*, wxString const&, bool, bool) (pGivenProject=<optimized out>, fileNameArg=<optimized out>, addtohistory=<optimized out>, reuseNonemptyProject=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/ProjectManager.cpp:954
#13 0x0000555555acfe21 in AudacityApp::MRUOpen(wxString const&) (this=<optimized out>, fullPathStr=...) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/AudacityApp.cpp:892
#14 0x0000555555ad011b in AudacityApp::OnMRUFile(wxCommandEvent&) (this=0x55555678b210, event=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/AudacityApp.cpp:933
#15 0x00007ffff7c3ba66 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (entry=<optimized out>, entry=<optimized out>, event=..., handler=0x55555678b210) at ../src/common/event.cpp:1418
#16 wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (entry=<optimized out>, handler=handler@entry=0x55555678b210, event=...) at ../src/common/event.cpp:1393
#17 0x00007ffff7c3c0cb in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (this=<optimized out>, event=..., self=self@entry=0x55555678b210) at ../src/common/event.cpp:1026
#18 0x00007ffff7c3d71d in wxEvtHandler::TryHereOnly(wxEvent&) (event=..., this=0x55555678b210) at ../src/common/event.cpp:1615
#19 wxEvtHandler::TryHereOnly(wxEvent&) (this=this@entry=0x55555678b210, event=...) at ../src/common/event.cpp:1604
#20 0x00007ffff7c3d79f in wxEvtHandler::TryBeforeAndHere(wxEvent&) (event=..., this=0x55555678b210) at ../include/wx/event.h:3973
#21 wxEvtHandler::TryBeforeAndHere(wxEvent&) (event=..., this=0x55555678b210) at ../include/wx/event.h:3973
#22 wxEvtHandler::ProcessEventLocally(wxEvent&) (this=0x55555678b210, event=...) at ../src/common/event.cpp:1548
#23 0x00007ffff7c3d8b9 in wxEvtHandler::ProcessEvent(wxEvent&) (this=0x55555678b210, event=...) at ../src/common/event.cpp:1521
#24 0x00007ffff77afc8e in wxWindowBase::TryAfter(wxEvent&) (this=0x55555700ed20, event=...) at ../include/wx/window.h:862
#25 0x00007ffff7c3fcab in wxEvtHandler::SafelyProcessEvent(wxEvent&) (this=<optimized out>, event=<optimized out>) at ../src/common/event.cpp:1639
#26 0x00007ffff7765650 in wxMenuBase::DoProcessEvent(wxMenuBase*, wxEvent&, wxWindow*) (menu=0x0, event=..., win=0x555556e1fe60) at ../src/common/menucmn.cpp:683
#27 0x00007ffff776575c in wxMenuBase::SendEvent(int, int) (this=0x555556fd9350, itemid=<optimized out>, checked=-1) at ../src/common/menucmn.cpp:646
#28 0x00007ffff7658934 in menuitem_activate (item=0x5555568801c0) at ../src/gtk/menu.cpp:542
#29 menuitem_activate(GtkWidget*, wxMenuItem*) (item=0x5555568801c0) at ../src/gtk/menu.cpp:508
#33 0x00007ffff63b0b23 in <emit signal ??? on instance ???> (instance=instance@entry=0x55555708f6a0, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3553
    #30 0x00007ffff6392c2f in g_closure_invoke (closure=0x55555742c2a0, return_value=0x0, n_param_values=1, param_values=0x7fffffffcfe0, invocation_hint=0x7fffffffcf60) at ../gobject/gclosure.c:830
    #31 0x00007ffff63af046 in signal_emit_unlocked_R (node=node@entry=0x55555682d890, detail=detail@entry=0, instance=instance@entry=0x55555708f6a0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcfe0) at ../gobject/gsignal.c:3742
    #32 0x00007ffff63b090a in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffd190) at ../gobject/gsignal.c:3497
#34 0x00007ffff68ae85c in gtk_widget_activate (widget=0x55555708f6a0) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkwidget.c:7841
#35 0x00007ffff6778f7e in gtk_menu_shell_activate_item (menu_shell=0x5555572ac590, menu_item=0x55555708f6a0, force_deactivate=<optimized out>) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmenushell.c:1375
#36 0x00007ffff6779253 in gtk_menu_shell_button_release (widget=0x5555572ac590, event=<optimized out>) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmenushell.c:791
#37 0x00007ffff68fe208 in _gtk_marshal_BOOLEAN__BOXEDv (closure=0x555556818000, return_value=0x7fffffffd460, instance=<optimized out>, args=<optimized out>, marshal_data=<optimized out>, n_params=<optimized out>, param_types=0x555556818030) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmarshalers.c:129
#38 0x00007ffff63b09da in _g_closure_invoke_va (param_types=0x555556818030, n_params=<optimized out>, args=0x7fffffffd510, instance=0x5555572ac590, return_value=0x7fffffffd460, closure=0x555556818000) at ../gobject/gclosure.c:893
#39 g_signal_emit_valist (instance=0x5555572ac590, signal_id=<optimized out>, detail=0, var_args=var_args@entry=0x7fffffffd510) at ../gobject/gsignal.c:3406
#40 0x00007ffff63b0b23 in g_signal_emit (instance=instance@entry=0x5555572ac590, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3553
#41 0x00007ffff68c19f4 in gtk_widget_event_internal.part.0.lto_priv.0 (widget=0x5555572ac590, event=0x5555567dfbc0) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkwidget.c:7808
#42 0x00007ffff67644d0 in propagate_event_up (topmost=<optimized out>, event=<optimized out>, widget=0x5555572ac590) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmain.c:2588
#43 propagate_event (widget=widget@entry=0x55555708f6a0, event=event@entry=0x5555567dfbc0, captured=captured@entry=0, topmost=topmost@entry=0x0) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmain.c:2691
#44 0x00007ffff6764603 in gtk_propagate_event (widget=widget@entry=0x55555708f6a0, event=event@entry=0x5555567dfbc0) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmain.c:2725
#45 0x00007ffff676539a in gtk_main_do_event (event=<optimized out>) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmain.c:1921
#46 gtk_main_do_event (event=<optimized out>) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmain.c:1691
#47 0x00007ffff64457d3 in _gdk_event_emit (event=0x5555567dfbc0) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gdk/gdkevents.c:73
#48 _gdk_event_emit (event=0x5555567dfbc0) at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gdk/gdkevents.c:67
#49 0x00007ffff647cc16 in gdk_event_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at x11/gdkeventsource.c:367
#50 0x00007ffff629933f in g_main_dispatch (context=0x5555567ccf50) at ../glib/gmain.c:3381
#51 g_main_context_dispatch (context=0x5555567ccf50) at ../glib/gmain.c:4099
#52 0x00007ffff62ee2b8 in g_main_context_iterate.constprop.0 (context=0x5555567ccf50, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#53 0x00007ffff6298903 in g_main_loop_run (loop=0x555556793360) at ../glib/gmain.c:4373
#54 0x00007ffff675b62d in gtk_main () at /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkmain.c:1329
#55 0x00007ffff75d9045 in wxGUIEventLoop::DoRun() (this=0x555556855b20) at ../src/gtk/evtloop.cpp:61
#56 0x00007ffff7b54c51 in wxEventLoopBase::Run() (this=0x555556855b20) at ../src/common/evtloopcmn.cpp:87
#57 0x00007ffff7b309da in wxAppConsoleBase::MainLoop() (this=0x55555678b210) at ../src/common/appbase.cpp:377
#58 0x0000555555ad01ed in AudacityApp::OnRun() (this=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/AudacityApp.cpp:1656
#59 0x00007ffff7b8f97e in wxEntry(int&, wchar_t**) (argc=<optimized out>, argv=<optimized out>) at ../src/common/init.cpp:504
#60 0x0000555555a3f7b6 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/audacity-3.1.2-1.fc35.x86_64/src/AudacityApp.cpp:790

To Reproduce

I have attached two test files in the zip that both crash for me. I had originally thought this may have been an issue with using the system sqlite on Fedora, but I also tried using a local copy and it still crashed for me. The files saved with each sqlite are in the zip.

Expected behavior
No crash and the file loads.

Additional information (please complete the following information):

  • OS: Fedora 35
  • Version Audacity 3.1.2
  • (if relevant) Sound Device [e.g. Windows WASAPI, USB Sound card]

Additional context

Here are two test files:
TestFiles.zip

I am building the program using the flags:

    -DwxWidgets_CONFIG_EXECUTABLE="$(which wx-config-3.1)" \
    -DAUDACITY_BUILD_LEVEL:STRING=2 \
    -Daudacity_conan_enabled=Off \
    -Daudacity_has_networking=Off \
    -Daudacity_has_crashreports=Off \
    -Daudacity_has_updates_check=Off \
    -Daudacity_has_sentry_reporting=Off \
    -Daudacity_lib_preference=system \
    -Daudacity_obey_system_dependencies=On \
    -Daudacity_use_wxwidgets=system \
    -Daudacity_use_uuid=system \
    -Daudacity_use_sqlite=local \
    -Daudacity_use_libsndfile=system \
    -Daudacity_use_soxr=system \
    -Daudacity_use_lame=system \
    -Daudacity_use_twolame=system \
    -Daudacity_use_libflac=system \
    -Daudacity_use_ladspa=on \
    -Daudacity_use_libvorbis=system \
    -Daudacity_use_libid3tag=system \
    -Daudacity_use_expat=system \
    -Daudacity_use_soundtouch=system \
    -Daudacity_use_vamp=system \
    -Daudacity_use_lv2=system \
    -Daudacity_use_portaudio=system \
    -Daudacity_use_midi=system \
    -Daudacity_use_libogg=system \
    -Daudacity_use_ffmpeg=off \
    -Daudacity_use_portsmf=local \
    -Daudacity_use_sbsms=local \

(and another time with -Daudacity_use_sqlite=system instead)

@LWinterberg LWinterberg added community build bugs Bug in non-official builds, such as distro-repos or self-compiled ones crash / freeze catastrophic errors labels Dec 2, 2021
@petersampsonaudacity
Copy link

Your two test AUP3 files open fine for me on W10 with 3.1.2

image

@AnitaBats AnitaBats added this to the Audacity 3.1.3 milestone Dec 2, 2021
@AnitaBats AnitaBats added this to To do in Sprint 10 - Enhancements&Bug fixes via automation Dec 2, 2021
@Penikov Penikov added the P1 Highest level priority (ship blocker / must fix) label Dec 3, 2021
@imciner2
Copy link
Contributor Author

imciner2 commented Dec 3, 2021

Hmm, interesting. I'll have to see if I can dig into what is happening with this build then. It was happening pretty reliably for me on my RPM builds.

@petersampsonaudacity are you running a debug build? This appears to be from an assert that would be removed in release builds.

@crsib
Copy link
Contributor

crsib commented Dec 3, 2021

This does happen with assertions enabled with the files you provided. I hope I will be able to investigate today

@crsib
Copy link
Contributor

crsib commented Dec 3, 2021

And just to clarify - other projects open fine for me :-)

@petersampsonaudacity
Copy link

@petersampsonaudacity are you running a debug build? This appears to be from an assert that would be removed in release builds.

@imciner2 No, this was the pukka 3.1.2 W10 64-bit build as released.

Peter

@crsib
Copy link
Contributor

crsib commented Dec 3, 2021

We have identified an issue, Paul is working on the fix

@Paul-Licameli Paul-Licameli moved this from To do to Reviewer approved in Sprint 9 - 3.2 release needed R&D Dec 6, 2021
@Paul-Licameli Paul-Licameli moved this from Reviewer approved to Ready for QA in Sprint 9 - 3.2 release needed R&D Dec 6, 2021
@Penikov Penikov moved this from Ready for QA to In QA in Sprint 9 - 3.2 release needed R&D Dec 6, 2021
@Penikov Penikov moved this from In QA to Done in Sprint 9 - 3.2 release needed R&D Dec 7, 2021
@AnitaBats AnitaBats moved this from To do to Ready for QA in Sprint 10 - Enhancements&Bug fixes Dec 7, 2021
@LWinterberg LWinterberg moved this from Ready for QA to Done in Sprint 10 - Enhancements&Bug fixes Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community build bugs Bug in non-official builds, such as distro-repos or self-compiled ones crash / freeze catastrophic errors P1 Highest level priority (ship blocker / must fix)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

7 participants