Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75155

Simplecoapclient crashing when using coap://coap.me as Host

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.13.0 Beta 1
    • Fix Version/s: 5.13.0 Beta3
    • Component/s: CoAP
    • Labels:
      None
    • Platform/s:
      Linux/X11
    • Commits:
      a9a0561e52fd6fb4352d3fc178ee549df9add576 (qt/qtcoap/dev)

      Description

      I started the simplecoapclient and tried coap://coap.me in the Host field. Later on I figured out that I have to drop the "coap://" prefix, but w/o prior experiments and using https://codereview.qt-project.org/#/c/258487/ as base line, it took me some time. Nevertheless, the example should not crash.

       

      Thread 3 "QThread" received signal SIGABRT, Aborted.
      [Switching to Thread 0x7fffeb205700 (LWP 22080)]
      __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
      (gdb) bt
      #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1 0x00007ffff57ed801 in __GI_abort () at abort.c:79
      #2 0x00007ffff5fcb6c2 in qt_message_fatal (context=..., message=...) at global/qlogging.cpp:1901
      #3 0x00007ffff5fcc321 in QMessageLogger::fatal (this=this@entry=0x7fffeb204570,
      msg=msg@entry=0x7ffff62e2f30 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:887
      #4 0x00007ffff5fc4cfd in qt_assert (assertion=assertion@entry=0x7ffff6732f73 "uri.port() != -1",
      file=file@entry=0x7ffff6732efc "qcoapinternalrequest.cpp", line=line@entry=430) at global/qglobal.cpp:3247
      #5 0x00007ffff671ac28 in QCoapInternalRequest::addUriOptions (this=this@entry=0x7fffdc004f50, uri=..., proxyUri=...)
      at qcoapinternalrequest.cpp:430
      #6 0x00007ffff671b1c7 in QCoapInternalRequest::QCoapInternalRequest (this=0x7fffdc004f50, request=..., parent=<optimized out>)
      at qcoapinternalrequest.cpp:90
      #7 0x00007ffff6724995 in QSharedPointer<QCoapInternalRequest>::create<QCoapRequest, QCoapProtocol*> ()
      at /home/ablasche/dev/qt/qt513/qtbase/include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:445
      #8 QCoapProtocol::sendRequest (this=0x5555557bc4e0, reply=..., connection=<optimized out>) at qcoapprotocol.cpp:135
      #9 0x00007ffff672554e in QCoapProtocol::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>,
      _a=<optimized out>) at .moc/moc_qcoapprotocol.cpp:140
      #10 0x00007ffff61e1f9a in QMetaCallEvent::placeMetaCall (this=0x555555880a20, object=0x5555557bc4e0) at kernel/qobject.cpp:520
      #11 0x00007ffff61e77bf in QObject::event (this=0x5555557bc4e0, e=<optimized out>) at kernel/qobject.cpp:1260
      #12 0x00007ffff7648fc3 in QApplicationPrivate::notify_helper (this=this@entry=0x555555783220,
      receiver=receiver@entry=0x5555557bc4e0, e=e@entry=0x555555880a20) at kernel/qapplication.cpp:3739
      #13 0x00007ffff765065a in QApplication::notify (this=0x7fffffffda80, receiver=0x5555557bc4e0, e=0x555555880a20)
      at kernel/qapplication.cpp:3096
      #14 0x00007ffff61b1f2b in QCoreApplication::notifyInternal2 (receiver=0x5555557bc4e0, event=0x555555880a20)
      at kernel/qcoreapplication.cpp:1060
      #15 0x00007ffff61b218e in QCoreApplication::sendEvent (receiver=receiver@entry=0x5555557bc4e0, event=event@entry=0x555555880a20)
      at kernel/qcoreapplication.cpp:1457
      #16 0x00007ffff61b46fc in QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0,
      data=0x5555557e6e20) at kernel/qcoreapplication.cpp:1807
      #17 0x00007ffff61b4d66 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0)
      at kernel/qcoreapplication.cpp:1661
      #18 0x00007ffff6213d4a in postEventSourceDispatch (s=0x7fffdc004ba0) at kernel/qeventdispatcher_glib.cpp:277
      #19 0x00007ffff3939387 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      #20 0x00007ffff39395c0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      #21 0x00007ffff393964c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
      #22 0x00007ffff621364a in QEventDispatcherGlib::processEvents (this=0x7fffdc000b20, flags=...)
      at kernel/qeventdispatcher_glib.cpp:423
      #23 0x00007ffff61afc89 in QEventLoop::processEvents (this=this@entry=0x7fffeb204e20, flags=..., flags@entry=...)
      at kernel/qeventloop.cpp:138
      #24 0x00007ffff61b00d7 in QEventLoop::exec (this=this@entry=0x7fffeb204e20, flags=flags@entry=...) at kernel/qeventloop.cpp:225
      #25 0x00007ffff5fd5684 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
      #26 0x00007ffff5fd5713 in QThread::run (this=<optimized out>) at thread/qthread.cpp:598
      #27 0x00007ffff5fd7073 in QThreadPrivate::start (arg=0x5555557bc490) at thread/qthread_unix.cpp:364
      #28 0x00007ffff55956db in start_thread (arg=0x7fffeb205700) at pthread_create.c:463
      #29 0x00007ffff58ce88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

        Attachments

        For Gerrit Dashboard: QTBUG-75155
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            sonakur Sona Kurazyan
            Reporter:
            ablasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes