Package Details: plug 1.4.5-1

Git Clone URL: https://aur.archlinux.org/plug.git (read-only, click to copy)
Package Base: plug
Description: Software for the Fender Mustang series of guitar amplifiers.
Upstream URL: https://github.com/offa/plug
Licenses: GPL3
Submitter: lmartinez-mirror
Maintainer: callmemagnus
Last Packager: callmemagnus
Votes: 2
Popularity: 0.022677
First Submitted: 2021-10-12 05:41 (UTC)
Last Updated: 2024-02-25 21:17 (UTC)

Dependencies (4)

Required by (0)

Sources (1)

Latest Comments

AurGlass commented on 2025-02-06 23:01 (UTC)

Hi, I experienced some problems with this package, so I wanted to mention them here.

  1. The app failed to run when selecting the "Plug" entry in my application menu.
  2. When plugging in the amplifier, connection failed due to lack of permission.

After examining the PKGBUILD and looking through the github history, it looks like the 2 sed statements in the "prepare()" section are obsolete. They attempt to correct problems that were fixed in the repo before the 1.4.5 release.

As currently written, the PKGBUILD places the udev files in "/usr/usr/lib/udev/rules.d/" so they aren't seen by the system, causing the connection permission error. It also removes the "Exec=plug" from the plug.desktop file, causing the application menu failure because no executable is named.

If I remove both sed statements from the PKGBUILD and rebuild the package, plug loads correctly (plug.desktop has the "Exec=plug") and successfully connects to the amplifier (because udev rules were installed in "/usr/..." rather than "/usr/usr/...).

I originally experienced the same crash as Abigor, but was able to connect successfully after patching the source as suggested by drunkenjoe. I suggest updating the PKGBUILD to apply the patch so other users don't experience the crash. It's fixed in the repo, so could be removed after the next release.

Finally, minor observation: the "Sources" section above on this page says "plug-1.4.3.tar.gz" though the link points to the correct version 1.4.5.

Thanks!

Abigor commented on 2024-09-22 08:58 (UTC)

Thanks. This fix works.

drunkenjoe commented on 2024-09-12 18:11 (UTC) (edited on 2024-09-12 18:12 (UTC) by drunkenjoe)

Hi, the crash is caused by the amp having less presets than 100. I opened an issue regarding this on the author's github. Before it is resolved here are the changes I did to make it work.

diff -ura plug.orig/src/ui/library.cpp plug.new/src/ui/library.cpp
--- plug.orig/src/ui/library.cpp    2023-12-05 20:25:19.000000000 +0100
+++ plug.new/src/ui/library.cpp 2024-09-12 19:30:45.053052939 +0200
@@ -51,7 +51,7 @@
         ui->spinBox->setValue(font.pointSize());
         ui->fontComboBox->setCurrentFont(font);

-        for (std::size_t i = 0; i < 100; ++i)
+        for (std::size_t i = 0; i < names.size() && i < 100; ++i)
         {
             if (names[i][0] == 0x00)
             {
diff -ura plug.orig/src/ui/loadfromamp.cpp plug.new/src/ui/loadfromamp.cpp
--- plug.orig/src/ui/loadfromamp.cpp    2023-12-05 20:25:19.000000000 +0100
+++ plug.new/src/ui/loadfromamp.cpp 2024-09-12 19:30:45.053052939 +0200
@@ -61,7 +61,7 @@

     void LoadFromAmp::load_names(const std::vector<std::string>& names)
     {
-        for (std::size_t i = 0; i < 100; ++i)
+        for (std::size_t i = 0; i < names.size() && i < 100; ++i)
         {
             if (names[i][0] == 0x00)
             {
diff -ura plug.orig/src/ui/quickpresets.cpp plug.new/src/ui/quickpresets.cpp
--- plug.orig/src/ui/quickpresets.cpp   2023-12-05 20:25:19.000000000 +0100
+++ plug.new/src/ui/quickpresets.cpp    2024-09-12 19:30:45.053052939 +0200
@@ -50,7 +50,7 @@
         QSettings settings;
         std::size_t i = 0;

-        for (i = 0; i < 100; i++)
+        for (i = 0; i < names.size() && i < 100; ++i)
         {
             if (names[i][0] == 0x00)
             {
diff -ura plug.orig/src/ui/saveonamp.cpp plug.new/src/ui/saveonamp.cpp
--- plug.orig/src/ui/saveonamp.cpp  2023-12-05 20:25:19.000000000 +0100
+++ plug.new/src/ui/saveonamp.cpp   2024-09-12 19:30:45.053052939 +0200
@@ -62,7 +62,7 @@

     void SaveOnAmp::load_names(const std::vector<std::string>& names)
     {
-        for (std::size_t i = 0; i < 100; ++i)
+        for (std::size_t i = 0; i < names.size() && i < 100; ++i)
         {
             if (names[i][0] == 0x00)
             {

After the changes I did makepkg -fe and installed the package.

Abigor commented on 2024-08-04 06:58 (UTC) (edited on 2024-08-04 09:15 (UTC) by Abigor)

Hi. I have a crash every time I start Plug:

/usr/include/c++/14.1.1/bits/stl_vector.h:1149: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; const_reference = const std::__cxx11::basic_string<char>&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Aborted (core dumped)