Waveform stuck (not moving) when audio is played or edited

Using Audacity 2.3.3 on Pop!_OS 20.04, the waveform in the audio track viewer has stopped working.

Playback and edits(*) are okay, but the audio track doesn’t get updated properly to reflect the edits, highlights, zoom in/out, or scrub audio, whether by mouse or keyboard.

I believe it started when I had to hard power-off my laptop when it froze.

Upon restarting after that power-cycle, Audacity offered to clean up orphaned files which it said were “small and unrelated to the current project” or something to that effect.

*edits = I can record audio and can (cut highlighted audio via scissors button)

To troubleshoot, I have

  1. uninstalled Audacity 2.3.3
  2. removed my data folder via rm -rf .audacity-data/
  3. reinstalled Audacity 2.3.3
  4. uninstalled Audacity 2.3.3
  5. removed my data folder via rm -rf .audacity-data/
  6. installed Audacity 2.4.2.

I installed each version as a .deb file from Pop!_OS Pop Shop. (I have not tried installing either of them as a flatpack, which I might try after posting this.)

In the screenshots, notice different zoom levels, but the audio track is unchanged.
2021_jan_09_audacity_2.4.2_waveform_zoom_in.png
2021_jan_09_audacity_2.4.2_waveform_zoom_out.png

EDIT: I misunderstood the Pop Shop GUI. I actually DID install using flatpacks.

Since my post, I found user monteverdi had the same problem. Timeline only renders when resizing window - #19 by chrisisbd

I removed ~/.audacity-data but it did not help.

This fixed it for me

GTK_IM_MODULE=audacity

Is it a real fix? What caused the problem to suddenly occur?

I don’t fully understand this issue, but there’s some information here: Bug #1876212 “audacity (with libwxgtk3.0-gtk3) doesn't draw with...” : Bugs : wxwidgets3.0 package : Ubuntu

Sorry about this, but I spoke to soon before; it is still not fixed even with GTK_IM_MODULE=audacity

I also tried installing via sudo apt install audacity but it had the same issue.

I will read the link you sent, hoping it has some hints.

In the link you posted, this was a suggestion:

edit the ~/.local/share/applications/audacity.desktop file to use the line:-

Exec=bash -c “GTK_IM_MODULE=; audacity %F”

On my Ubuntu-like machine, I created an alias:

aud="GTK_IM_MODULE=; audacity"

and on first glance, Audacity appears to be working when run via that alias from command line.

i.e. my solution seems to be set GTK_IM_MODULE to have no value before running Audacity.

Thank you very much for your help.