This looks like a bug in the python interpreter.

The routine setup_context in Python/_warnings.c looks like this.

setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno,
              PyObject **module, PyObject **registry)
{
    PyObject *globals;

    /* Setup globals and lineno. */
    PyFrameObject *f = PyThreadState_GET()->frame;

PyThreadState_GET is a macro defined in Include/pystate.h

#ifdef Py_DEBUG
#define PyThreadState_GET() PyThreadState_Get()
#else
#define PyThreadState_GET() (_PyThreadState_Current)
#endif

Py_DEBUG does not appear to have been defined when this version of
python was  compiled. So the contents of _PyThreadState_Current are used
as a pointer.  Unfortunately it looks like this routine can be called
when it is set to NULL. I put a break on the do_warn function in the
interpreter and  ran hp-systray -g -x. The first time it triggers
(_PyThreadState_Current is non NULL and all is OK. The second time it is
NULL and the crash occurs. This may be because this warning is being
triggered deep in the initialisation code of a python object.

I do not know whether this is a python bug or an hplip bug. Maybe a
python expert can comment on this.

P.S. the python assembly code is heavily inline optimised  by gcc so is
very hard to relate to real line numbers.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/860680

Title:
  systray.py crashed with SIGSEGV

To manage notifications about this bug go to:
https://bugs.launchpad.net/hplip/+bug/860680/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to