Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1139] Fixes crash at exit due to thread state (tstate) == NULL #63

Open
wants to merge 639 commits into
base: master
Choose a base branch
from
Open

[#1139] Fixes crash at exit due to thread state (tstate) == NULL #63

wants to merge 639 commits into from

Conversation

jasonmccampbell
Copy link
Contributor

Binding manager's static destructor is triggered after the Python interpreter has
been de-initialized. The destructor destroys any remaining objects and if one of these
objects has a list of weak references, the call to release the weak refs will cause an
abort due to the illegal call back into the Python interpreter. This fix just puts a
guard around the call to skip it if the Python interpreter is no longer initialized.

Marcelo Lira and others added 30 commits July 20, 2011 17:56
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
…odule succeeds"

Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Marcelo Lira <marcelo.lira@openbossa.org>
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
          Lauro Neto <lauro.neto@openbossa.org>
manager exit.

Reviewer: Hugo Parente <hugo.lima@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
…signatures"

Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
The new methods replace the contents of the following type system
variables:

%CONVERTTOPYTHON
%CONVERTTOCPP
%ISCONVERTIBLE
%CHECKTYPE

The replacements were part of the ShibokenGenerator::writeCodeSnips()
method.
…or to Generator Runner.

They were needed by other methods in the Generator class.
…or Runner.

Updated tests' type systems to reflect the behaviour of
Generator::minimalConstructor().
The Shiboken::Module namespace also provides management of module types,
including the communication of types among dependent modules.

Module::create() will call Shiboken::init(), so this can be removed
from the generated module's source code.

This deprecates the old Shiboken::importModule() function.

The generation of module initialization code was updated to use the new
Shiboken::Module functions.
…ule or enclosing class.

The class register writer was updated to use the new
ObjectType::introduceWrapperType().

Types are now created and registered via the introduceWrapperType() function.
I also did a little refactoring on CppGenerator::writeClassRegister.
Also removed the default value for a more explicit use of the method.
Now anyone wanting to get a cppSelf object must go through this method.
The indentation, and everything else about it, was terrible.
Added test for a reference to integer as a function argument.
…ode.

The contents of the new CppGenerator::writeMethodWrapperPreamble()
method were moved from the writers of constructor and method wrappers.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
…lity.

The functions are

CppGenerator::writeRichCompareFunction()
CppGenerator::writeOverloadedFunctionDecisorEngine()

In the case of the last one, the generated code was also improved.
The method in question is CppGenerator::getArgumentType(), and it
resolves any type modification made in the type system.

Also remove an unused convenience method for writeArgumentConversion,
and unused variable on rich comparison writer function.
Marcelo Lira and others added 30 commits December 9, 2011 20:28
Also removed erroneus deletions of said AbstractMetaTypes - they
are kept in a cache and should be deleted only when the generator
is finished.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
…f long.

Using long causes erratic behaviour on linux in 64-bits architectures.
Sometimes.
E.g., when calling QtGui.QShortcut.setKey(QtCore.Qt.CTRL +
QtCore.Qt.Key_Delete) it was being called as
QtGui.QShortcut.setKey(long) (in Python 2) when it should be actually
QtGui.QShortcut.setKey(int). So that resulted in a TypeError exception
when using Python version 2 with that small code.

See http://bugs.pyside.org/show_bug.cgi?id=1097.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
Expanded the Complex type conversion unit test.

Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Paulo Alcantara <pcacjr@gmail.com>
See http://bugs.pyside.org/show_bug.cgi?id=1092.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
When handling typedef'd primitive types we don't need to create indices
for them, nor converters. Instead, we must use the underlying primitive
type converters.

See http://bugs.pyside.org/show_bug.cgi?id=1105.

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
                 constructor crashes if instantiated from QML"

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
compiled with debug as "python2.7-debug" for example. So we also need to
check its suffix as debug, not only as dbg (which is a Debian specific
case).

Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Reviewed-by: Marcelo Lira <marcelo.lira@openbossa.org>
Reviewed-by: Hugo Parente Lima <hugo.pl@gmail.com>
…thon interpreter has

been de-initialized.  The destructor destroys any remaining objects and if one of these
objects has a list of weak references, the call to release the weak refs will cause an
abort due to the illegal call back into the Python interpreter.  This fix just puts a
guard around the call to skip it if the Python interpreter is no longer initialized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants