Subject: | Exceptions running within Plack |
Date: | Mon, 15 Sep 2014 12:43:45 +0100 |
To: | bug-GraphViz2 [...] rt.cpan.org |
From: | Andrew Beverley <andy [...] andybev.com> |
Hi,
Thanks for fixing my last bug report so quickly. This report is not
necessarily a bug, but a problem I'm experiencing and really can't work
out the solution. Any help would be appreciated.
I'm using Graphviz2 within a web application to generate PDFs
on-the-fly. I'm using Dancer2, and everything works well in my
development environment. However, as soon as I deploy into Apache, using
Plack and Fast CGI, I'm getting an exception which I can't track down.
I appreciate this may be a problem with the environment it's running in,
but I wondered whether you can suggest any areas to investigate.
I'm getting problems when Graphviz2 attempts to open an IO::Handle
object, within Capture::Tiny. The first few calls to capture() are
successful, as they all refer to temporary files, but in this case
"fileno" is returning -1 which then prevents the subsequent call to
open();
Here's the trace:
Error from open(GLOB(0x7f62febfb308), >&-1): Invalid argument
at /usr/local/share/perl/5.14.2/Capture/Tiny.pm line 99.
Capture::Tiny::_open(GLOB(0x7f62febfb308), ">&-1") called
at /usr/local/share/perl/5.14.2/Capture/Tiny.pm line 186
Capture::Tiny::_open_std(HASH(0x7f63014d95a8)) called
at /usr/local/share/perl/5.14.2/Capture/Tiny.pm line 375
Capture::Tiny::_capture_tee(1, 1, 0, 0, CODE(0x7f6301635940)) called
at /usr/local/share/perl/5.14.2/GraphViz2.pm line 558
GraphViz2::load_valid_attributes(GraphViz2=HASH(0x7f6301164cb0)) called
at /usr/local/share/perl/5.14.2/GraphViz2.pm line 156
GraphViz2::BUILD(GraphViz2=HASH(0x7f6301164cb0), HASH(0x7f630165c088))
called at (eval 2014) line 130 GraphViz2::new("GraphViz2", "edge",
HASH(0x7f630252ee40), "global", HASH(0x7f62ff8b0b18), "graph",
HASH(0x7f6301725e60), "logger", Log::Handler=HASH(0x7f630257c898), ...)
called at /srv/Isaas/bin/../lib/Isaas/Asset.pm line 345
Isaas::Asset::tree("Isaas::Asset") called
at /srv/Isaas/bin/../lib/Isaas.pm line 635
Isaas::__ANON__(Dancer2::Core::App=HASH(0x7f62ff379218)) called
at /usr/local/share/perl/5.14.2/Dancer2/Core/Route.pm line 142
Dancer2::Core::Route::execute(Dancer2::Core::Route=HASH(0x7f6301f38f60),
Dancer2::Core::App=HASH(0x7f62ff379218)) called
at /usr/local/share/perl/5.14.2/Dancer2/Core/Dispatcher.pm line 172 eval
{...} called at /usr/local/share/perl/5.14.2/Dancer2/Core/Dispatcher.pm
line 172
Dancer2::Core::Dispatcher::_dispatch_route(Dancer2::Core::Dispatcher=HASH(0x7f62ff8c74c0), Dancer2::Core::Route=HASH(0x7f6301f38f60), Dancer2::Core::App=HASH(0x7f62ff379218)) called at /usr/local/share/perl/5.14.2/Dancer2/Core/Dispatcher.pm line 67 Dancer2::Core::Dispatcher::__ANON__(CODE(0x7f62ff26e518)) called at /usr/local/share/perl/5.14.2/Return/MultiLevel.pm line 49 Return::MultiLevel::__ANON__() called at /usr/local/share/perl/5.14.2/Return/MultiLevel.pm line 54 Return::MultiLevel::__ANON__(CODE(0x7f62ff87faa8)) called at /usr/local/share/perl/5.14.2/Dancer2/Core/Dispatcher.pm line 68 Dancer2::Core::Dispatcher::dispatch(Dancer2::Core::Dispatcher=HASH(0x7f62ff8c74c0), HASH(0x7f62ffacfec0)) called at /usr/local/share/perl/5.14.2/Dancer2/Core/Runner.pm line 220 eval {...} called at /usr/local/share/perl/5.14.2/Dancer2/Core/Runner.pm line 222 Dancer2::Core::Runner::__ANON__(HASH(0x7f62ffacfec0)) called at /usr/local/share/perl/5.14.2/Plack/Middleware/Head.pm line 9 Plack::Middleware::Head::call(Plack::Middleware::Head=HASH(0x7f6301f62160), HASH(0x7f62ffacfec0)) called at /usr/local/share/perl/5.14.2/Plack/Component.pm line 50 Plack::Component::__ANON__(HASH(0x7f62ffacfec0)) called at /usr/local/share/perl/5.14.2/Plack/Handler/Apache2.pm line 87 Plack::Handler::Apache2::call_app("Plack::Handler::Apache2", Apache2::RequestRec=SCALAR(0x7f62fec27bb8), CODE(0x7f6301f61cf8)) called at /usr/local/share/perl/5.14.2/Plack/Handler/Apache2.pm line 126 Plack::Handler::Apache2::handler(Apache2::RequestRec=SCALAR(0x7f62fec27bb8)) called at -e line 0 eval {...} called at -e line 0
Any ideas?
Thanks,
Andy