Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault error #10

Closed
andirsun opened this issue Apr 17, 2024 · 3 comments · Fixed by #11
Closed

Segmentation fault error #10

andirsun opened this issue Apr 17, 2024 · 3 comments · Fixed by #11

Comments

@andirsun
Copy link
Contributor

I am following this guide to setup my flatpak manifest for my electron app. Documentation suggest to compile and install this app locally with:

$ flatpak-builder build org.flathub.electron-sample-app.yml --install --force-clean --user
$ flatpak run org.flathub.electron-sample-app

But After do that and run the app, it does not work, instead is throwing a Segmentation fault error.

❯ flatpak run org.flathub.electron-sample-app 
[3 zypak-helper] Wait found events, but sd-event found none
/app/bin/run.sh: line 2:     3 Segmentation fault      zypak-wrapper.sh /app/main/electron-sample-app "$@"

This is my machine

             .',;::::;,'.                andirsun@andirsun-macbook 
         .';:cccccccccccc:;,.            ------------------------- 
      .;cccccccccccccccccccccc;.         OS: Fedora Linux Asahi Remix 39 (Thirty Nine) aarch64 
    .:cccccccccccccccccccccccccc:.       Host: Apple MacBook Pro (16-inch, M1 Pro, 2021) 
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 6.6.3-414.asahi.fc39.aarch64+16k 
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 1 day, 13 hours, 28 mins 
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 2158 (rpm), 48 (flatpak) 
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: bash 5.2.26 
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 3456x2160 
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 45.5 
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter 
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Adwaita 
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: Adwaita [GTK2/3] 
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Icons: Adwaita [GTK2/3] 
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal: kgx 
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: (10) @ 2.064GHz 
:cccccccccccccccccccccccccccc:'.         Memory: 12197MiB / 15520MiB 
.:cccccccccccccccccccccc:;,..
  '::cccccccccccccc::;,.                                         
                                                                 

@andirsun andirsun changed the title Segmentation fault Segmentation fault error Apr 17, 2024
@andirsun
Copy link
Contributor Author

Just in case this is the log of the installation command:

flatpak-builder build org.flathub.electron-sample-app.yml --install --force-clean --user
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
The "sha1" source property is deprecated due to the weakness of SHA1 hashes.
Use the "sha256" property for the more secure SHA256 hash.
Emptying app dir 'build'
Downloading sources
Starting build of org.flathub.electron-sample-app
Cache miss, checking out last cache hit
========================================================================
Building module electron-sample-app in /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/build/electron-sample-app-1
========================================================================
Running: npm install --offline
npm info using npm@9.8.1
npm info using node@v18.18.1
npm info run electron@17.4.7 postinstall node_modules/electron node install.js
npm info run electron@17.4.7 postinstall { code: 0, signal: null }

added 289 packages, and audited 290 packages in 5s

28 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm info ok 
Running: . ../flatpak-node/electron-builder-arch-args.sh
npm run dist -- $ELECTRON_BUILDER_ARCH_ARGS  --linux --dir

npm info using npm@9.8.1
npm info using node@v18.18.1

> electron-sample-app@1.0.1 dist
> electron-builder --arm64 --linux --dir

  • electron-builder  version=23.0.3 os=6.6.3-414.asahi.fc39.aarch64+16k
  • writing effective config  file=dist/builder-effective-config.yaml
  • packaging       platform=linux arch=arm64 electron=17.4.7 appOutDir=dist/linux-arm64-unpacked
npm info ok 
Running: cp -a dist/linux*unpacked /app/main
Running: install -Dm755 -t /app/bin/ ../run.sh
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/chrome-sandbox
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/chrome-sandbox
[28] .debug_loc compressed -> .zdebug_loc (3966 => 834 21.03%)
[29] .debug_abbrev compressed -> .zdebug_abbrev (1211 => 502 41.45%)
[30] .debug_info compressed -> .zdebug_info (7281 => 3862 53.04%)
[31] .debug_ranges compressed -> .zdebug_ranges (1088 => 238 21.88%)
[32] .debug_str compressed -> .zdebug_str (3348 => 1566 46.77%)
[33] .debug_frame compressed -> .zdebug_frame (328 => 172 52.44%)
[34] .debug_line compressed -> .zdebug_line (3196 => 1710 53.50%)
[37] Updating section string table
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/chrome-sandbox to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/chrome-sandbox.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libffmpeg.so
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libffmpeg.so
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libffmpeg.so to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/libffmpeg.so.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/electron-sample-app
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/electron-sample-app
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/electron-sample-app to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/electron-sample-app.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/chrome_crashpad_handler
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/chrome_crashpad_handler
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/chrome_crashpad_handler to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/chrome_crashpad_handler.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libvk_swiftshader.so
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libvk_swiftshader.so
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libvk_swiftshader.so to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/libvk_swiftshader.so.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/swiftshader/libEGL.so
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/swiftshader/libEGL.so
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/swiftshader/libEGL.so to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/swiftshader/libEGL.so.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/swiftshader/libGLESv2.so
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/swiftshader/libGLESv2.so
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/swiftshader/libGLESv2.so to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/swiftshader/libGLESv2.so.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libvulkan.so.1
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libvulkan.so.1
[27] .debug_loc compressed -> .zdebug_loc (840944 => 93410 11.11%)
[28] .debug_abbrev compressed -> .zdebug_abbrev (59919 => 14033 23.42%)
[29] .debug_info compressed -> .zdebug_info (2185903 => 1061114 48.54%)
[30] .debug_ranges compressed -> .zdebug_ranges (188880 => 22570 11.95%)
[31] .debug_str compressed -> .zdebug_str (523545 => 83550 15.96%)
[32] .debug_line compressed -> .zdebug_line (325981 => 94618 29.03%)
[33] .debug_frame compressed -> .zdebug_frame (46632 => 5637 12.09%)
[36] Updating section string table
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libvulkan.so.1 to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/libvulkan.so.1.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libEGL.so
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libEGL.so
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libEGL.so to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/libEGL.so.debug
compressing debuginfo in: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libGLESv2.so
processing: /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libGLESv2.so
Nothing to do.
stripping /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/main/libGLESv2.so to /home/andirsun/projects/electron-sample-app/flatpak/.flatpak-builder/rofiles/rofiles-Jledvj/files/lib/debug/main/libGLESv2.so.debug
Committing stage build-electron-sample-app to cache
Cleaning up
Committing stage cleanup to cache
Finishing app
Please review the exported files and the metadata
Committing stage finish to cache
Exporting org.flathub.electron-sample-app to repo
Commit: d09751815351e6be5275530c512021ec39db905cd1dabbbc65094865be74d81a
Metadata Total: 357
Metadata Written: 1
Content Total: 277
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Exporting org.flathub.electron_sample_app.Debug to repo
Commit: 14176dfe5155305f5e2e2a24367203536d06713e609bc92b9b4386b6e816b319
Metadata Total: 11
Metadata Written: 1
Content Total: 11
Content Written: 0
Content Bytes Written: 0 (0 bytes)
Installing app/org.flathub.electron-sample-app/aarch64/master
Pruning cache

@cpba
Copy link
Collaborator

cpba commented Apr 19, 2024

@andirsun this smells like some kind of issue with electron's wayland support.

Have you tried running it on xwayland?

You could also try upping the electron version, it's been years since I last updated the tutorial sample, the bug may have been fixed upstream.

@andirsun
Copy link
Contributor Author

andirsun commented Apr 19, 2024

@cpba That's true I upgraded electron and the project is now running with npm run start

I open a PR to update the repo so is now working with latest version of electron and electron-builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants