5

I have an app provided by my college as part of a course and when I run it on Ubuntu 22.04 it crashes with a segmentation fault. However if I run it on 18.04 LTS and 20.04 LTS it works fine. I have tried running it from a 22.04 LTS Live CD and it crashes in the same way as on my laptop, so I don't think this is a problem with my installation. It is definitely related to the Ubuntu version.

I don't have access to the source code so I cannot recompile it or even dive into the source to see what might be causing it. Is there some way I can run this in a "20.04 compatibility mode"? Such a thing exists on Windows but I don't know if anything like it is available on Ubuntu.

I don't have any details for the seg fault as the app traps the fault and displays a generic error, but even if I had more details it would not help me as the college are not distributing the source.

5
  • 3
    I don't think so.. You should probably try to run this particular application in an Ubuntu 20.04 virtual machine instead. Mar 8, 2023 at 10:35
  • I belive it should be possible to create a SNAP containing the application that runs it in a Ubuntu 20.04 environment, but I'm not sure if the details. Mar 8, 2023 at 19:20
  • 1
    This is probably related to 22.04 using newer library version, maybe even the application blindly trying to load a library which is not available and not handling the error. You could run it under gdb to see where it is crashing.
    – Ángel
    Mar 8, 2023 at 20:18
  • Maybe using something like valgrind might help you find why the software is crashing (but this should be done by whoever wrote the software). In the mean time you can use a VM. Note: the crash is either a library problem or the kernel itself that is incompatible. In the former case instead of a VM you could also use a docker container (but if this is a GUI application it's probably easier to just use a full VM), in the latter case docker won't help since containers share the host kernel.
    – Bakuriu
    Mar 8, 2023 at 21:13
  • Running it in a container's fairly easy, and would be educational if its a kernel issue. LXC does full VMs and containers and might be a good option here. Mar 9, 2023 at 5:21

1 Answer 1

7

A segmentation fault is a memory management error. It's a bug in the software that has merely been exposed by a newer release of Ubuntu. Since you don't have access to the source code, you cannot fix it.

  1. Report the issue to whomever gave you the software. Bugs should be reported! Reported bugs generally get fixed sooner.

  2. As a workaround, you can install an older release of Ubuntu, either directly onto your laptop or into a virtual environment (like a Virtual Machine). Ubuntu 22.04 has several great VM applications in the repositories -- you have several choices listed in the Ubuntu Software application.

    Or you can simply use the "Try Ubuntu" environment of an earlier LiveUSB.

1
  • Thanks. Since the app works in a 20.04 Live C\D I can probably get by using that. Mar 8, 2023 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .