Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #73324
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <roland@rptd.ch> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.035 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'scripts': 0.03; 'programmer': 0.03; 'all?': 0.16; 'args,': 0.16; 'exception?': 0.16; 'filename:fname piece:signature': 0.16; 'integer.': 0.16; 'libraries.': 0.16; 'of)': 0.16; 'optional': 0.16; 'received:192.168.1.20': 0.16; 'subject:skip:m 10': 0.16; 'there?': 0.16; 'url:ch': 0.16; 'later': 0.20; 'memory': 0.22; 'example': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'skip:" 30': 0.26; 'switch': 0.26; 'this:': 0.26; 'header:In- Reply-To:1': 0.27; 'function': 0.29; 'raise': 0.29; 'code': 0.31; 'url:wiki': 0.31; 'loads': 0.31; 'null;': 0.31; 'struct': 0.31; 'know.': 0.32; 'supposed': 0.32; 'run': 0.32; 'maybe': 0.34; 'could': 0.34; 'something': 0.35; 'case,': 0.35; 'but': 0.35; 'application': 0.37; 'so,': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'does': 0.39; 'embedded': 0.39; 'to:addr:python.org': 0.39; 'according': 0.40; 'und': 0.40; 'improved': 0.60; 'signal': 0.60; 'new': 0.61; 'from:charset:utf-8': 0.61; 'soon': 0.63; 'happen': 0.63; 'sincerely': 0.63; 'map': 0.64; 'export': 0.74; 'skip:/ 30': 0.84; 'url:php': 0.85; 'yours': 0.88; 'involved.': 0.91; 'this;': 0.91 |
| Date | Mon, 16 Jun 2014 22:16:16 +0200 |
| From | Roland Plüss <roland@rptd.ch> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: module_traverse segfault |
| References | <539F2603.2020904@rptd.ch> <lnneut$7gd$1@ger.gmane.org> |
| In-Reply-To | <lnneut$7gd$1@ger.gmane.org> |
| X-Enigmail-Version | 1.6 |
| Content-Type | multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WSI3LfKbCNWRAvsCgG3CLkv6RmMHlHvCb" |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11095.1402949787.18130.python-list@python.org> (permalink) |
| Lines | 98 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1402949787 news.xs4all.nl 2839 [2001:888:2000:d::a6]:57201 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:73324 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007fffffffc958 in ?? ()
>> (gdb) bt
>> #0 0x00007fffffffc958 in ?? ()
>> #1 0x00007fffdd2f9ed0 in module_traverse () from
>> /usr/lib64/libpython3.3.so.1.0
>> #2 0x00007fffdd396cc7 in collect_with_callback () from
>> /usr/lib64/libpython3.3.so.1.0
>> #3 0x00007fffdd397738 in PyGC_Collect () from
>> /usr/lib64/libpython3.3.so.1.0
>> #4 0x00007fffdd3808ca in Py_Finalize () from
>> /usr/lib64/libpython3.3.so.1.0
>
> Can you run (some of) the same code in a normal interpreter? If so,
> does it raise an uncaught exception?
Can't, it's fully embedded inside the application and fully loads
C-classes from C-land memory without any files or libraries.
> Was the program supposed to be shutting down when this occurred? Or
> did this happen during 'normal' execution?
Shutting down. It happens though also if I trigger an error for example
using
if( ! PyArg_ParseTuple( args, "iiii", &x1, &y1, &x2, &y2 ) ){
return NULL;
}
and proving for example floats instead of integer.
So it happens as soon as the GC is involved. Could it be a tp_* function
that is marked optional is actually not optional at all? According to
the documentation I need only this:
@@@@@@
typeObject = new sObjectType;
memset( typeObject, 0, sizeof( sObjectType ) );
typeObject->tp_name = "Dragengine.Gui.Graphics.Graphics";
typeObject->tp_basicsize = sizeof( sObjectData );
typeObject->tp_flags = Py_TPFLAGS_DEFAULT;
typeObject->tp_doc = "Graphics Object";
typeObject->tp_methods = vMethodsInstance;
typeObject->tp_new = ( newfunc )spModuleGraphics::cfNew;
typeObject->tp_init = ( initproc )spModuleGraphics::cfInit;
typeObject->tp_dealloc = ( destructor )spModuleGraphics::cfDealoc;
typeObject->ownerClass = this;
PyType_Ready( typeObject );
Py_INCREF( typeObject );
PyModule_AddObject( pPyModule, "Graphics", ( PyObject* )typeObject );
@@@@@@
where sObject is:
@@@@@@
struct sObjectType : public PyTypeObject{
spModuleGraphics *ownerClass;
};
@@@@@@
but maybe the documentation is missing something there?
>
> In any case, switch to 3.4.1 or later for improved gc and finalization.
>
Not in GenToo yet as far as I know.
--
Yours sincerely
Plüss Roland
Leader and Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch/wiki )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )
- As well as various Blender export scripts und game tools
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: module_traverse segfault Roland Plüss <roland@rptd.ch> - 2014-06-16 22:16 +0200
csiph-web