Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#9890 closed Bug Report - General (Fixed)

User job fails if %DESCRIPTION% is too big

Reported by: anders.collstrup@… Owned by: Raymond Wagner
Priority: minor Milestone: 0.25
Component: MythTV - General Version: 0.24-fixes
Severity: medium Keywords: %DESCRIPTION% Unterminated quoted string user job
Cc: Ticket locked: no

Description

If I use the %DESCRIPTION% argument for a user job and the description is long, then I get sh: "Syntax error: Unterminated quoted string" in the backend log.

The script is called with: /home/av/mythcopy2.sh %FILE% %STARTTIME% %CHANID% %TITLE% %DESCRIPTION%

Test script that fails (only if %DESCRIPTION% is long) #!/bin/sh cp /var/lib/mythtv/recordings/$1 /recordings/recordings/$3_$2.mpg

Error in /var/log/mythtv/mythbackend.log

2011-07-01 10:27:50.576 adding: mythtv as a client (events: 2) 2011-07-01 10:28:23.761 JobQueue?: Started kopi til elly uden metadata for "Vore Venners Liv (1:10)":"Svensk feelgood/feelbad serie fra 2010 om moderne mæn d i krise. Mats, Olle, David og Pontus. 4 bedste venner i trediverne." recorded from channel 1101 at 2011-06-30T22:00:00 sh: Syntax error: Unterminated quoted string 2011-07-01 10:28:24.003 JobQueue? Error: User Job '/home/av/mythcopy2.sh "1101_20110630220000.mpg" "20110630220000" "1101" "Vore Venners Liv (1:10)" "Tvivle ren Mats skal endelig giftes med kæresten Charlotte og står til at få verdens værste svigerfar, så vennerne arrangerer en lidt usædvanlig kidnapning forud for hans polterabend. For at blive gravide har Olle og kollegaen Monika snart haft sex i alle hemmelige kroge på den skole, hvor de arbejder - så hvorfor l ykkes det ikke? David står pludselig med nøglerne til en rød Ferrari i hånden - til gengæld er hans sko smurt ind i hundelort. Kan det virkelig være starte n på en heftig forelskelse? Heldigvis har Pontus styr på det med kone, barn, job og arbejdsdeling i hjemmet. Og det går da også helt fint - eller gør det? Medvirkende: Jacob Ericksson, Gustaf Hammarsten, Shanti Roney, Erik Johansson, Marie Richardson, Meliz Karlge, Kirsti Torhaug, Malin Cederbladh m.fl. Manuskript: Calle Marthin og Niklas Rockström. Instruktion: Henrik Georgsson og Mani Maserrat. Fotograf:Stefan Kullänger. Stillfotograf: Peter Cederling. Scenograf: John Virke. Musik: Niclas Frisk og Andreas Mattsson. Produktion: SVT"' failed. 2011-07-01 10:28:33.664 AutoExpire?: CalcParams?(): Max required Free Space: 1.0 GB w/freq: 15 min 2011-07-01 10:31:11.013 MainServer::ANN Monitor

Regards Anders Collstrup

Attachments (1)

mythtv-versions (1.6 KB) - added by anders.collstrup@… 8 years ago.
contains mythtv versions

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by anders.collstrup@…

Attachment: mythtv-versions added

contains mythtv versions

comment:1 Changed 8 years ago by Raymond Wagner

Status: newinfoneeded_new

Can you confirm an example where this should actually be expected to work? Filenames on any modern filesystem are limited to 256 characters. Of course trying to name a file using a long description will fail.

comment:2 Changed 8 years ago by Raymond Wagner

Status: infoneeded_newnew

Looking a bit deeper, the external system routine is limited to 1024 characters, while your command is longer than that. Anything after 1024 characters is chopped off, including the end of the quote.

comment:3 Changed 8 years ago by Raymond Wagner

Milestone: unknown0.25
Resolution: Fixed
Status: newclosed

Fixed seven months ago in 0.25 with the MythSystem? rewrite. Command length is now dynamically allocated, and no longer constrained by a static buffer length.

comment:4 Changed 8 years ago by Raymond Wagner

Owner: set to Raymond Wagner
Note: See TracTickets for help on using tickets.