|
Re: Attempted a typeid of NULL pointer!: msg#00364python.c++
"Baptiste Lepilleur" <gaiacrtn@xxxxxxx> writes: > I've run into the same issue yesterday. I'm using boost 1.30 with MSVC 6. > > This problem arise when trying to obtain a default constructed shared_ptr in > python. It seems that the conversion of a null shared_ptr to None is not > handled. Though, I don't know if this feature is supported (the unit-test > for shared_ptr is too complicated for me to understand). > > > Here is the python code. It only fail when 'statement.elseStatement' is a > NULL shared_ptr. > def visitIfStatement( self, statement ): > self._visitScopedSubstatement( statement.thenStatement ) > > if statement.elseStatement: # C++ property which is a > shared_ptr > self._visitScopedSubstatement( statement.elseStatement ) > --- > File "C:\prg\vc\Rfta\src\pyrfta\test\rfta\codeanalysis.py", line 39, in > visitIfStatement > if statement.elseStatement: > RuntimeError: Attempted a typeid of NULL pointer! > --- > > Notes that using explicit comparison against None also fail: > if None != statement.elseStatement: OK, I'm working on a fix. I'll let you know when it's done. Thanks for the bug reports. [By the way... This is no way to report such a simple bug as simple as this one. In order to use your code I have to fill in lots of missing details, like the definition of ConditionStatement, so I didn't use the code at all. It's not much better than the previous post which gave no information about how to reproduce the problem.] -- Dave Abrahams Boost Consulting www.boost-consulting.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Projects Page Reminder: 00364, Milind Patil |
|---|---|
| Next by Date: | Re: Attempted a typeid of NULL pointer!: 00364, David Abrahams |
| Previous by Thread: | Re: Re: Attempted a typeid of NULL pointer!i: 00364, Baptiste Lepilleur |
| Next by Thread: | Re: Attempted a typeid of NULL pointer!: 00364, David Abrahams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |