View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001318 | Scribus | Scripter | public | 2004-11-16 11:06 | 2005-04-27 03:49 |
Reporter | Assigned To | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | not fixable | ||
Platform | x86 Linux | OS | Fedora Core | OS Version | 1 |
Product Version | 1.2.1cvs | ||||
Summary | 0001318: 'Execute Script' crashes Scribus when built against a thread-enabled Python debug build | ||||
Description | Python debug builds perform some additional checks and tests to 'sanity check' functions. One of these sanity checks aborts due to the way that Scribus creates new interpreters in slotRunScriptFile. Py_NewInterpreter calls PyThreadState_Swap to swap thread states. PyThreadState_Swap (Python/pystate.c:265) calls PyGILState_GetThisThreadState to get the thread state for the running thread, and compares it to the thread state that's being switched to. If they're not the same, it aborts the program. PyGILState_GetThisThreadState appears to use thread-local storage to keep track of the thread state for the thread. I haven't fully unravelled it yet, but that's how it looks. Note this comment in the PyThreadState_Swap function: /* It should not be possible for more than one thread state to be used for a thread. Check this the best we can in debug+ builds. */ Python does not check this in single-threaded builds, nor enforce this restriction. Whether this is because it has no way to check and enforce it, or because it doesn't matter, I don't know. Nonetheless the upshot of all this is that Scribus crashes with a SIGABRT when you try to 'Execute Script' and it has been built against a Python debug build (unless threading was disabled in that Python build). I can only assume that Python is aborting for a good reason. Perhaps this is related to the PyQt issues that have been so frustrating. Apache's mod_python may provide some insight, but I haven't been able to make head or tail of what exactly it's doing yet. | ||||
Tags | No tags attached. | ||||
Patch | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2004-11-16 11:06 |
|
New Issue | |
2004-11-18 06:43 |
|
Note Added: 0002898 | |
2004-11-18 07:15 |
|
Note Added: 0002899 | |
2004-11-18 07:15 |
|
Note Edited: 0002899 | |
2005-04-19 13:57 |
|
Note Added: 0004292 | |
2005-04-27 03:44 |
|
Status | new => assigned |
2005-04-27 03:44 |
|
Assigned To | => ringerc |
2005-04-27 03:48 |
|
Status | assigned => resolved |
2005-04-27 03:48 |
|
Resolution | open => not fixable |
2005-04-27 03:48 |
|
Note Added: 0004427 | |
2005-04-27 03:49 |
|
Status | resolved => closed |