Issues with a frozen Python application

Marius Gedminas marius at gedmin.as
Wed Aug 11 06:22:26 UTC 2021


On Tue, Aug 10, 2021 at 09:07:13PM +0200, Flavio Calva wrote:
> On Tue, 10 Aug 2021 at 11:19, Alexander Larsson <alexl at redhat.com> wrote:
> > I would recommend running the built app under strace and look for
> > math.so in the logs to see where it tries to find the .so files.
> 
> Thank you very much for your answer!
> 
> Here is what I get when I launch the built application without 'flatpak run':
> 
> flavio at ci622:~/.local/share/flatpak/app/org.p3d.Asteroids/x86_64/master/active/files/bin>
> strace ./asteroids
> [...]
> stat("/home/flavio/.local/share/flatpak/app/org.p3d.Asteroids/x86_64/master/db72dc4349f7b827bc403d18c943572e1c0a3a74dea7533af722e664d28f8f6f/files/bin/math.so",
> {st_mode=S_IFREG|0755, st_size=71696, ...}) = 0
> [...]
> openat(AT_FDCWD,
> "/home/flavio/.local/share/flatpak/app/org.p3d.Asteroids/x86_64/master/db72dc4349f7b827bc403d18c943572e1c0a3a74dea7533af722e664d28f8f6f/files/bin/math.so",
> O_RDONLY|O_CLOEXEC) = 3
> [...]
> The application works: it correctly finds math.so.

And that's likely the problem.  Usually 'math' is a builtin Python module,
linked into the Python interpreter itself.  Here you have some other
'math.so' overriding it.  If your 'math.so' is not a Python extension
module, the import will fail.

What is this 'math.so' and why are you trying to override builtin Python
modules?

(In any case it doesn't seem to be a Flatpak-specific problem.)

Marius Gedminas
-- 
An algorithm must be seen to be believed.
                -- D.E. Knuth
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20210811/80aeecb8/attachment.sig>


More information about the Flatpak mailing list