Project

General

Profile

Actions

Bug #2619

closed

Crash in WtReply

Added by Mark Snelling about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/29/2014
Due date:
% Done:

0%

Estimated time:

Description

I believe there is a problem in the WtReply class that is causing my application to crash. When I load the application into the debugger at the point of the crash ( WtReply::consumeWebSocketMessage at WtReply.C:292) I can see that the connection pointer is empty and the library is attempting to call the server() method on the connection.

    ConnectionPtr connection = getConnection();
    connection->server()->service().post
      (boost::bind(cb, Wt::WebRequest::MessageEvent));

When I check the call stack to the previous function WtReply::readWebSocketMessage I can see that the WtReply::consumeWebSocketMessage is called when the connection instance returned by getConnection() is empty.

  if (!connection) {
    /*
     * Simulate a connection_close to the application
     */
    Buffer b;
    consumeWebSocketMessage(connection_close, b.begin(), b.begin(),
                Request::Complete);
  } else {
  ...

So if getConnection() in the calling function returns an empty connection it follows that getConnection() will also return an empty connection in consumeWebSocketMessage(). This looks like a bug to me, there should be checks on the connection instance returned by getConnection() in WtReply::consumeWebSocketMessage to avoid this scenario.

#1

Updated by Koen Deforche about 11 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche
  • Target version set to 3.3.2
#2

Updated by Koen Deforche about 11 years ago

  • Status changed from Feedback to Resolved
#4

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF