aboutsummaryrefslogtreecommitdiff
path: root/src/stable/myriadstream.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2024-08-05 10:40:14 -0700
committerMike Buland <mike@xagasoft.com>2024-08-05 10:40:14 -0700
commite343acc2548fba7670977029da8373a0e58fa25a (patch)
tree3584cbee31d23b4ea4dd8d54545ee092ae5076f3 /src/stable/myriadstream.cpp
parentd344a682170e42ef3ca4e37b397428f9ba5fdb11 (diff)
downloadlibbu++-e343acc2548fba7670977029da8373a0e58fa25a.tar.gz
libbu++-e343acc2548fba7670977029da8373a0e58fa25a.tar.bz2
libbu++-e343acc2548fba7670977029da8373a0e58fa25a.tar.xz
libbu++-e343acc2548fba7670977029da8373a0e58fa25a.zip
Added loads and loads of debugging output to myriad.
There's an issue somewhere sometimes and streams are being truncated. My guess is a multi-threaded issue.
Diffstat (limited to '')
-rw-r--r--src/stable/myriadstream.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stable/myriadstream.cpp b/src/stable/myriadstream.cpp
index b2ed75e..50c6924 100644
--- a/src/stable/myriadstream.cpp
+++ b/src/stable/myriadstream.cpp
@@ -17,6 +17,9 @@
17using Bu::sio; 17using Bu::sio;
18using Bu::Fmt; 18using Bu::Fmt;
19#endif 19#endif
20#include "bu/sio.h"
21
22#define TRACE( x ) Bu::println("%1:%2: %3: %4 - %5").arg(__FILE__).arg( __LINE__ ).arg(__PRETTY_FUNCTION__).arg(rMyriad.sStore.getLocation()).arg(x)
20 23
21Bu::MyriadStream::MyriadStream( Bu::Myriad &rMyriad, 24Bu::MyriadStream::MyriadStream( Bu::Myriad &rMyriad,
22 Bu::Myriad::Stream *pStream ) : 25 Bu::Myriad::Stream *pStream ) :
@@ -205,7 +208,9 @@ Bu::size Bu::MyriadStream::write( const void *pBuf, Bu::size nBytes )
205 iAmnt 208 iAmnt
206 ); 209 );
207 iPos += iAmnt; 210 iPos += iAmnt;
211 TRACE(Bu::String("Stream=%1 - pStream->iSize(%2) += iAmnt(%3)").arg(pStream->iId).arg( pStream->iSize ).arg(iAmnt).end());
208 pStream->iSize += iAmnt; 212 pStream->iSize += iAmnt;
213 TRACE(Bu::String("Stream=%1 - pStream->iSize = %2").arg(pStream->iId).arg( pStream->iSize ).end());
209 rMyriad.headerChanged(); 214 rMyriad.headerChanged();
210 pBuf = &((char *)pBuf)[iAmnt]; 215 pBuf = &((char *)pBuf)[iAmnt];
211 iLeft -= iAmnt; 216 iLeft -= iAmnt;