Bug 666059 - [abrt] gst123-0.1.3-1.fc14: std::__throw_logic_error: Process /usr/bin/gst123 was killed by signal 6 (SIGABRT)
Summary: [abrt] gst123-0.1.3-1.fc14: std::__throw_logic_error: Process /usr/bin/gst123...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gst123
Version: 14
Hardware: i686
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Siddhesh Poyarekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:31fad5e2603ae657c0fbb979ca7...
Keywords:
: 663562 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-28 17:40 UTC by Davor
Modified: 2015-09-14 00:22 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-01-03 22:17:43 UTC


Attachments (Terms of Use)
File: backtrace (24.89 KB, text/plain)
2010-12-28 17:40 UTC, Davor
no flags Details

Description Davor 2010-12-28 17:40:54 UTC
abrt version: 1.1.14
architecture: i686
Attached file: backtrace
cmdline: gst123 /home/davor/linux/bckp/zvk/zahod.mp3
component: gst123
crash_function: std::__throw_logic_error
executable: /usr/bin/gst123
kernel: 2.6.35.10-74.fc14.i686
package: gst123-0.1.3-1.fc14
rating: 4
reason: Process /usr/bin/gst123 was killed by signal 6 (SIGABRT)
release: Fedora release 14 (Laughlin)
time: 1293557722
uid: 500

How to reproduce
-----
1.run shell script with gst123 statement in code.
2.
3.

Comment 1 Davor 2010-12-28 17:40:58 UTC
Created attachment 470987 [details]
File: backtrace

Comment 2 Siddhesh Poyarekar 2010-12-30 20:23:30 UTC
*** Bug 663562 has been marked as a duplicate of this bug. ***

Comment 3 Siddhesh Poyarekar 2010-12-30 20:26:48 UTC
Thanks, this is easy to reproduce. The script wrapper is not necessary; gst123 just needs to be run as a startup application and that is enough to get it to crash.

Comment 4 Siddhesh Poyarekar 2011-01-03 09:55:16 UTC
I have submitted a patch to upstream developer for review. To reproduce:

  TERM=dumb gst123 foo

It does not even matter if foo exists or not.

The patch:

[siddhesh@spoyarek gst123]$ cat 0001-Set-keyboard-shortcuts-only-on-interactive-terminals.patch 
From 30fe7f2989296024c56f94a66261e07bdac7118b Mon Sep 17 00:00:00 2001
From: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Date: Mon, 3 Jan 2011 15:19:33 +0530
Subject: [PATCH] Set keyboard shortcuts only on interactive terminals

Don't try to set keyboard escape sequences if keypad_xmit returns
0. This happens when gst123 is invoked from dumb terminals (at startup
of gnome, for example). This was reported in Fedora bugzilla #666059.
---
 src/terminal.cc |   19 +++++++++++++++----
 src/terminal.h  |    2 +-
 2 files changed, 16 insertions(+), 5 deletions(-)

index 1d814d4..f366512 100644
--- a/src/terminal.cc
+++ b/src/terminal.cc
@@ -87,9 +87,11 @@ Terminal::signal_sig_cont (int)
   terminal_instance->init_terminal();
 }
 
-void
+bool
 Terminal::init_terminal()
 {
+  char *ks = NULL;
+
   // configure input params of the terminal
   tcgetattr (0, &tio_orig);
 
@@ -100,8 +102,16 @@ Terminal::init_terminal()
   tcsetattr (0, TCSANOW, &tio_new);
 
   // enable keypad_xmit
-  printf ("%s", tgetstr ("ks", &term_p));
-  fflush (stdout);
+  ks = tgetstr ("ks", &term_p);
+
+  if (ks)
+    {
+      printf ("%s", ks);
+      fflush (stdout);
+      return true;
+    }
+
+  return false;
 }
 
 void
@@ -120,7 +130,8 @@ Terminal::init (GMainLoop *loop, KeyHandler *key_handler)
   tgetent (term_buffer, terminal_type.c_str());
 
   // initialize termios & keypad xmit
-  init_terminal();
+  if (!init_terminal())
+    return;
 
   // initialize common keyboard escape sequences
   keys[tgetstr ("ku", &term_p)] = KEY_HANDLER_UP;
diff --git a/src/terminal.h b/src/terminal.h
index 012d982..43571d5 100644
--- a/src/terminal.h
+++ b/src/terminal.h
@@ -40,7 +40,7 @@ class Terminal
 
   void read_stdin();
   int getch();
-  void init_terminal();
+  bool init_terminal();
 
 public:
   void init (GMainLoop *loop, KeyHandler *key_handler);
-- 
1.7.3.4

Comment 5 Siddhesh Poyarekar 2011-01-03 10:04:57 UTC
Oh, and if you're looking for a temporary workaround, you could simply set $TERM variable to xterm in your script.

Comment 7 Fedora Update System 2011-01-03 14:34:06 UTC
gst123-0.1.3-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gst123-0.1.3-2.fc14

Comment 8 Fedora Update System 2011-01-03 20:00:15 UTC
gst123-0.1.3-2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gst123'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gst123-0.1.3-2.fc14

Comment 9 Davor 2011-01-03 20:52:45 UTC
[davor@Bonifacije ~]$  su -c 'yum --enablerepo=updates-testing update gst123*'Password: 
Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit
Adding en_US to language list
Found 17 installed debuginfo package(s)
Enabling fedora-debuginfo: Fedora 14 - i386 - Debug
Enabling rpmfusion-nonfree-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Debug
Enabling updates-testing-debuginfo: Fedora 14 - i386 - Test Updates Debug
Enabling rpmfusion-free-updates-debuginfo: RPM Fusion for Fedora 14 - Free - Updates Debug
Enabling rpmfusion-nonfree-updates-debuginfo: RPM Fusion for Fedora 14 - Nonfree - Updates Debug
Enabling rpmfusion-free-debuginfo: RPM Fusion for Fedora 14 - Free - Debug
Enabling updates-debuginfo: Fedora 14 - i386 - Updates - Debug
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package gst123-debuginfo.i686 0:0.1.3-1.fc14 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch      Version           Repository              Size
================================================================================
Updating:
 gst123-debuginfo      i686      0.1.3-1.fc14      updates-debuginfo      305 k

Transaction Summary
================================================================================
Upgrade       1 Package(s)

Total download size: 305 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 305 k
gst123-debuginfo-0.1.3-1.fc14.i686.rpm                   | 305 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : gst123-debuginfo-0.1.3-1.fc14.i686                       1/2 
  Cleanup        : gst123-debuginfo-0.1.2-1.fc14.i686                       2/2 

Updated:
  gst123-debuginfo.i686 0:0.1.3-1.fc14                                          

Complete!
[davor@Bonifacije ~]$ 

[davor@Bonifacije ~]$ gst123 /home/davor/linux/bckp/zvk/zahod.mp3
                                                                                
Playing file:///home/davor/linux/bckp/zvk/zahod.mp3
                                                                                
Codec   : MPEG 1 Audio, Layer 3 (MP3) ( Bitrate : 128.0 kbit/s

[davor@Bonifacije ~]$


[davor@Bonifacije bckp]$ ./copy* 2>log.txt
                                                                                
Playing file:///home/davor/linux/bckp/zvk/zahod.mp3
                                                                                
Codec   : MPEG 1 Audio, Layer 3 (MP3) ( Bitrate : 128.0 kbit/s

[davor@Bonifacije bckp]$  

log.txt is clean. Sound reproduce.

FIXED!! tnx!!

Bye and happy new year!!

Comment 10 Fedora Update System 2011-01-12 05:28:19 UTC
gst123-0.1.3-2.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.