nanogui: valgrind log
Subject:
Re: [nanogui] valgrind log
From:
"Greg Haerr" ####@####.####
Date:
10 Mar 2006 01:30:37 +0000
Message-Id: <0f6001c643e2$3ac644e0$6401a8c0@winXP>
When using threads, you must set THREADSAFE=Y in the
config file. This could be the cause of bad write() data below.
The function nxFlushReq is called to flush a buffer of
nano-X client commands queued up to send to the server.
For speed, these aren't sent until a call requiring a server
read (like GrGetNextEvent or GrGetWindowInfo) is called,
or GrFlush() is called. Then, the queued data is sent.
Seems to me you might be having multiple threads unprotectingly
call GrXXX functions at the same time...
Regards,
Greg
: ==22052== Syscall param write(buf) points to uninitialised byte(s)
: ==22052== at 0x499093: __write_nocancel (in /lib/libpthread-2.3.5.so)
: ==22052== by 0x1B930874: nxFlushReq (nxproto.c:179)
: ==22052== by 0x1B92C9D9: ReadBlock (client.c:146)
: ==22052== by 0x1B92CAA0: CheckBlockType (client.c:229)
: ==22052== by 0x1B92FE9F: GrLoadImageFromFile (client.c:267)
: ==22052== by 0x805C5E6: CImage::LoadFromFile(std::string, int,
: int) (Image.cpp:81)
: ==22052== by 0x8062F22: CConfig::PreLoadImages() (Config.cpp:134)
: ==22052== by 0x80626EF: CConfig::CConfig() (Config.cpp:51)
: ==22052== by 0x804A3A0: CWindowManager::init(ICS_NAME_DSCR*)
: (WindowManager.cpp:90)
: ==22052== by 0x804D438: main (VgaUi.cpp:147)
: ==22052== Address 0x1B975572 is 82 bytes inside a block of size 2048
alloc'd
: ==22052== at 0x1B909222: malloc (vg_replace_malloc.c:130)
: ==22052== by 0x1B930842: nxFlushReq (nxproto.c:62)
: ==22052== by 0x1B9308F9: nxAllocReq (nxproto.c:45)
: ==22052== by 0x1B92E785: GrSetPortraitMode (client.c:4351)
: ==22052== by 0x804D314: main (VgaUi.cpp:77)