[haiku-bugs] [Haiku] #12298: Running shell commands from an app fails

  • From: "humdinger" <trac@xxxxxxxxxxxx>
  • Date: Sun, 09 Aug 2015 16:00:07 -0000

#12298: Running shell commands from an app fails
-----------------------+------------------------------
Reporter: humdinger | Owner: nobody
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: System | Version: R1/Development
Keywords: | Blocked By:
Blocking: | Has a Patch: 0
Platform: All |
-----------------------+------------------------------
This is hrev49522.

I haven't used Ubertuber for some time, and now it crashes. That is,
python crashes actually, that's used with the youtube-dl script. See
attachment, note the non-UTF8 charcters in line 316.

In Ubertuber I string together a little shell command script that is then
executed via {{{ system(command->String()); }}}.
The failing youtube-dl line is:
{{{
youtube-dl --continue --restrict-filenames --no-part --no-cache-dir
--format best %URL% ;
}}}
Doing the same in Terminal directly works!

On IRC bbjimmy IIRC reported a similar issue with using "ls" from his app.
His workaround was to use "ls > /dev/null" (though I don't see how that
can work...). Anyway, it doesn't work for me and youtube-dl.

If I comment out the above line that is supposed to download a video clip,
there's no crash. Even though there are other invocations of youtube-dl,
like
{{{
youtube-dl --get-title %URL% 2>&1 | tail -n 1
}}}
There are also a whole lot of other script commands involved that don't
have a problem, see
[https://github.com/humdingerb/ubertuber/blob/master/WorkerThread.cpp#L77
here for example]

--
Ticket URL: <https://dev.haiku-os.org/ticket/12298>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: