httpserver crashes

Issue #35 new
Former user created an issue

OS: Windows 10 Pro 1709, 10.0.16299

IDE: Visual Studio Community 2017, Version 15.6.7

Qt: 5.10.1_msvc2017_64

When I try to test normal exiting rather than Ctrl+C for httpserver.exe, it crashed.

int main(int argc, char **argv)
{
    QCoreApplication app(argc, argv);
    QJsonRpcHttpServer rpcServer;
    rpcServer.addService(new TestService);
    if (!rpcServer.listen(QHostAddress::LocalHost, 5555)) {
        qDebug() << "can't start tcp server: " << rpcServer.errorString();
        return -1;
    }

    // Add the following line to test normal exiting rather than Ctrl+C.
    QTimer::singleShot(5000, &app, SLOT(quit()));

    return app.exec();
}

Here is the call stack.

    ntdll.dll!RtlpBreakPointHeap?() Unknown
    ntdll.dll!RtlpValidateHeapEntry()   Unknown
    ntdll.dll!RtlValidateHeap() Unknown
    KernelBase.dll!HeapValidate?()  Unknown
    ucrtbased.dll!_CrtIsValidHeapPointer(const void * block) Line 1407  C++
    ucrtbased.dll!free_dbg_nolock(void * const block, const int block_use) Line 904 C++
    ucrtbased.dll!_free_dbg(void * block, int block_use) Line 1030  C++
    httpserver.exe!operator delete(void * block) Line 36    C++
>   httpserver.exe!QtSharedPointer::ExternalRefCountData::operator delete(void * ptr) Line 167  C++
    [External Code] 
    httpserver.exe!QWeakPointer<QObject>::~QWeakPointer<QObject>() Line 568 C++
    [External Code] 
    httpserver.exe!QSharedDataPointer<QJsonRpcServiceRequestPrivate>::~QSharedDataPointer<QJsonRpcServiceRequestPrivate>() Line 89  C++
    httpserver.exe!QJsonRpcServiceRequest::~QJsonRpcServiceRequest() Line 53    C++
    [External Code] 
    httpserver.exe!QScopedPointerDeleter<QJsonRpcServicePrivate>::cleanup(QJsonRpcServicePrivate * pointer) Line 60 C++
    httpserver.exe!QScopedPointer<QJsonRpcServicePrivate,QScopedPointerDeleter<QJsonRpcServicePrivate> >::~QScopedPointer<QJsonRpcServicePrivate,QScopedPointerDeleter<QJsonRpcServicePrivate> >() Line 107 C++
    httpserver.exe!QJsonRpcService::~QJsonRpcService() Line 164 C++
    [External Code] 
    Qt5Core.dll!QObjectCleanupHandler::clear() Line 138 C++
    Qt5Core.dll!QObjectCleanupHandler::~QObjectCleanupHandler() Line 85 C++
    [External Code] 
    httpserver.exe!QScopedPointerDeleter<QJsonRpcServiceProviderPrivate>::cleanup(QJsonRpcServiceProviderPrivate * pointer) Line 60 C++
    httpserver.exe!QScopedPointer<QJsonRpcServiceProviderPrivate,QScopedPointerDeleter<QJsonRpcServiceProviderPrivate> >::~QScopedPointer<QJsonRpcServiceProviderPrivate,QScopedPointerDeleter<QJsonRpcServiceProviderPrivate> >() Line 107 C++
    httpserver.exe!QJsonRpcServiceProvider::~QJsonRpcServiceProvider() Line 28  C++
    httpserver.exe!QJsonRpcAbstractServer::~QJsonRpcAbstractServer() Line 7 C++
    httpserver.exe!QJsonRpcHttpServer::~QJsonRpcHttpServer() Line 290   C++
    httpserver.exe!main(int argc, char * * argv) Line 35    C++
    [External Code] 

Comments (0)

  1. Log in to comment