You are not logged in.

#1 2021-06-23 15:07:44

jmandawg
Member
Registered: 2011-10-19
Posts: 61

lshw broken terminate called after throwing an instance of 'std::leng

Can anyone else confirm theirs is also broken.

lshw appears to be broken

sudo lshw
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted


lshw -version

the latest version is B.02.18


uname -r
5.12.12-arch1-1

Offline

#2 2021-06-23 16:58:32

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,700
Website

Re: lshw broken terminate called after throwing an instance of 'std::leng

Arch packages lshw B.02.19.2 and has since 2020. Have you been running partial updates, or do you have a local install of lshw?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2021-06-23 17:07:31

jmandawg
Member
Registered: 2011-10-19
Posts: 61

Re: lshw broken terminate called after throwing an instance of 'std::leng

strange it prints the wrong version:

sudo pacman -Su lshw
warning: lshw-B.02.19.2-1 is up to date -- reinstalling
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) lshw-B.02.19.2-1

Total Installed Size:  7.93 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
:: Processing package changes...
(1/1) reinstalling lshw                            [######################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the desktop file MIME type cache...

[xxx]$ lshw -version

the latest version is B.02.18

[xxx]$ sudo lshw
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted

Maybe an issue with locale?

Last edited by jmandawg (2021-06-23 17:09:08)

Offline

#4 2021-06-23 17:37:13

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: lshw broken terminate called after throwing an instance of 'std::leng

which lshw

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2021-06-23 18:32:19

jmandawg
Member
Registered: 2011-10-19
Posts: 61

Re: lshw broken terminate called after throwing an instance of 'std::leng

[~]$ which lshw
/usr/bin/lshw
[~]$ ls -al /usr/bin/lshw 
-rwxr-xr-x 1 root root 1020528 May  2  2020 /usr/bin/lshw
[~]$ /usr/bin/lshw -version

the latest version is B.02.18

Offline

#6 2021-06-24 15:30:59

jmandawg
Member
Registered: 2011-10-19
Posts: 61

Re: lshw broken terminate called after throwing an instance of 'std::leng

I'm guessing some of my hardware is not returning the proper string.  hwinfo is working fine though.  On my other 2 machines lshw works fine so it must be something specific to this machine.

Last edited by jmandawg (2021-06-24 15:31:29)

Offline

#7 2021-06-27 13:19:13

loqs
Member
Registered: 2014-03-06
Posts: 18,401

Re: lshw broken terminate called after throwing an instance of 'std::leng

As lslhw is built from a tarball,  the environment variable VERSION needs to be set,  to specify the version.
The code should print unknown when the version is not set,  due to a bug in the code an empty string it printed.
The version that is shown is obtained by a query to an internet server run by upstream when the -version option is specified.

git diff
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 7f613e6..5718f75 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -18,9 +18,11 @@ sha256sums=('9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80')
 prepare() {
   cd "$srcdir"/$pkgname-$pkgver
   sed -i 's|/usr/bin/gtk-lshw|/usr/sbin/gtk-lshw|' src/gui/integration/gtk-lshw.desktop
+  sed -i '/^LDFLAGS=$/d' src/core/Makefile src/gui/Makefile
 }
 
 build() {
+  export VERSION=$pkgver
   cd "$srcdir"/$pkgname-$pkgver
   make SBINDIR=/usr/bin
   make SBINDIR=/usr/bin gui

Offline

#8 2021-07-10 14:48:08

solstice
Member
Registered: 2006-10-27
Posts: 239
Website

Re: lshw broken terminate called after throwing an instance of 'std::leng

I confirm the bug. But this is strange. I have the bug on my old netbook (running arhclinux x86_64 though)but not on my desktop.

Offline

#9 2022-08-24 05:42:21

ttoirrah
Member
Registered: 2015-01-29
Posts: 59

Re: lshw broken terminate called after throwing an instance of 'std::leng

lshw vB.02.19.2 here, working without error on two mature Arch installs, but on my new Arch build-up on a new laptop, I got the this exact terminate called bug. Fix was to remove it and install AUR's lshw-git (lshw vB.02.19.r87.gd76afba, which works without errors on my new Arch install.

Offline

Board footer

Powered by FluxBB