Changeset 4605 for vtkvis


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

Merge crash fix from r4422 in trunk

Location:
vtkvis/branches/1.7
Files:
4 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;
  • vtkvis/branches/1.7/Trace.cpp

    r3615 r4605  
    8888}
    8989
    90 const char *
     90std::string
    9191VtkVis::getUserMessages()
    9292{
    93     return g_UserErrorString.str().c_str();
     93    return g_UserErrorString.str();
    9494}
    9595
  • vtkvis/branches/1.7/Trace.h

    r3615 r4605  
    99#define VTKVIS_TRACE_H
    1010
     11#include <string>
     12
    1113#include <syslog.h>
    1214
     
    1517extern void logUserMessage(const char* format, ...);
    1618
    17 extern const char *getUserMessages();
     19extern std::string getUserMessages();
    1820
    1921extern void clearUserMessages();
Note: See TracChangeset for help on using the changeset viewer.