You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make modifications to "sample/main.cc" as shown in the figure below,
Then compile and run the program,
$ cd sample
$ make
$ ./sampleApplication
$ ./decompressor decompress compressedLog
What I expected to output is "My number is 987654321123456789", but the actual output is "My number is 987654321987654321". It outputs the integer 987654321 twice but doesn't output the integer 123456789.
On top of that, the decompressor aborted.
adding a comma between the two "%d" specifiers could solve the problem,
I'm confusing and wondering whether this is a bug or not.
The text was updated successfully, but these errors were encountered:
Thanks for the clear examples! I was able to reproduce the issue, and I do believe it is in fact a bug; NanoLog should support logging %d%d as two integers.
I briefly looked at the stack trace, and it appears to be crashing at Log.cc:1405, and I suspect it's due to an alignment issue when reading back the integer arguments.
In any case, I should be able to track down the bug and fix it in a couple of days, so please use the comma alternative for now. Thanks for reporting!
Fixed an issue with the decompressor whereby specifiers without
spaces between them (e.g. "%d%d") would be incorrectly parsed,
causing the decompressor to crash upon decompression.
Make modifications to "sample/main.cc" as shown in the figure below,
Then compile and run the program,
$ cd sample $ make $ ./sampleApplication $ ./decompressor decompress compressedLog
What I expected to output is "My number is 987654321123456789", but the actual output is "My number is 987654321987654321". It outputs the integer 987654321 twice but doesn't output the integer 123456789.
On top of that, the decompressor aborted.
adding a comma between the two "%d" specifiers could solve the problem,
I'm confusing and wondering whether this is a bug or not.
The text was updated successfully, but these errors were encountered: