Skip to content

Commit

Permalink
ImageWriter: Added Expression node to control colorspace plug.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucienfostier committed Apr 4, 2017
1 parent 89c5b18 commit 7e8ad35
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/GafferImage/ImageWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#ifndef GAFFERIMAGE_IMAGEWRITER_H
#define GAFFERIMAGE_IMAGEWRITER_H

#include "Gaffer/Expression.h"

#include "GafferDispatch/TaskNode.h"

#include "GafferImage/TypeIds.h"
Expand Down Expand Up @@ -102,6 +104,9 @@ class ImageWriter : public GafferDispatch::TaskNode
ColorSpace *colorSpace();
const ColorSpace *colorSpace() const;

Gaffer::Expression *expr();
const Gaffer::Expression *expr() const;

void createFileFormatOptionsPlugs();

static size_t g_firstPlugIndex;
Expand Down
18 changes: 18 additions & 0 deletions src/GafferImage/ImageWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ OIIO_NAMESPACE_USING
#include "Gaffer/Context.h"
#include "Gaffer/ScriptNode.h"
#include "Gaffer/StringPlug.h"
#include "Gaffer/Expression.h"

#include "GafferImage/FormatPlug.h"
#include "GafferImage/ImageAlgo.h"
Expand Down Expand Up @@ -863,6 +864,10 @@ ImageWriter::ImageWriter( const std::string &name )
outPlug()->setInput( inPlug() );

createFileFormatOptionsPlugs();

This comment has been minimized.

Copy link
@johnhaddon

johnhaddon Apr 4, 2017

Note that createFileFormatOptionsPlugs() is going to add a lot of plugs! So even if we have "out" at index 5, "__expression" will not be at index 6.


ExpressionPtr expression = new Expression( "__expression" );
addChild( expression );
//expression->setExpression( string( "parent[\"__colorSpace\"][\"outputSpace\"] = context.get(\"gaffer:colorspace\", \"linear\") " ), string( "python" ) );

This comment has been minimized.

Copy link
@johnhaddon

johnhaddon Apr 4, 2017

This seems like the natural place to set the expression to me - what goes wrong when you try to do it here?

This comment has been minimized.

Copy link
@lucienfostier

lucienfostier Apr 5, 2017

Author Owner

this is what happens when I enable this statement:

Program received signal SIGSEGV, Segmentation fault.
0x00007efdb2c874d0 in (anonymous namespace)::children(Gaffer::GraphComponent&, IECore::TypeId) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libGafferBindings.so
(gdb) bt
#0 0x00007efdb2c874d0 in (anonymous namespace)::children(Gaffer::GraphComponent&, IECore::TypeId) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libGafferBindings.so
GafferHQ#1 0x00007efdb2c93d8c in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<boost::python::tuple ()(Gaffer::GraphComponent&, IECore::TypeId), boost::python::default_call_policies, boost::mpl::vector3<boost::python::tuple, Gaffer::GraphComponent&, IECore::TypeId> > >::operator()(_object, _object*) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libGafferBindings.so
GafferHQ#2 0x00007efdbbb3beca in boost::python::objects::function::call(_object*, _object*) const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libboost_python.so.1.61.0
GafferHQ#3 0x00007efdbbb3c238 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libboost_python.so.1.61.0
GafferHQ#4 0x00007efdbbb467b3 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libboost_python.so.1.61.0
GafferHQ#5 0x00007efdb9b694c7 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<IECore::Exception, void ()(IECore::Exception const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(IECore::Exception const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libIECorePython.so
GafferHQ#6 0x00007efdbbb4657d in boost::python::handle_exception_impl(boost::function0) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libboost_python.so.1.61.0
GafferHQ#7 0x00007efdbbb3ab43 in function_call () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libboost_python.so.1.61.0
GafferHQ#8 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x207eae0, arg=arg@entry=0x7efd9118c710, kw=kw@entry=0x0) at Objects/abstract.c:2547
GafferHQ#9 0x00007efdbfa6e4c6 in do_call (nk=, na=, pp_stack=0x7ffd733cd4f0, func=) at Python/ceval.c:4569
GafferHQ#10 call_function (oparg=, pp_stack=0x7ffd733cd4f0) at Python/ceval.c:4374
GafferHQ#11 PyEval_EvalFrameEx (f=f@entry=0x7efda85c35c0, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#12 0x00007efdbfa71480 in fast_function (nk=, na=1, n=, pp_stack=0x7ffd733cd690, func=) at Python/ceval.c:4437
GafferHQ#13 call_function (oparg=, pp_stack=0x7ffd733cd690) at Python/ceval.c:4372
GafferHQ#14 PyEval_EvalFrameEx (f=f@entry=0x7efda85ca050, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#15 0x00007efdbfa71480 in fast_function (nk=, na=1, n=, pp_stack=0x7ffd733cd830, func=) at Python/ceval.c:4437
GafferHQ#16 call_function (oparg=, pp_stack=0x7ffd733cd830) at Python/ceval.c:4372
GafferHQ#17 PyEval_EvalFrameEx (f=f@entry=0x52bfc80, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#18 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efdbff3f068, argcount=0, kws=kws@entry=0x7efd9120b698,
kwcount=kwcount@entry=1, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x7efda86279b0) at Python/ceval.c:3584
GafferHQ#19 0x00007efdbf9eaf85 in function_call (func=0x7efda85ae1b8, arg=0x7efdbff3f050, kw=0x7efd91237280) at Objects/funcobject.c:523
GafferHQ#20 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efda85ae1b8, arg=arg@entry=0x7efdbff3f050, kw=kw@entry=0x7efd91237280) at Objects/abstract.c:2547
GafferHQ#21 0x00007efdbfa6dfb7 in ext_do_call (nk=, na=, flags=, pp_stack=0x7ffd733cdb40, func=0x7efda85ae1b8) at Python/ceval.c:4666
GafferHQ#22 PyEval_EvalFrameEx (f=f@entry=0x7efd988a0e18, throwflag=throwflag@entry=0) at Python/ceval.c:3028
GafferHQ#23 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efd911e1658, argcount=3, kws=kws@entry=0x7efdbff3f068,
kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at Python/ceval.c:3584
GafferHQ#24 0x00007efdbf9eaf85 in function_call (func=0x7efda9e9db18, arg=0x7efd911e1640, kw=0x7efd911d7b40) at Objects/funcobject.c:523
GafferHQ#25 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efda9e9db18, arg=arg@entry=0x7efd911e1640, kw=kw@entry=0x7efd911d7b40) at Objects/abstract.c:2547
GafferHQ#26 0x00007efdbfa6dfb7 in ext_do_call (nk=, na=, flags=, pp_stack=0x7ffd733cde40, func=0x7efda9e9db18) at Python/ceval.c:4666
GafferHQ#27 PyEval_EvalFrameEx (f=f@entry=0x7efd915529d8, throwflag=throwflag@entry=0) at Python/ceval.c:3028
GafferHQ#28 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efd911e1a68, argcount=3, kws=kws@entry=0x7efdbff3f068,
kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at Python/ceval.c:3584
GafferHQ#29 0x00007efdbf9eaf85 in function_call (func=0x7efdb68fa230, arg=0x7efd911e1a50, kw=0x7efd912356e0) at Objects/funcobject.c:523
GafferHQ#30 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efdb68fa230, arg=arg@entry=0x7efd911e1a50, kw=kw@entry=0x7efd912356e0) at Objects/abstract.c:2547
GafferHQ#31 0x00007efdbf9c79cd in instancemethod_call (func=0x7efdb68fa230, arg=0x7efd911e1a50, kw=0x7efd912356e0) at Objects/classobject.c:2602
GafferHQ#32 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efd91cb61e0, arg=arg@entry=0x7efd9118df38, kw=kw@entry=0x7efd912356e0) at Objects/abstract.c:2547
GafferHQ#33 0x00007efdbfa269a5 in slot_tp_call (self=, args=0x7efd9118df38, kwds=0x7efd912356e0) at Objects/typeobject.c:5546
GafferHQ#34 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efd912205d0, arg=arg@entry=0x7efd9118df38, kw=kw@entry=0x7efd912356e0) at Objects/abstract.c:2547
GafferHQ#35 0x00007efdbfa6dfb7 in ext_do_call (nk=, na=, flags=, pp_stack=0x7ffd733ce420, func=0x7efd912205d0) at Python/ceval.c:4666
GafferHQ#36 PyEval_EvalFrameEx (f=f@entry=0x7efd91551240, throwflag=throwflag@entry=0) at Python/ceval.c:3028
GafferHQ#37 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efd9122e9a8, argcount=1, kws=kws@entry=0x0, kwcount=kwcount@entry=0,
defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x7efd91233a00) at Python/ceval.c:3584
GafferHQ#38 0x00007efdbf9eaeb0 in function_call (func=0x7efd91228488, arg=0x7efd9122e990, kw=0x0) at Objects/funcobject.c:523
GafferHQ#39 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efd91228488, arg=arg@entry=0x7efd9122e990, kw=) at Objects/abstract.c:2547
GafferHQ#40 0x00007efdbfa6a437 in PyEval_CallObjectWithKeywords (func=0x7efd91228488, arg=0x7efd9122e990, kw=) at Python/ceval.c:4221
GafferHQ#41 0x00007efdab1dfc5c in PySide::SignalManager::callPythonMetaMethod(QMetaMethod const&, void**, _object*, bool) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libpyside-python2.7.so.1.2
GafferHQ#42 0x00007efdab1e5dcd in PySide::GlobalReceiverV2::qt_metacall(QMetaObject::Call, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libpyside-python2.7.so.1.2
GafferHQ#43 0x00007efdafaa2392 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#44 0x00007efdaee571b2 in QAction::triggered(bool) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#45 0x00007efdaee587b7 in QAction::activate(QAction::ActionEvent) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#46 0x00007efdaa2e305a in Sbk_QActionFunc_trigger () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#47 0x00007efdbfa7163c in call_function (oparg=, pp_stack=0x7ffd733ce9d0) at Python/ceval.c:4336
GafferHQ#48 PyEval_EvalFrameEx (f=f@entry=0x7efd91552420, throwflag=throwflag@entry=0) at Python/ceval.c:2989
---Type to continue, or q to quit---
GafferHQ#49 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efd911864a8, argcount=1, kws=kws@entry=0x7efdbff3f068,
kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at Python/ceval.c:3584
GafferHQ#50 0x00007efdbf9eaf85 in function_call (func=0x7efda9ea2140, arg=0x7efd91186490, kw=0x7efd911de910) at Objects/funcobject.c:523
GafferHQ#51 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efda9ea2140, arg=arg@entry=0x7efd91186490, kw=kw@entry=0x7efd911de910) at Objects/abstract.c:2547
GafferHQ#52 0x00007efdbfa6dfb7 in ext_do_call (nk=, na=, flags=, pp_stack=0x7ffd733cece0, func=0x7efda9ea2140) at Python/ceval.c:4666
GafferHQ#53 PyEval_EvalFrameEx (f=f@entry=0x7efd91552608, throwflag=throwflag@entry=0) at Python/ceval.c:3028
GafferHQ#54 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efd911863e8, argcount=1, kws=kws@entry=0x0, kwcount=kwcount@entry=0,
defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at Python/ceval.c:3584
GafferHQ#55 0x00007efdbf9eaeb0 in function_call (func=0x7efdb68fa230, arg=0x7efd911863d0, kw=0x0) at Objects/funcobject.c:523
GafferHQ#56 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efdb68fa230, arg=arg@entry=0x7efd911863d0, kw=kw@entry=0x0) at Objects/abstract.c:2547
GafferHQ#57 0x00007efdbf9c79cd in instancemethod_call (func=0x7efdb68fa230, arg=0x7efd911863d0, kw=0x0) at Objects/classobject.c:2602
GafferHQ#58 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efd9875e960, arg=arg@entry=0x7efdbff3f050, kw=kw@entry=0x0) at Objects/abstract.c:2547
GafferHQ#59 0x00007efdbfa269a5 in slot_tp_call (self=, args=0x7efdbff3f050, kwds=0x0) at Objects/typeobject.c:5546
GafferHQ#60 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efd9155cd50, arg=arg@entry=0x7efdbff3f050, kw=) at Objects/abstract.c:2547
GafferHQ#61 0x00007efdbfa6a437 in PyEval_CallObjectWithKeywords (func=0x7efd9155cd50, arg=0x7efdbff3f050, kw=) at Python/ceval.c:4221
GafferHQ#62 0x00007efdab1dfc5c in PySide::SignalManager::callPythonMetaMethod(QMetaMethod const&, void**, _object*, bool) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libpyside-python2.7.so.1.2
GafferHQ#63 0x00007efdab1e5dcd in PySide::GlobalReceiverV2::qt_metacall(QMetaObject::Call, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libpyside-python2.7.so.1.2
GafferHQ#64 0x00007efdafaa2392 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#65 0x00007efdaf22c2f5 in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#66 0x00007efdafaa2198 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#67 0x00007efdaf23341c in QLineControl::processKeyEvent(QKeyEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#68 0x00007efdaf22938a in QLineEdit::keyPressEvent(QKeyEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#69 0x00007efdaa54a123 in QLineEditWrapper::keyPressEvent(QKeyEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#70 0x00007efdaeeabcf1 in QWidget::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#71 0x00007efdaf22dd31 in QLineEdit::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#72 0x00007efdaa5488bb in QLineEditWrapper::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#73 0x00007efdaee5ce5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#74 0x00007efdaee64921 in QApplication::notify(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#75 0x00007efdaa2ec63e in QApplicationWrapper::notify(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#76 0x00007efdafa8eb5d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#77 0x00007efdab497cd9 in Sbk_QCoreApplicationFunc_sendEvent () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtCore.so
GafferHQ#78 0x00007efdbfa719a9 in call_function (oparg=, pp_stack=0x7ffd733cfbb0) at Python/ceval.c:4352
GafferHQ#79 PyEval_EvalFrameEx (f=f@entry=0x7efd91544400, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#80 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efd911ced10, argcount=2, kws=kws@entry=0x0, kwcount=kwcount@entry=0,
defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at Python/ceval.c:3584
GafferHQ#81 0x00007efdbf9eaeb0 in function_call (func=0x7efda9ea25f0, arg=0x7efd911cecf8, kw=0x0) at Objects/funcobject.c:523
GafferHQ#82 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efda9ea25f0, arg=arg@entry=0x7efd911cecf8, kw=kw@entry=0x0) at Objects/abstract.c:2547
GafferHQ#83 0x00007efdbf9c79cd in instancemethod_call (func=0x7efda9ea25f0, arg=0x7efd911cecf8, kw=0x0) at Objects/classobject.c:2602
GafferHQ#84 0x00007efdbf9b8df3 in PyObject_Call (func=0x7efda8f1ff00, arg=, kw=) at Objects/abstract.c:2547
GafferHQ#85 0x00007efdaa5a0602 in QMenuWrapper::keyPressEvent(QKeyEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#86 0x00007efdaeeabcf1 in QWidget::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#87 0x00007efdaf25d97b in QMenu::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#88 0x00007efdaa59f261 in Sbk_QMenuFunc_event () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#89 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efd91cb3ef0, arg=arg@entry=0x7efd915473d0, kw=) at Objects/abstract.c:2547
GafferHQ#90 0x00007efdbfa6a437 in PyEval_CallObjectWithKeywords (func=func@entry=0x7efd91cb3ef0, arg=arg@entry=0x7efd915473d0, kw=kw@entry=0x0) at Python/ceval.c:4221
GafferHQ#91 0x00007efdbf9d7e28 in methoddescr_call (descr=, args=0x7efd915473d0, kwds=0x0) at Objects/descrobject.c:247
GafferHQ#92 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efda9eded88, arg=arg@entry=0x7efd91cb3e60, kw=kw@entry=0x0) at Objects/abstract.c:2547
GafferHQ#93 0x00007efdbfa6e4c6 in do_call (nk=, na=, pp_stack=0x7ffd733d03e0, func=) at Python/ceval.c:4569
GafferHQ#94 call_function (oparg=, pp_stack=0x7ffd733d03e0) at Python/ceval.c:4374
GafferHQ#95 PyEval_EvalFrameEx (f=f@entry=0x2809db0, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#96 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=, globals=, locals=locals@entry=0x0, args=args@entry=0x7efda85bd770, argcount=2, kws=kws@entry=0x0, kwcount=kwcount@entry=0,
defs=defs@entry=0x0, defcount=defcount@entry=0, closure=0x0) at Python/ceval.c:3584
GafferHQ#97 0x00007efdbf9eaeb0 in function_call (func=0x7efda9ea2578, arg=0x7efda85bd758, kw=0x0) at Objects/funcobject.c:523
GafferHQ#98 0x00007efdbf9b8df3 in PyObject_Call (func=func@entry=0x7efda9ea2578, arg=arg@entry=0x7efda85bd758, kw=kw@entry=0x0) at Objects/abstract.c:2547
GafferHQ#99 0x00007efdbf9c79cd in instancemethod_call (func=0x7efda9ea2578, arg=0x7efda85bd758, kw=0x0) at Objects/classobject.c:2602
GafferHQ#100 0x00007efdbf9b8df3 in PyObject_Call (func=0x7efda8b21910, arg=, kw=) at Objects/abstract.c:2547
GafferHQ#101 0x00007efdaa59f00a in QMenuWrapper::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#102 0x00007efdaee5ce5c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#103 0x00007efdaee64921 in QApplication::notify(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#104 0x00007efdaa2ec63e in QApplicationWrapper::notify(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
---Type to continue, or q to quit---
GafferHQ#105 0x00007efdafa8eb5d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#106 0x00007efdaeef63b7 in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#107 0x00007efdaeef671c in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#108 0x00007efdaeed2c1f in QApplication::x11ProcessEvent(XEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#109 0x00007efdaeef8d92 in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#110 0x00007efdadd1b197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
GafferHQ#111 0x00007efdadd1b3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
GafferHQ#112 0x00007efdadd1b49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
GafferHQ#113 0x00007efdafaba535 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#114 0x00007efdaeef8e26 in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtGui.so.4
GafferHQ#115 0x00007efdafa8d7af in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#116 0x00007efdafa8daa5 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#117 0x00007efdafa92a69 in QCoreApplication::exec() () from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/lib/libQtCore.so.4
GafferHQ#118 0x00007efdaa2e8f4d in Sbk_QApplicationFunc_exec
() from /home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/python/PySide/QtGui.so
GafferHQ#119 0x00007efdbfa7163c in call_function (oparg=, pp_stack=0x7ffd733d1610) at Python/ceval.c:4336
GafferHQ#120 PyEval_EvalFrameEx (f=f@entry=0x7efda6014d00, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#121 0x00007efdbfa71480 in fast_function (nk=, na=1, n=, pp_stack=0x7ffd733d17b0, func=) at Python/ceval.c:4437
GafferHQ#122 call_function (oparg=, pp_stack=0x7ffd733d17b0) at Python/ceval.c:4372
GafferHQ#123 PyEval_EvalFrameEx (f=f@entry=0x27d5d20, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#124 0x00007efdbfa71480 in fast_function (nk=, na=2, n=, pp_stack=0x7ffd733d1950, func=) at Python/ceval.c:4437
GafferHQ#125 call_function (oparg=, pp_stack=0x7ffd733d1950) at Python/ceval.c:4372
GafferHQ#126 PyEval_EvalFrameEx (f=f@entry=0x7efda93a6da8, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#127 0x00007efdbfa71480 in fast_function (nk=, na=2, n=, pp_stack=0x7ffd733d1af0, func=) at Python/ceval.c:4437
GafferHQ#128 call_function (oparg=, pp_stack=0x7ffd733d1af0) at Python/ceval.c:4372
GafferHQ#129 PyEval_EvalFrameEx (f=f@entry=0x7efda93a6bc0, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#130 0x00007efdbfa71480 in fast_function (nk=, na=1, n=, pp_stack=0x7ffd733d1c90, func=) at Python/ceval.c:4437
GafferHQ#131 call_function (oparg=, pp_stack=0x7ffd733d1c90) at Python/ceval.c:4372
GafferHQ#132 PyEval_EvalFrameEx (f=f@entry=0x7efdbfe63b00, throwflag=throwflag@entry=0) at Python/ceval.c:2989
GafferHQ#133 0x00007efdbfa740dd in PyEval_EvalCodeEx (co=co@entry=0x7efdbfe1deb0, globals=globals@entry=0x7efdbff14168, locals=locals@entry=0x7efdbff14168, args=args@entry=0x0, argcount=argcount@entry=0,
kws=kws@entry=0x0, kwcount=kwcount@entry=0, defs=defs@entry=0x0, defcount=defcount@entry=0, closure=closure@entry=0x0) at Python/ceval.c:3584
GafferHQ#134 0x00007efdbfa74212 in PyEval_EvalCode (co=co@entry=0x7efdbfe1deb0, globals=globals@entry=0x7efdbff14168, locals=locals@entry=0x7efdbff14168) at Python/ceval.c:669
GafferHQ#135 0x00007efdbfa9cf62 in run_mod (arena=0x1a47410, flags=0x7ffd733d1f30, locals=0x7efdbff14168, globals=0x7efdbff14168, filename=0x7efdbfe1deb0 "\002", mod=) at Python/pythonrun.c:1376
GafferHQ#136 PyRun_FileExFlags (fp=fp@entry=0x1a0c4e0, filename=filename@entry=0x7ffd733d379c "/home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/bin/gaffer.py", start=start@entry=257,
globals=globals@entry=0x7efdbff14168, locals=locals@entry=0x7efdbff14168, closeit=closeit@entry=1, flags=flags@entry=0x7ffd733d1f30) at Python/pythonrun.c:1362

GafferHQ#137 0x00007efdbfa9e2f9 in PyRun_SimpleFileExFlags (fp=fp@entry=0x1a0c4e0, filename=filename@entry=0x7ffd733d379c "/home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/bin/gaffer.py",
closeit=closeit@entry=1, flags=flags@entry=0x7ffd733d1f30) at Python/pythonrun.c:948
GafferHQ#138 0x00007efdbfa9e9a3 in PyRun_AnyFileExFlags (fp=fp@entry=0x1a0c4e0, filename=filename@entry=0x7ffd733d379c "/home/gafferdev/dev/gaffer/gafferDependencies-0.32.0.0-linux/bin/gaffer.py",
closeit=closeit@entry=1, flags=flags@entry=0x7ffd733d1f30) at Python/pythonrun.c:752

GafferHQ#139 0x00007efdbfab402d in Py_Main (argc=, argv=) at Modules/main.c:640
GafferHQ#140 0x00007efdbec8f830 in __libc_start_main (main=0x400680

, argc=2, argv=0x7ffd733d20e8, init=, fini=, rtld_fini=, stack_end=0x7ffd733d20d8)
at ../csu/libc-start.c:291
GafferHQ#141 0x00000000004006b1 in _start ()

This comment has been minimized.

Copy link
@johnhaddon

johnhaddon Apr 5, 2017

Oh right, I think I get it. When we're in the constructor for ImageWriter, nobody owns a reference to the ImageWriter. But when we call setExpression() we're going into Python and adding a reference, and then probably removing it again on the way back into C++. That would mean that the ImageWriter is deleted before it's even constructed. Something along those lines anyway - I think you'll have to defer setting the expression until later, and add a comment as to why.

}

ImageWriter::~ImageWriter()
Expand Down Expand Up @@ -990,6 +995,16 @@ const GafferImage::ImagePlug *ImageWriter::outPlug() const
return getChild<ImagePlug>( g_firstPlugIndex+5 );
}

Expression *ImageWriter::expr()
{
return getChild<Expression>( g_firstPlugIndex+6 );

This comment has been minimized.

Copy link
@johnhaddon

johnhaddon Apr 4, 2017

Like I said above, I think the index is wrong here. You could test that hypothesis by doing `getChild( "__expression" ) instead.

}

const Expression *ImageWriter::expr() const
{
return getChild<Expression>( g_firstPlugIndex+6 );
}

Gaffer::ValuePlug *ImageWriter::fileFormatSettingsPlug( const std::string &fileFormat )
{
return getChild<ValuePlug>( fileFormat );
Expand Down Expand Up @@ -1062,6 +1077,9 @@ void ImageWriter::execute() const
Context * c = const_cast<Context *>( Context::current() );
c->set( "gaffer:colorspace", defaultColorSpace()( currentFileFormat() ) );

Expression * expression = const_cast<Expression *>( expr() );
expression->setExpression( string( "parent[\"__colorSpace\"][\"outputSpace\"] = context.get(\"gaffer:colorspace\", \"\") " ), string( "python" ) );

This comment has been minimized.

Copy link
@lucienfostier

lucienfostier Apr 4, 2017

Author Owner

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fc5b80a2dfb in Gaffer::Expression::enginePlug() const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGaffer.so
(gdb) bt
#0 0x00007fc5b80a2dfb in Gaffer::Expression::enginePlug() const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGaffer.so
GafferHQ#1 0x00007fc5b80a3af0 in Gaffer::Expression::getExpression(std::string&) const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGaffer.so
GafferHQ#2 0x00007fc5b80a444f in Gaffer::Expression::setExpression(std::string const&, std::string const&) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGaffer.so
GafferHQ#3 0x00007fc5ad548671 in GafferImage::ImageWriter::execute() const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferImage.so
GafferHQ#4 0x00007fc5ad1b0197 in GafferDispatchBindings::TaskNodeWrapperGafferImage::ImageWriter::execute() const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferImageBindings.so
GafferHQ#5 0x00007fc5b6aa2b16 in GafferDispatch::TaskNode::executeSequence(std::vector<float, std::allocator > const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatch.so
GafferHQ#6 0x00007fc5ad1af76b in GafferDispatchBindings::TaskNodeWrapperGafferImage::ImageWriter::executeSequence(std::vector<float, std::allocator > const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferImageBindings.so
GafferHQ#7 0x00007fc5b6aa442e in GafferDispatch::TaskNode::TaskPlug::executeSequence(std::vector<float, std::allocator > const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatch.so
GafferHQ#8 0x00007fc5b6a9063f in GafferDispatch::Dispatcher::TaskBatch::execute() const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatch.so
GafferHQ#9 0x00007fc5b6d0cf8c in (anonymous namespace)::DispatcherWrapper::taskBatchExecute(GafferDispatch::Dispatcher::TaskBatch const&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatchBindings.so
GafferHQ#10 0x00007fc5b6d1bf0f in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void ()(GafferDispatch::Dispatcher::TaskBatch const&), boost::python::default_call_policies, boost::mpl::vector2<void, GafferDispatch::Dispatcher::TaskBatch const&> > >::operator()(_object, _object*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatchBindings.so
GafferHQ#11 0x00007fc5c03da171 in boost::python::objects::function::call(_object*, _object*) const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#12 0x00007fc5c03da5f8 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#13 0x00007fc5c03e2fd3 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#14 0x00007fc5be3e7527 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<IECore::Exception, void ()(IECore::Exception const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(IECore::Exception const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libIECorePython.so
GafferHQ#15 0x00007fc5c03e2d93 in boost::python::handle_exception_impl(boost::function0) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#16 0x00007fc5c03d82e8 in function_call () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#17 0x00007fc5c4037953 in PyObject_Call (func=0x271b420, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#18 0x00007fc5c40e6a79 in do_call (nk=, na=, pp_stack=0x7fff5f4c5038, func=0x271b420) at Python/ceval.c:4239
GafferHQ#19 call_function (oparg=, pp_stack=0x7fff5f4c5038) at Python/ceval.c:4044
GafferHQ#20 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#21 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c5188, func=0x27072a8) at Python/ceval.c:4107
GafferHQ#22 call_function (oparg=, pp_stack=0x7fff5f4c5188) at Python/ceval.c:4042
GafferHQ#23 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#24 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c52d8, func=0x27072a8) at Python/ceval.c:4107
GafferHQ#25 call_function (oparg=, pp_stack=0x7fff5f4c52d8) at Python/ceval.c:4042
GafferHQ#26 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#27 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x26d15b0, globals=, locals=, args=, argcount=1, kws=0x8510628, kwcount=1, defs=0x26e96e8, defcount=1,
closure=0x0) at Python/ceval.c:3253
GafferHQ#28 0x00007fc5c40e72d2 in fast_function (nk=, na=1, n=, pp_stack=0x7fff5f4c54d8, func=0x26f4f50) at Python/ceval.c:4117
GafferHQ#29 call_function (oparg=, pp_stack=0x7fff5f4c54d8) at Python/ceval.c:4042
GafferHQ#30 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#31 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x26da7b0, globals=, locals=, args=, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3253
GafferHQ#32 0x00007fc5c4066e11 in function_call (func=0x2707cf8, arg=0x61d9e18, kw=0x0) at Objects/funcobject.c:526
GafferHQ#33 0x00007fc5c4037953 in PyObject_Call (func=0x2707cf8, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#34 0x00007fc5c404a07f in instancemethod_call (func=0x2707cf8, arg=0x61d9e18, kw=0x0) at Objects/classobject.c:2602
GafferHQ#35 0x00007fc5c4037953 in PyObject_Call (func=0x7e22230, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#36 0x00007fc5c40e0da3 in PyEval_CallObjectWithKeywords (func=0x7e22230, arg=0x6df99d0, kw=) at Python/ceval.c:3890
GafferHQ#37 0x00007fc5c4103f2a in PyEval_CallFunction (obj=0x7e22230, format=) at Python/modsupport.c:557
GafferHQ#38 0x00007fc5b6d0e465 in (anonymous namespace)::DispatcherWrapper::doDispatch(GafferDispatch::Dispatcher::TaskBatch const*) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatchBindings.so
GafferHQ#39 0x00007fc5b6a930c5 in GafferDispatch::Dispatcher::dispatch(std::vector<boost::intrusive_ptrGaffer::Node, std::allocator<boost::intrusive_ptrGaffer::Node > > const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatch.so
GafferHQ#40 0x00007fc5b6d14f46 in (anonymous namespace)::dispatch(GafferDispatch::Dispatcher&, boost::python::api::object) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatchBindings.so
GafferHQ#41 0x00007fc5b6d179dc in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<void ()(GafferDispatch::Dispatcher&, boost::python::api::object), boost::python::default_call_policies, boost::mpl::vector3<void, GafferDispatch::Dispatcher&, boost::python::api::object> > >::operator()(_object, _object*) ()
---Type to continue, or q to quit---
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferDispatchBindings.so
GafferHQ#42 0x00007fc5c03da171 in boost::python::objects::function::call(_object*, _object*) const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#43 0x00007fc5c03da5f8 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#44 0x00007fc5c03e2fd3 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#45 0x00007fc5be3e7527 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<IECore::Exception, void ()(IECore::Exception const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(IECore::Exception const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libIECorePython.so
GafferHQ#46 0x00007fc5c03e2d93 in boost::python::handle_exception_impl(boost::function0) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#47 0x00007fc5c03d82e8 in function_call () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#48 0x00007fc5c4037953 in PyObject_Call (func=0x2719030, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#49 0x00007fc5c40e6a79 in do_call (nk=, na=, pp_stack=0x7fff5f4c6128, func=0x2719030) at Python/ceval.c:4239
GafferHQ#50 call_function (oparg=, pp_stack=0x7fff5f4c6128) at Python/ceval.c:4044
GafferHQ#51 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#52 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c6278, func=0x33fd230) at Python/ceval.c:4107
GafferHQ#53 call_function (oparg=, pp_stack=0x7fff5f4c6278) at Python/ceval.c:4042
GafferHQ#54 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#55 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x33f1e30, globals=, locals=, args=, argcount=2, kws=0x7fc5c458b068, kwcount=0, defs=0x0, defcount=0,
closure=0x0) at Python/ceval.c:3253
GafferHQ#56 0x00007fc5c4066f18 in function_call (func=0x33fd7d0, arg=0x61d6b90, kw=0x8650230) at Objects/funcobject.c:526
GafferHQ#57 0x00007fc5c4037953 in PyObject_Call (func=0x33fd7d0, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#58 0x00007fc5c40e5dc6 in ext_do_call (nk=102591376, na=, flags=, pp_stack=0x7fff5f4c6548, func=0x33fd7d0) at Python/ceval.c:4334
GafferHQ#59 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2705
GafferHQ#60 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x2642130, globals=, locals=, args=, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3253
GafferHQ#61 0x00007fc5c4066e11 in function_call (func=0x2647398, arg=0x61d6098, kw=0x0) at Objects/funcobject.c:526
GafferHQ#62 0x00007fc5c4037953 in PyObject_Call (func=0x2647398, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#63 0x00007fc5c404a07f in instancemethod_call (func=0x2647398, arg=0x61d6098, kw=0x0) at Objects/classobject.c:2602
GafferHQ#64 0x00007fc5c4037953 in PyObject_Call (func=0x430b730, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#65 0x00007fc5c40a40fc in slot_tp_call (self=0x7e30750, args=0x61e1bd0, kwds=0x0) at Objects/typeobject.c:5432
GafferHQ#66 0x00007fc5c4037953 in PyObject_Call (func=0x7e30750, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#67 0x00007fc5c40e0da3 in PyEval_CallObjectWithKeywords (func=0x7e30750, arg=0x61e1bd0, kw=) at Python/ceval.c:3890
GafferHQ#68 0x00007fc5c4103f2a in PyEval_CallFunction (obj=0x7e30750, format=) at Python/modsupport.c:557
GafferHQ#69 0x00007fc5b57de158 in boost::detail::function::function_obj_invoker1<GafferBindings::Detail::Slot<boost::signal<bool (boost::python::api::object), GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> >, GafferBindings::DefaultSlotCaller<boost::signal<bool (boost::python::api::object), GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> > > >, bool, boost::python::api::object>::invoke(boost::detail::function::function_buffer&, boost::python::api::object) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferUIBindings.so
GafferHQ#70 0x00007fc5b57e2a90 in boost::signal1<bool, boost::python::api::object, GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> >::operator()(boost::python::api::object) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferUIBindings.so
GafferHQ#71 0x00007fc5b57e2cf2 in GafferBindings::Detail::DefaultSignalCallerBase<1, boost::signal<bool (boost::python::api::object), GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> > >::call(boost::signal<bool (boost::python::api::object), GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> >&, boost::python::api::object) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferUIBindings.so
GafferHQ#72 0x00007fc5b57dc7df in boost::python::objects::caller_py_function_impl<boost::python::detail::caller<bool ()(boost::signal<bool (boost::python::api::object), GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> >&, boost::python::api::object), boost::python::default_call_policies, boost::mpl::vector3<bool, boost::signal<bool (boost::python::api::object), GafferUI::EventSignalCombiner, int, std::less, boost::function<bool (boost::python::api::object)> >&, boost::python::api::object> > >::operator()(_object, _object*) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libGafferUIBindings.so
GafferHQ#73 0x00007fc5c03da171 in boost::python::objects::function::call(_object*, _object*) const () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#74 0x00007fc5c03da5f8 in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#75 0x00007fc5c03e2fd3 in boost::python::detail::exception_handler::operator()(boost::function0 const&) const ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#76 0x00007fc5be3e7527 in boost::detail::function::function_obj_invoker2<boost::_bi::bind_t<bool, boost::python::detail::translate_exception<IECore::Exception, void ()(IECore::Exception const&)>, boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<void ()(IECore::Exception const&)> > >, bool, boost::python::detail::exception_handler const&, boost::function0 const&>::invoke(boost::detail::function::function_buffer&, boost::python::detail::exception_handler const&, boost::function0 const&) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libIECorePython.so
GafferHQ#77 0x00007fc5c03e2d93 in boost::python::handle_exception_impl(boost::function0) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
GafferHQ#78 0x00007fc5c03d82e8 in function_call () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libboost_python.so.1.55.0
---Type to continue, or q to quit---
GafferHQ#79 0x00007fc5c4037953 in PyObject_Call (func=0x27d7010, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#80 0x00007fc5c404a07f in instancemethod_call (func=0x27d7010, arg=0x6e02440, kw=0x0) at Objects/classobject.c:2602
GafferHQ#81 0x00007fc5c4037953 in PyObject_Call (func=0x61ca500, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#82 0x00007fc5c40a40fc in slot_tp_call (self=0x7e31e68, args=0x45651d0, kwds=0x0) at Objects/typeobject.c:5432
GafferHQ#83 0x00007fc5c4037953 in PyObject_Call (func=0x7e31e68, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#84 0x00007fc5c40e6a79 in do_call (nk=, na=, pp_stack=0x7fff5f4c7488, func=0x7e31e68) at Python/ceval.c:4239
GafferHQ#85 call_function (oparg=, pp_stack=0x7fff5f4c7488) at Python/ceval.c:4044
GafferHQ#86 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#87 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x313b3b0, globals=, locals=, args=, argcount=1, kws=0x7fc5c458b068, kwcount=0, defs=0x0, defcount=0,
closure=0x0) at Python/ceval.c:3253
GafferHQ#88 0x00007fc5c4066f18 in function_call (func=0x31399b0, arg=0x61d42d0, kw=0x8650110) at Objects/funcobject.c:526
GafferHQ#89 0x00007fc5c4037953 in PyObject_Call (func=0x31399b0, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#90 0x00007fc5c40e5dc6 in ext_do_call (nk=102580944, na=, flags=, pp_stack=0x7fff5f4c7758, func=0x31399b0) at Python/ceval.c:4334
GafferHQ#91 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2705
GafferHQ#92 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x2642130, globals=, locals=, args=, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3253
GafferHQ#93 0x00007fc5c4066e11 in function_call (func=0x2647398, arg=0x61d4310, kw=0x0) at Objects/funcobject.c:526
GafferHQ#94 0x00007fc5c4037953 in PyObject_Call (func=0x2647398, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#95 0x00007fc5c404a07f in instancemethod_call (func=0x2647398, arg=0x61d4310, kw=0x0) at Objects/classobject.c:2602
GafferHQ#96 0x00007fc5c4037953 in PyObject_Call (func=0x5e4ad70, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#97 0x00007fc5c40a40fc in slot_tp_call (self=0x7e30690, args=0x7fc5c458b050, kwds=0x0) at Objects/typeobject.c:5432
GafferHQ#98 0x00007fc5c4037953 in PyObject_Call (func=0x7e30690, arg=, kw=) at Objects/abstract.c:2529
GafferHQ#99 0x00007fc5c40e0da3 in PyEval_CallObjectWithKeywords (func=0x7e30690, arg=0x7fc5c458b050, kw=) at Python/ceval.c:3890
GafferHQ#100 0x00007fc5b0178ba4 in PySide::SignalManager::callPythonMetaMethod(QMetaMethod const&, void**, _object*, bool) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libpyside-python2.7.so.1.2
GafferHQ#101 0x00007fc5b017df68 in PySide::GlobalReceiverV2::qt_metacall(QMetaObject::Call, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libpyside-python2.7.so.1.2
GafferHQ#102 0x00007fc5b4a133fc in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtCore.so.4
GafferHQ#103 0x00007fc5b4415bd2 in QAbstractButton::clicked(bool) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#104 0x00007fc5b4159e3b in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#105 0x00007fc5b415afab in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#106 0x00007fc5b415b21c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#107 0x00007fc5af765f83 in QPushButtonWrapper::mouseReleaseEvent(QMouseEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/python/PySide/QtGui.so
GafferHQ#108 0x00007fc5b3e10a39 in QWidget::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#109 0x00007fc5af763763 in QPushButtonWrapper::event(QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/python/PySide/QtGui.so
GafferHQ#110 0x00007fc5b3dc579c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#111 0x00007fc5b3dcc0f6 in QApplication::notify(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#112 0x00007fc5af3e17a6 in QApplicationWrapper::notify(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/python/PySide/QtGui.so
GafferHQ#113 0x00007fc5b49feafc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtCore.so.4
GafferHQ#114 0x00007fc5b3dcaeae in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) ()
from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#115 0x00007fc5b3e3d62b in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#116 0x00007fc5b3e3bfc8 in QApplication::x11ProcessEvent(XEvent*) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#117 0x00007fc5b3e65e12 in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#118 0x00007fc5b2ca0197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
GafferHQ#119 0x00007fc5b2ca03f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
GafferHQ#120 0x00007fc5b2ca049c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
GafferHQ#121 0x00007fc5b4a2a7d3 in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtCore.so.4
GafferHQ#122 0x00007fc5b3e659ae in ?? () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtGui.so.4
GafferHQ#123 0x00007fc5b49fd992 in QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtCore.so.4
GafferHQ#124 0x00007fc5b49fdcf4 in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtCore.so.4
GafferHQ#125 0x00007fc5b4a02d39 in QCoreApplication::exec() () from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/lib/libQtCore.so.4
GafferHQ#126 0x00007fc5af3e05b5 in Sbk_QApplicationFunc_exec
() from /home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/python/PySide/QtGui.so
GafferHQ#127 0x00007fc5c40e73b9 in call_function (oparg=, pp_stack=0x7fff5f4c9688) at Python/ceval.c:4005
GafferHQ#128 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#129 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c97d8, func=0x307a140) at Python/ceval.c:4107
GafferHQ#130 call_function (oparg=, pp_stack=0x7fff5f4c97d8) at Python/ceval.c:4042
GafferHQ#131 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#132 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c9928, func=0x3409410) at Python/ceval.c:4107
GafferHQ#133 call_function (oparg=, pp_stack=0x7fff5f4c9928) at Python/ceval.c:4042
---Type to continue, or q to quit---
GafferHQ#134 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#135 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c9a78, func=0x2641c80) at Python/ceval.c:4107
GafferHQ#136 call_function (oparg=, pp_stack=0x7fff5f4c9a78) at Python/ceval.c:4042
GafferHQ#137 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#138 0x00007fc5c40e801e in fast_function (nk=, na=, n=, pp_stack=0x7fff5f4c9bc8, func=0x2641b18) at Python/ceval.c:4107
GafferHQ#139 call_function (oparg=, pp_stack=0x7fff5f4c9bc8) at Python/ceval.c:4042
GafferHQ#140 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2666
GafferHQ#141 0x00007fc5c40e911e in PyEval_EvalCodeEx (co=0x7fc5c44ad030, globals=, locals=, args=, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
at Python/ceval.c:3253
GafferHQ#142 0x00007fc5c40e9232 in PyEval_EvalCode (co=, globals=, locals=) at Python/ceval.c:667
GafferHQ#143 0x00007fc5c4108d70 in run_mod (arena=0x1b0e720, flags=0x7fff5f4c9ec0, locals=0x1aee6e0, globals=0x1aee6e0, filename=, mod=0x1b90a50) at Python/pythonrun.c:1365
GafferHQ#144 PyRun_FileExFlags (fp=0x1b72d80, filename=, start=, globals=0x1aee6e0, locals=0x1aee6e0, closeit=1, flags=0x7fff5f4c9ec0) at Python/pythonrun.c:1351
GafferHQ#145 0x00007fc5c4108f4f in PyRun_SimpleFileExFlags (fp=0x1b72d80, filename=0x7fff5f4cb7aa "/home/gafferdev/dev/gaffer/gafferDependencies-0.30.0.0-linux/bin/gaffer.py", closeit=1, flags=0x7fff5f4c9ec0)
at Python/pythonrun.c:943
GafferHQ#146 0x00007fc5c411e9f4 in Py_Main (argc=, argv=) at Modules/main.c:640
GafferHQ#147 0x00007fc5c331a830 in __libc_start_main (main=0x400710

, argc=2, argv=0x7fff5f4c9fe8, init=, fini=, rtld_fini=, stack_end=0x7fff5f4c9fd8)
at ../csu/libc-start.c:291
GafferHQ#148 0x0000000000400649 in _start ()

if( !inPlug()->getInput<ImagePlug>() )
{
throw IECore::Exception( "No input image." );
Expand Down

0 comments on commit 7e8ad35

Please sign in to comment.