Skip to content

Building for 32-bit Python 3.6 #1103

@gvanem

Description

@gvanem

The project title says:

A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies

But it seems the bundled CPython 3.8 is required for this cool project. And in 64-bit mode (?).
Not what I'd call minimal dependencies.

So I cooked up a GNU-makefile to build it all with MSVC and/or clang-cl, 32-bit. Besides
a ton of warnings from clang-cl, the PureImGui.exe program runs fine, but the DearSandbox.exe and
any Python-script does not.

So when building everything for _DEBUG-mode (option -MDd), I at-least get some sensible call-stacks.
Running this:

import dearpygui.dearpygui as dpg
...

crashes at a NULL-ptr read (edx=00000000):

python36_d!PyUnicode_InternInPlace+0xa3:
63e2b923 8a4215          mov     al,byte ptr [edx+15h]     

And this call-stack:

python36_d!PyUnicode_InternInPlace(struct _object ** p = 0x005ee5c0)+0xa3
python36_d!PyUnicode_InternFromString(char * cp = 0x6404e690 "__getattribute__")+0x26
python36_d!init_slotdefs(void)+0x77
python36_d!add_operators(struct _typeobject * type = 0x640f1030)+0x17
python36_d!PyType_Ready(struct _typeobject * type = 0x640f1030)+0x1c1
python36_d!PyType_Ready(struct _typeobject * type = 0x64c8f050)+0x111
_dearpygui!PyInit__dearpygui(void)+0xa1
python36!_PyImport_LoadDynamicModuleWithSpec(struct _object * spec = 0x0186ab50)+0x123
python36!_imp_create_dynamic_impl(struct _object * spec = 0x0186ab50, struct _object * file = 0x00000000)+0xe4
python36!_imp_create_dynamic(struct _object * module = 0x00fe3e40, struct _object * args = 0x01861230)+0x38
python36!PyCFunction_Call(struct _object * func = 0x00ffb238, struct _object * args = 0x01861230, struct _object * kwds = 0x0175e7e0)+0x125
python36!do_call_core(struct _object * func = 0x00ffb238, struct _object * callargs = 0x01861230, struct _object * kwdict = 0x0175e7e0)+0xa9
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x016cce40, int throwflag = 0)+0x27ac
python36!PyEval_EvalFrameEx+0x13
python36!_PyEval_EvalCodeWithName(struct _object * _co = 0x00fdb910, struct _object * globals = <Value unavailable error>, struct _object * locals = 0x00000000, struct _object ** args = 0x0168f31c, int argcount = 2, struct _object ** kwnames = 0x00000000, struct _object ** kwargs = 0x0168f324, int kwcount = 0, int kwstep = 1, struct _object ** defs = 0x00000000, int defcount = 0, struct _object * kwdefs = 0x00000000, struct _object * closure = 0x00000000, struct _object * name = 0x00fb6ad8, struct _object * qualname = 0x00fb6ad8)+0x735
python36!fast_function(struct _object * func = 0x016cce40, struct _object ** stack = 0x0168f31c, int nargs = 0xfdb910, struct _object * kwnames = 0x00000000)+0xd4
python36!call_function(struct _object *** pp_stack = 0x005ee90c, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x0168f1d0, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x00ff971c, int nargs = 2, struct _object * globals = 0x00fff570)+0x5a
python36!fast_function(struct _object * func = 0x01014a08, struct _object ** stack = 0x00ff9714, int nargs = 2, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005ee9f4, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x00ff95d0, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x0189248c, int nargs = 1, struct _object * globals = 0x00fef4b0)+0x5a
python36!fast_function(struct _object * func = 0x00ff84f8, struct _object ** stack = 0x01892488, int nargs = 1, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005eeadc, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x01892340, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x0174a814, int nargs = 1, struct _object * globals = 0x00fef4b0)+0x5a
python36!fast_function(struct _object * func = 0x00ff8618, struct _object ** stack = 0x0174a810, int nargs = 1, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005eebc4, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x0174a6b0, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x0188463c, int nargs = 2, struct _object * globals = 0x00fef4b0)+0x5a
python36!fast_function(struct _object * func = 0x00ff8ed0, struct _object ** stack = 0x01884634, int nargs = 2, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005eecac, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x018844e0, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x005eed78, int nargs = 2, struct _object * globals = 0x00fef4b0)+0x5a
python36!_PyFunction_FastCallDict(struct _object * func = 0x00ff8f18, struct _object ** args = 0x005eed70, int nargs = 2, struct _object * kwargs = 0x00000000)+0x5d
python36!_PyObject_FastCallDict(struct _object * func = 0x00ff8f18, struct _object ** args = 0x005eed70, int nargs = 2, struct _object * kwargs = 0x00000000)+0x61
python36!_PyObject_CallMethodIdObjArgs(struct _object * callable = 0x00fef480, struct _Py_Identifier * name = 0x65ea498c)+0xa3
python36!PyImport_ImportModuleLevelObject(struct _object * name = 0x0175a410, struct _object * globals = 0x016dfcf0, struct _object * locals = 0x016dfcf0, struct _object * fromlist = 0x65e908c0, int level = 0)+0x1f6
python36!import_name(struct _frame * f = 0x01821418, struct _object * name = 0x0175a410, struct _object * fromlist = 0x65e908c0, struct _object * level = 0x65eae300)+0xc9
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x01821418, int throwflag = 0)+0x21bd
python36!PyEval_EvalFrameEx+0x13
python36!_PyEval_EvalCodeWithName(struct _object * _co = 0x017587b0, struct _object * globals = <Value unavailable error>, struct _object * locals = 0x016dfcf0, struct _object ** args = 0x00000000, int argcount = 0, struct _object ** kwnames = 0x00000000, struct _object ** kwargs = 0x00000000, int kwcount = 0, int kwstep = 2, struct _object ** defs = 0x00000000, int defcount = 0, struct _object * kwdefs = 0x00000000, struct _object * closure = 0x00000000, struct _object * name = 0x00000000, struct _object * qualname = 0x00000000)+0x735
python36!PyEval_EvalCodeEx+0x26
python36!PyEval_EvalCode(struct _object * co = 0x017587b0, struct _object * globals = 0x016dfcf0, struct _object * locals = 0x016dfcf0)+0x29
python36!builtin_exec_impl(struct _object * source = 0x00000000, struct _object * globals = 0x017587b0, struct _object * locals = 0x01821418)+0x116
python36!builtin_exec(struct _object * module = 0x00fcc4b0, struct _object * args = 0x0175dd78)+0x46
python36!PyCFunction_Call(struct _object * func = 0x00fc8d78, struct _object * args = 0x0175dd78, struct _object * kwds = 0x01720300)+0x125
python36!do_call_core(struct _object * func = 0x00fc8d78, struct _object * callargs = 0x0175dd78, struct _object * kwdict = 0x01720300)+0xa9
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x016cc030, int throwflag = 0)+0x27ac
python36!PyEval_EvalFrameEx+0x13
python36!_PyEval_EvalCodeWithName(struct _object * _co = 0x00fdb910, struct _object * globals = <Value unavailable error>, struct _object * locals = 0x00000000, struct _object ** args = 0x01043b8c, int argcount = 3, struct _object ** kwnames = 0x00000000, struct _object ** kwargs = 0x01043b98, int kwcount = 0, int kwstep = 1, struct _object ** defs = 0x00000000, int defcount = 0, struct _object * kwdefs = 0x00000000, struct _object * closure = 0x00000000, struct _object * name = 0x00fb6ad8, struct _object * qualname = 0x00fb6ad8)+0x735
python36!fast_function(struct _object * func = 0x016cc030, struct _object ** stack = 0x01043b8c, int nargs = 0xfdb910, struct _object * kwnames = 0x00000000)+0xd4
python36!call_function(struct _object *** pp_stack = 0x005ef134, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x01043a40, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x01671618, int nargs = 2, struct _object * globals = 0x00fff570)+0x5a
python36!fast_function(struct _object * func = 0x01014300, struct _object ** stack = 0x01671610, int nargs = 2, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005ef21c, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x016714c8, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x01049814, int nargs = 1, struct _object * globals = 0x00fef4b0)+0x5a
python36!fast_function(struct _object * func = 0x00ff8618, struct _object ** stack = 0x01049810, int nargs = 1, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005ef304, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x010496b0, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x0107895c, int nargs = 2, struct _object * globals = 0x00fef4b0)+0x5a
python36!fast_function(struct _object * func = 0x00ff8ed0, struct _object ** stack = 0x01078954, int nargs = 2, struct _object * kwnames = 0x00000000)+0x51
python36!call_function(struct _object *** pp_stack = 0x005ef3ec, int oparg = <Value unavailable error>, struct _object * kwnames = 0x00000000)+0x157
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x01078800, int throwflag = 0)+0xb00
python36!PyEval_EvalFrameEx+0x10
python36!_PyFunction_FastCall(struct PyCodeObject * co = <Value unavailable error>, struct _object ** args = 0x005ef4b8, int nargs = 2, struct _object * globals = 0x00fef4b0)+0x5a
python36!_PyFunction_FastCallDict(struct _object * func = 0x00ff8f18, struct _object ** args = 0x005ef4b0, int nargs = 2, struct _object * kwargs = 0x00000000)+0x5d
python36!_PyObject_FastCallDict(struct _object * func = 0x00ff8f18, struct _object ** args = 0x005ef4b0, int nargs = 2, struct _object * kwargs = 0x00000000)+0x61
python36!_PyObject_CallMethodIdObjArgs(struct _object * callable = 0x00fef480, struct _Py_Identifier * name = 0x65ea498c)+0xa3
python36!PyImport_ImportModuleLevelObject(struct _object * name = 0x01065b90, struct _object * globals = 0x01032c60, struct _object * locals = 0x01032c60, struct _object * fromlist = 0x65e908c0, int level = 0)+0x1f6
python36!import_name(struct _frame * f = 0x00fb3cb0, struct _object * name = 0x01065b90, struct _object * fromlist = 0x65e908c0, struct _object * level = 0x65eae300)+0xc9
python36!_PyEval_EvalFrameDefault(struct _frame * f = 0x00fb3cb0, int throwflag = 0)+0x21bd
python36!PyEval_EvalFrameEx+0x13
python36!_PyEval_EvalCodeWithName(struct _object * _co = 0x01674808, struct _object * globals = <Value unavailable error>, struct _object * locals = 0x01032c60, struct _object ** args = 0x00000000, int argcount = 0, struct _object ** kwnames = 0x00000000, struct _object ** kwargs = 0x00000000, int kwcount = 0, int kwstep = 2, struct _object ** defs = 0x00000000, int defcount = 0, struct _object * kwdefs = 0x00000000, struct _object * closure = 0x00000000, struct _object * name = 0x00000000, struct _object * qualname = 0x00000000)+0x735
python36!PyEval_EvalCodeEx+0x25
python36!PyEval_EvalCode+0x25
python36!run_mod(struct _mod * mod = <Value unavailable error>, struct _object * filename = <Value unavailable error>, struct _object * globals = 0x01032c60, struct _object * locals = 0x01032c60, struct PyCompilerFlags * flags = 0x005ef730, struct _arena * arena = 0x00fd3180)+0x46
python36!PyRun_FileExFlags(struct _iobuf * fp = 0x00903dc0, char * filename_str = 0x010730a0 "F:\MingW32\src\GUI\DearPyGui\test-2.py", int start = 0x101, struct _object * globals = 0x01032c60, struct _object * locals = 0x01032c60, int closeit = 1, struct PyCompilerFlags * flags = 0x005ef730)+0xb3
...

I do not have the .c-files for Python 3.6, but the last point before the crash is at mvModule_DearPyGui.cpp, line 108:

    PyObject* m;
    PymvBufferType.tp_new = PyType_GenericNew;
    if (PyType_Ready(&PymvBufferType) < 0)
       return NULL;

Anybody have a clue as to where the problem can be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions