Git Product home page Git Product logo

swig_qt's People

Contributors

feddischson avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

swig_qt's Issues

Error while running example.

Hi @feddischson ,

Many thanks to your qt python swig binding, and it helped me a lot

However, I met a problem with qapplication.

I include your binding in another module, and run your example. here is what I got:

Hey, this also works: It is a <__main__.MyCustomQtClass; proxy of <Swig Object of type 'QObject *' at 0x109e90390> >
<prtex.QString; proxy of <Swig Object of type 'QString *' at 0x109e90690> >
<prtex.QObject; proxy of <Swig Object of type 'QObject *' at 0x109e90360> >
IsWidgetType: False
IsWindowType: False
IsWidgetType: True
IsWindowType: False
[1]    46206 segmentation fault  python test_qt_binding.py

where test_qt_binding.py is renamed from your example python file.

Here is (part of) the mac error log:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000002b00000000

VM Regions Near 0x2b00000000:
    VM_ALLOCATE            00000001159c6000-00000001159c7000 [    4K] rw-/rwx SM=ALI  
--> 
    STACK GUARD            0000700000000000-0000700000001000 [    4K] ---/rwx SM=NUL  stack guard for thread 1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_c.dylib               0x00007fff91c56132 strlen + 18
1   org.qt-project.QtCore           0x000000010c917ac7 QCoreApplication::arguments() + 199
2   libqcocoa.dylib                 0x0000000112b392db -[QCocoaApplicationDelegate application:openFiles:] + 251
3   com.apple.AppKit                0x00007fff8d05b0d9 -[NSApplication _doOpenFile:ok:tryTemp:] + 248
4   com.apple.AppKit                0x00007fff8cc0052d -[NSApplication finishLaunching] + 1557
5   com.apple.AppKit                0x00007fff8cbffbbd -[NSApplication run] + 231
6   libqcocoa.dylib                 0x0000000112b3652f QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2191
7   org.qt-project.QtCore           0x000000010c9119d1 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 417
8   org.qt-project.QtCore           0x000000010c915e85 QCoreApplication::exec() + 341
9   _prtex.so                       0x000000010aa74b61 _wrap_QApplication__exec(_object*, _object*) + 33
10  org.python.python               0x0000000109a1953a PyEval_EvalFrameEx + 27019
11  org.python.python               0x0000000109a129bf PyEval_EvalCodeEx + 1618
12  org.python.python               0x0000000109a12367 PyEval_EvalCode + 48
13  org.python.python               0x0000000109a35d0e run_mod + 53
14  org.python.python               0x0000000109a35db1 PyRun_FileExFlags + 133
15  org.python.python               0x0000000109a35902 PyRun_SimpleFileExFlags + 702
16  org.python.python               0x0000000109a4726d Py_Main + 3101
17  libdyld.dylib                   0x00007fff8e6b35ad start + 1

It seems something wrong is passed to QCoreApplication::arguments, but I do not understand why. Any suggestions?

Moreover, I tried to exec. a QCoreApplication, and it run without segment fault.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.