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.057831
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

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)