https://bugs.kde.org/show_bug.cgi?id=401512

            Bug ID: 401512
           Summary: kig crashes with simple python script with a failing
                    assertion
           Product: kig
           Version: unspecified
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: crash
          Priority: NOR
         Component: general
          Assignee: david.narv...@computer.org
          Reporter: paol...@dmf.unicatt.it
  Target Milestone: ---

Created attachment 116551
  --> https://bugs.kde.org/attachment.cgi?id=116551&action=edit
kig file that makes kig crash

SUMMARY

kig crashes with:

kig: /usr/include/boost/python/object_core.hpp:422:
boost::python::api::object_base::~object_base(): Assertion `Py_REFCNT(m_ptr) >
0' failed.

when trying to define a simple python script with a numeric label as single
argument and returning a DoubleObject or loading a kig file with such a
construction.

STEPS TO REPRODUCE
1. Download the attachment "refcnt_bug.kig"
2. start kig with

  kig refcnt_bug.kig

OBSERVED RESULT

crash with the message:
kig: /usr/include/boost/python/object_core.hpp:422:
boost::python::api::object_base::~object_base(): Assertion `Py_REFCNT(m_ptr) >
0' failed.


SOFTWARE/OS VERSIONS
I am using a Fedora 29 installation fully updated.
KDE Framework is kf5-5.50
QT5 5.11
boost-devel-1.66.0-14.fc29.x86_64
kig was downloaded from latest Git repository and compiled from source.
Python scripting support was correctly detected.

ADDITIONAL INFORMATION
The failing assert is contained in /usr/include/boost/python/object_core.hpp
a file contained in the Fedora package boost-devel-1.66.0-14.fc29.x86_64:

inline api::object_base::~object_base()
{
    assert( Py_REFCNT(m_ptr) > 0 );
    Py_DECREF(m_ptr);
}

It I comment the assert and recompile everything works apparently fine,
however the value of Py_REFCNT becomse -1 and then gets quite strange values
(seen by adding a printf in place of the assert) indicating memory allocation
problems.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to