Xojo App Crashes when trying to play a sound file

This works on my other targets including Linux, but when I try to issue a command such as mysoundfile.play the app exits without any error.

Anyone seen this?

can you show the code ?
i can think of maybe a missing library?

As mentioned, it works with Windows, MacOS and Linux. So I’m not thinking it’s a a missing any libraries. If it is, I think it’s safe to blame Xojo for that since it determines what libraries are used during the build process.

As far as code, there’s really not a lot to see. It crashes on the line playing the sound. When I comment that line out, it doesn’t crash.

So also as mentioned before, the line mysoundfile.play is where it crashes. The file is in the project and it’s an MP3 which should be supported by the Raspberry Pi.

Edit: I just check again and it works on my Raspberry Pi 3s and 4. The issue seems to be isolated to the Pi5. I’ve installed all the latest updates on the Pi 5. It’s very reproducible. Just create a basic project, add an MP3 file, put the soundname.play in a button or something, and run it on the Raspberry Pi. It fails every time the play is issued.

Reading Xojos system requirements shows they currently support Pi 2 - 4. So no need to blame Xojo.


1 Like

Thanks for the info. That must be the reason. Hopefully, support for the Pi5 happens soon. :slight_smile:

Have you tried running the app from the command line and seeing if the crash causes the missing library to appear on the console?

I suspect that’s a typo. IIRC Pi5 is not substantially different.

You are very mistaken. Most, if not all, programming languages assume you have the libraries installed. None of them include libraries as a matter of course.

1 Like


I think we are talking about two different things. I realize that each OS has libraries it comes with and those installed by various installed software. What I’m talking about is what is created by Xojo during the build process that is copied over with the Xojo built application on the target OS.

See screenshot. My assumption was that these were the libraries that DerkJ was referring to. If these were missing or had an issue, I’d think it would be a Xojo issue.

I’m just trying to understand why it works on all my Pi’s except for the 5. Martin pointed out that Xojo is only supporting up to pi 4 at this point, so that makes sense. That being the case, the issue is that it’s not currently supported, not that I’m doing something wrong or that there are missing or corrupt libraries or files. I’ll just need to wait for the pi5 to be supported for certain features. So far, my apps seem to be working otherwise.

No, the libraries that they are talking about are the OS libraries.

My guess is that your Pi 5 is running a different OS version than your Pi 4/3. Sometimes they remove OS libraries or change the version. If Xojo needs an OS library that is not there or maybe the version is different (not supported), then it can cause problems.

Can you do this?

do not assume…:wink:

i meant the libraries the system uses, most likely they are referred to in the docs.
Before coming to the forum i guess it won’t hurt to read the full docs page ?


under “Notes”

The Pi 5 does use a newer version of the OS, so this may be what’s going on.

I have tried running it from a terminal and it does not show any errors, it just instantly exits.

That probably means it’s not a missing library. Go to the /var/libs folder and do this:

tail -f kern.log

And then launch your app and make it crash.

Then in the terminal, hit ctrl-c to stop the log.

In the text that was printed, search for the name of your app and show us the line(s)

Hi Greg,

I appreciate your suggestion. Please understand I’m not a Linux expert so I followed your suggestion exactly. It does not like the tail command. I got this error

tail: cannot open ‘kern.log’ for reading: No such file or directory
tail: no files remaining

I’m not sure if this info helps understand what’s going on, but I get this error when I run the app in terminal.

ERROR:…/gst/playback/gstplaysink.c:1478:try_element: assertion failed: (!element_bus)
Bail out! ERROR:…/gst/playback/gstplaysink.c:1478:try_element: assertion failed: (!element_bus)