{"action":"created","issue":{"url":"https://api.github.com/repos/feddischson/swig_qt/issues/1","repository_url":"https://api.github.com/repos/feddischson/swig_qt","labels_url":"https://api.github.com/repos/feddischson/swig_qt/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/feddischson/swig_qt/issues/1/comments","events_url":"https://api.github.com/repos/feddischson/swig_qt/issues/1/events","html_url":"https://github.com/feddischson/swig_qt/issues/1","id":178514355,"number":1,"title":"Error while running example.","user":{"login":"autosquid","id":758925,"avatar_url":"https://avatars.githubusercontent.com/u/758925?v=3","gravatar_id":"","url":"https://api.github.com/users/autosquid","html_url":"https://github.com/autosquid","followers_url":"https://api.github.com/users/autosquid/followers","following_url":"https://api.github.com/users/autosquid/following{/other_user}","gists_url":"https://api.github.com/users/autosquid/gists{/gist_id}","starred_url":"https://api.github.com/users/autosquid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosquid/subscriptions","organizations_url":"https://api.github.com/users/autosquid/orgs","repos_url":"https://api.github.com/users/autosquid/repos","events_url":"https://api.github.com/users/autosquid/events{/privacy}","received_events_url":"https://api.github.com/users/autosquid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-22T03:35:37Z","updated_at":"2016-09-22T04:53:50Z","closed_at":null,"body":"Hi @feddischson , \r\n\r\nMany thanks to your qt python swig binding, and it helped me a lot\r\n\r\nHowever, I met a problem with qapplication.\r\n\r\n\r\nI include your binding in another module, and run your example. here is what I got:\r\n\r\n```\r\nHey, this also works: It is a <__main__.MyCustomQtClass; proxy of <Swig Object of type 'QObject *' at 0x109e90390> >\r\n<prtex.QString; proxy of <Swig Object of type 'QString *' at 0x109e90690> >\r\n<prtex.QObject; proxy of <Swig Object of type 'QObject *' at 0x109e90360> >\r\nIsWidgetType: False\r\nIsWindowType: False\r\nIsWidgetType: True\r\nIsWindowType: False\r\n[1]    46206 segmentation fault  python test_qt_binding.py\r\n````\r\n\r\nwhere  `test_qt_binding.py` is renamed from your example python file.\r\n\r\nHere is (part of) the mac error log:\r\n\r\n\r\n```\r\nCrashed Thread:        0  Dispatch queue: com.apple.main-thread\r\n\r\nException Type:        EXC_BAD_ACCESS (SIGSEGV)\r\nException Codes:       KERN_INVALID_ADDRESS at 0x0000002b00000000\r\n\r\nVM Regions Near 0x2b00000000:\r\n    VM_ALLOCATE            00000001159c6000-00000001159c7000 [    4K] rw-/rwx SM=ALI  \r\n--> \r\n    STACK GUARD            0000700000000000-0000700000001000 [    4K] ---/rwx SM=NUL  stack guard for thread 1\r\n\r\nThread 0 Crashed:: Dispatch queue: com.apple.main-thread\r\n0   libsystem_c.dylib             \t0x00007fff91c56132 strlen + 18\r\n1   org.qt-project.QtCore         \t0x000000010c917ac7 QCoreApplication::arguments() + 199\r\n2   libqcocoa.dylib               \t0x0000000112b392db -[QCocoaApplicationDelegate application:openFiles:] + 251\r\n3   com.apple.AppKit              \t0x00007fff8d05b0d9 -[NSApplication _doOpenFile:ok:tryTemp:] + 248\r\n4   com.apple.AppKit              \t0x00007fff8cc0052d -[NSApplication finishLaunching] + 1557\r\n5   com.apple.AppKit              \t0x00007fff8cbffbbd -[NSApplication run] + 231\r\n6   libqcocoa.dylib               \t0x0000000112b3652f QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2191\r\n7   org.qt-project.QtCore         \t0x000000010c9119d1 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 417\r\n8   org.qt-project.QtCore         \t0x000000010c915e85 QCoreApplication::exec() + 341\r\n9   _prtex.so                     \t0x000000010aa74b61 _wrap_QApplication__exec(_object*, _object*) + 33\r\n10  org.python.python             \t0x0000000109a1953a PyEval_EvalFrameEx + 27019\r\n11  org.python.python             \t0x0000000109a129bf PyEval_EvalCodeEx + 1618\r\n12  org.python.python             \t0x0000000109a12367 PyEval_EvalCode + 48\r\n13  org.python.python             \t0x0000000109a35d0e run_mod + 53\r\n14  org.python.python             \t0x0000000109a35db1 PyRun_FileExFlags + 133\r\n15  org.python.python             \t0x0000000109a35902 PyRun_SimpleFileExFlags + 702\r\n16  org.python.python             \t0x0000000109a4726d Py_Main + 3101\r\n17  libdyld.dylib                 \t0x00007fff8e6b35ad start + 1\r\n```\r\n\r\nIt seems something wrong is passed to ```QCoreApplication::arguments```, but I do not understand why.  Any suggestions?\r\n\r\n\r\nMoreover, I tried to exec. a `QCoreApplication`, and it run without segment fault.\r\n"},"comment":{"url":"https://api.github.com/repos/feddischson/swig_qt/issues/comments/248811991","html_url":"https://github.com/feddischson/swig_qt/issues/1#issuecomment-248811991","issue_url":"https://api.github.com/repos/feddischson/swig_qt/issues/1","id":248811991,"user":{"login":"autosquid","id":758925,"avatar_url":"https://avatars.githubusercontent.com/u/758925?v=3","gravatar_id":"","url":"https://api.github.com/users/autosquid","html_url":"https://github.com/autosquid","followers_url":"https://api.github.com/users/autosquid/followers","following_url":"https://api.github.com/users/autosquid/following{/other_user}","gists_url":"https://api.github.com/users/autosquid/gists{/gist_id}","starred_url":"https://api.github.com/users/autosquid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autosquid/subscriptions","organizations_url":"https://api.github.com/users/autosquid/orgs","repos_url":"https://api.github.com/users/autosquid/repos","events_url":"https://api.github.com/users/autosquid/events{/privacy}","received_events_url":"https://api.github.com/users/autosquid/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T04:53:50Z","updated_at":"2016-09-22T04:53:50Z","body":"I made more seach, and I think it roots from this:\r\n\r\n```\r\nQCoreApplication::QCoreApplication(int &argc, char **argv)\r\n\r\nConstructs a Qt core application. Core applications are applications without a graphical user interface. Such applications are used at the console or as server processes.\r\n\r\nThe argc and argv arguments are processed by the application, and made available in a more convenient form by the arguments() function.\r\n\r\nWarning: The data referred to by argc and argv must stay valid for the entire lifetime of the QCoreApplication object. In addition, argc must be greater than zero and argv must contain at least one valid character string.\r\n```\r\n"}}
{"actor":{"display_login":"autosquid"}}