Ignore:
Timestamp:
Aug 2, 2014, 12:33:06 AM (10 years ago)
Author:
ldelgass
Message:

Merge crash fix from r4422 in trunk

Location:
vtkvis/branches/1.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vtkvis/branches/1.7

  • vtkvis/branches/1.7/RendererCmd.cpp

    r4604 r4605  
    1262212622            std::ostringstream oss;
    1262312623            oss << "nv>viserror -type internal_error -token " << g_stats.nCommands << " -bytes " << nBytes << "\n" << string;
    12624             nBytes = oss.str().length();
     12624            std::string ostr = oss.str();
     12625            nBytes = ostr.length();
    1262512626
    1262612627#ifdef USE_THREADS
    12627             queueResponse(clientData, oss.str().c_str(), nBytes, Response::VOLATILE, Response::ERROR);
     12628            queueResponse(clientData, ostr.c_str(), nBytes, Response::VOLATILE, Response::ERROR);
    1262812629#else
    12629             if (write(fdOut, oss.str().c_str(), nBytes) < 0) {
     12630            if (write(fdOut, ostr.c_str(), nBytes) < 0) {
    1263012631                ERROR("write failed: %s", strerror(errno));
    1263112632                return -1;
     
    1263512636    }
    1263612637
    12637     string = getUserMessages();
    12638     nBytes = strlen(string);
     12638    std::string msg = getUserMessages();
     12639    nBytes = msg.length();
    1263912640    if (nBytes > 0) {
     12641        string = msg.c_str();
    1264012642        TRACE("userError=(%s)", string);
    1264112643
    1264212644        std::ostringstream oss;
    1264312645        oss << "nv>viserror -type error -token " << g_stats.nCommands << " -bytes " << nBytes << "\n" << string;
    12644         nBytes = oss.str().length();
     12646        std::string ostr = oss.str();
     12647        nBytes = ostr.length();
    1264512648
    1264612649#ifdef USE_THREADS
    12647         queueResponse(clientData, oss.str().c_str(), nBytes, Response::VOLATILE, Response::ERROR);
     12650        queueResponse(clientData, ostr.c_str(), nBytes, Response::VOLATILE, Response::ERROR);
    1264812651#else
    12649         if (write(fdOut, oss.str().c_str(), nBytes) < 0) {
     12652        if (write(fdOut, ostr.c_str(), nBytes) < 0) {
    1265012653            ERROR("write failed: %s", strerror(errno));
    1265112654            return -1;
Note: See TracChangeset for help on using the changeset viewer.