Error at Launch on Raspberry Pi 4

Hi,
First off, this problem is more of an annoying repeated error message than an issue. I’m no Linux expert by any stretch (let’s get that out of the way), I’m tinkering with my Raspberry Pi to have a self-contained recorder for jam sessions. I’m using Audacity 2.4.2 on my Raspberry Pi 4 4Gb running Raspbian GNU/Linux 11. Audacity was installed using PiPackages 0.1.0, if that is of any relevance.

At every launch of Audacity, I get the following error message: “An assertion failed! .'/src/AudioIO.cpp(973): assert “false” failed in AudioIO()
The backtrace gives only the following:

ASSERT INFO:
./src/AudioIO.cpp(973): assert "false" failed in AudioIO().

BACKTRACE:
[1] AudioIO::AudioIO()
[2] AudioIO::Init()
[3] AudacityApp::OnInit()
[4] wxEntry(int&, wchar_t**)
[5] main
[6] __libc_start_main

It doesn’t affect functionality, I record input from a USB audio capture device using ALSA drivers.

The annoying part is that I uncheck “Show this dialog the next time”, but the message still reappears at launch. I’ve even run the program from command line as sudo, unchecked the box and clicked Continue, but the error still appeared the next time.

Thanks,
Alfie

Disclaimer:
We don’t officially support Raspberry Pi (though reports indicate that it can work), and Audacity 2.4.2 is now obsolete (but probably the best option for running on a Pi).


From the code: https://github.com/audacity/audacity/blob/16d52f63a4183bba77ef7305d14622958dc0d1d5/src/AudioIO.cpp

   // This ASSERT because of casting in the callback 
   // functions where we cast a tempFloats buffer to a (short*) buffer.
   // We have to ASSERT in the GUI thread, if we are to see it properly.
   wxASSERT( sizeof( short ) <= sizeof( float ));

So it would appear that on a Raspberry Pi, a “short” is larger than a “float”.
I don’t know if that will have any bad effects, but it is not what Audacity is expecting.
If Audacity is working OK, you can silence the warning by commenting out that line, like this:

   // This ASSERT because of casting in the callback 
   // functions where we cast a tempFloats buffer to a (short*) buffer.
   // We have to ASSERT in the GUI thread, if we are to see it properly.
   // wxASSERT( sizeof( short ) <= sizeof( float ));

then build Audacity.