BandageNG
BandageNG copied to clipboard
Question regarding command line options
Are any command line options supported? For example, to change defaults, etc. I tried --help
but got the following. I am on Ubuntu 20.04.
./BandageNG-3b69a79-x86_64.AppImage --help
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
Aborted (core dumped)
Smells like a problem with AppImage. Does it run properly w/o any cmdline options?
Yes, no problem running without options.
The original Bandage also had problems if any options were specified, even though there were several documented options. I filed an issue on that a long time ago on the original repository, but there was no action on it.
well, all unfixed bugs of https://github.com/rrwick/Bandage are inherited :)
There seems to be more to this than just inherited bugs. I can start both the "original" Bandage as well as BandageNG from the CLI, and I can also display the version numbers of both of them:
$ /Applications/Bandage.app/Contents/MacOS/Bandage --version
Version: 0.9.0
$ /Applications/BandageNG.app/Contents/MacOS/BandageNG --version
Version: 0.9.6-dev
But other options dont seem to work with BandageNG:
$ /Applications/Bandage.app/Contents/MacOS/Bandage --help
____ _
| _ \ | |
| |_) | __ _ _ __ __| | __ _ __ _ ___
| _ < / _` | '_ \ / _` |/ _` |/ _` |/ _ \
| |_) | (_| | | | | (_| | (_| | (_| | __/
|____/ \__,_|_| |_|\__,_|\__,_|\__, |\___|
__/ |
|___/
Version: 0.9.0
Usage: Bandage <command> [options]
Commands: <blank> Launch the Bandage GUI
load Launch the Bandage GUI and load a graph file
info Display information about a graph
image Generate an image file of a graph
querypaths Output graph paths for BLAST queries
reduce Save a subgraph of a larger graph
Options: --help View this help message
--helpall View all command line settings
--version View Bandage version number
Online Bandage help: https://github.com/rrwick/Bandage/wiki
$ /Applications/BandageNG.app/Contents/MacOS/BandageNG --help
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: cocoa.
zsh: abort /Applications/BandageNG.app/Contents/MacOS/BandageNG --help
or as another example:
$ /Applications/Bandage.app/Contents/MacOS/Bandage image assembly.gfa test.png --colour uniform
--> succesfully creates the image
$ /Applications/BandageNG.app/Contents/MacOS/BandageNG image assembly.gfa test.png --colour uniform
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: cocoa.
zsh: abort /Applications/BandageNG.app/Contents/MacOS/BandageNG image --colour uniform
EDIT: This behaviour is also present in the new release
$ /Applications/BandageNG.app/Contents/MacOS/BandageNG --version
Version: 2022.6-dev
$ /Applications/BandageNG.app/Contents/MacOS/BandageNG --help
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: cocoa.
zsh: abort /Applications/BandageNG.app/Contents/MacOS/BandageNG --help
@richardstoeckl What is the version of MacOS you're using?
I am using macOS Monterey Version 12.4 on a Intel based Macbook
Thanks! I'll try to check. Note that we're testing cmdline on Mac on every commit on GitHub, so cmdline interface certainly works... There must be something else :)
As I mentioned when originally opening this issue, I have the same problem on Ubuntu.
@richardstoeckl Thanks, I was able to reproduce the problem. It seems to be connected how we're building the final DMG image...
@paoloczi Does passing "-platform xcb" fix the problem for you?
I recently upgraded my laptop to Ubuntu 22.04, and I just tried again, using your latest release. If I run it without options I get this message, but then it starts, apparently without problems:
./BandageNG-2022.06-x86_64.AppImage
Warning: Ignoring WAYLAND_DISPLAY on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
However, I can load a graph without problem, but when I try to display it I get an Illegal instruction
trap. This is similar to what @rlorigro reported the other day, so it may be the same issue:
./BandageNG-2022.06-x86_64.AppImage
Warning: Ignoring WAYLAND_DISPLAY on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
Illegal instruction (core dumped)
If I set that environment variable as suggested by that message, I get:
./BandageNG-2022.06-x86_64.AppImage
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
Aborted (core dumped)
Running without the environment variable and with -platform xcb
gives:
./BandageNG-2022.06-x86_64.AppImage -platform xcb
Bandage-NG error: Invalid options: -platform, xcb
This is strange because if I invoke it with --help
I get:
./BandageNG-2022.06-x86_64.AppImage --help
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
Aborted (core dumped)
@paoloczi Consider using AppImage from https://github.com/asl/BandageNG/releases/tag/v2022.07.16 As for "minimal" platform – this is exactly inherited stuff ;) Looking into it
Here is what I get with the build you suggested.
Without options, it runs fine, I get the same message about WAYLAND_DISPLAY
, and it can display a graph without problem.
With -platform xcb
I get the following:
./BandageNG-f3ca6e0-x86_64.AppImage -platform xcb
Bandage-NG error: Invalid options: -platform, xcb
With --help
I get this:
./BandageNG-f3ca6e0-x86_64.AppImage --help
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
Aborted (core dumped)
So this is weird because it says that xcb is the only available plugin, but if you request it it tells you that it is invalid.
this is appimage problem apparently (separate one).
Does export QT_QPA_PLATFORM=xcb
work ?
This is what I get if I set that and I invoke it with --help
:
export QT_QPA_PLATFORM=xcb
./BandageNG-f3ca6e0-x86_64.AppImage --help
qt.qpa.plugin: Could not find the Qt platform plugin "minimal" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
Aborted (core dumped)
aha, ok. AppImage isolates env variables.
So, we're having complete mess here:
- If we're running headless (e.g. on server w/o X or Wayland) then we need to ensure we are using headless Qt platform integration plugin (
minimal
/offscreen
). - However some features related to text / image rendering are only available with full GUI platform. We cannot run them headless at all.
- Deployment tools seem to explicitly ignore
minimal
Qt platform plugin. So we're missing it inDMG
/AppImage
and therefore these images require complete GUI, which might be unavailable
Just to clarify - I was running that locally from my Ubuntu 22.04 laptop, with a Gnome environment running on top of Wayland.
Ok, here is full explanation: Qt has a dedicated platform abstraction layer in order to implement GUI primitives. For example, one could even instead of drawing everything on screen, run a kind of lightweight VNC server and connect from outside creating "remote monitor". The latter is a typical thing for e.g. embedded applications.
For CLI applications running on headless servers there are special platform plugins: minimal
and offscreen
. Currently Bandage force switches to a minimal
platform plugin if only CLI features are desired (e.g. --help
).
Now the key details: we are making a self-contained images: AppImage on Linux and app bundle on MacOS X. The tools we're using for this bundling copies only native platform plugin into a target image: xcb
on Linux and cocoa
on Mac. As a result, switching to minimal
plugin does not work hence the error message.
The solution is simple on Mac platform as it cannot be headless: simply switch off such switching. This is what #100 implements and it should resolve #99 as a result (@richardstoeckl so your issue will be fixed). Unfortunately it will not work on Linux as xcb
(default) platform plugin cannot initialize itself on a headless system. But we do not have other platform abstraction layer plugins because they were not bundled. I filled an issue about this (https://github.com/linuxdeploy/linuxdeploy-plugin-qt/issues/117) – hopefully it will be resolved. I will try to figure out whether there is a way to rewrite current Bandage code to gracefully switch to default platform plugin in case if the system is not headless (like in @paoloczi case).
I submitted a fix for the bundling issue into upstream project (https://github.com/linuxdeploy/linuxdeploy-plugin-qt/pull/118). Hopefully it will be merged before our release so we can close this issue ;)
@paoloczi Unfortunately it is still not merged, so we will need to proceed to the next Bandage-NG release without the fix :(
@paoloczi Finally this was merged: https://github.com/linuxdeploy/linuxdeploy-plugin-qt/pull/118, so likely the issue will be fully resolved with Bandage 2022.08
@paoloczi Will you please check if https://github.com/asl/BandageNG/releases/tag/v2022.08 works for you now?
This works partially. I can now run it with --help
or --helpall
to get help information and a list of options, and it no longer crashes.
However, it looks like it is not honoring the options that I specify. For example, I tried invoking it with --minnodlen 88
. But when I checked the Settings
menu, the Minimum node length
value was still the default 5.
@paoloczi Oh, the cmdline interface requires lots of care.... it's broken in many places and not quite complete. But this is a separate issue – #50
@paoloczi I just double checked and it seems that --minnodlen 88
case is working now (after https://github.com/asl/BandageNG/pull/128)
Thank you! Can you remind me how I can get a current pre-built executable? The README
says "Pre-built Linux and Mac binaries are available from Releases page", but the latest release is from last October. I know you have pre-built binaries somewhere else. Perhaps change that comment in the README
with instructions on how to get to a current build outside of the release builds? I checked GitHub Actions and there are builds but no downloadable artifacts.
@paoloshasta The snapshots are posted at https://github.com/asl/BandageNG/releases as "pre-releases". As soon as they are built which takes some time.
Thanks - I will check your fix as soon as that becomes available.
@paoloshasta It was just built: https://github.com/asl/BandageNG/releases/tag/continuous
Nice, the options work now!