Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-03-19 03:26:41



Reply to topic  [ 3 posts ] 
Copy/paste bug in Cool VL Viewer v1.28.2.56 on Mac. 
Author Message

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
I think I've found a minor bug in Cool VL Viewer v1.28.2.56 running on Mac. Whenever I use Cmd-V to paste a copied string into Local Chat, IM, Note card, or any text field, the final character in the string is lost. This does not happen in v1.28.2.53 on the same machine.
Code:
Cool VL Viewer v1.28.2.56, 64 bits, Jan 23 2022 11:22:21
RestrainedLove viewer v2.09.29.24
Release notes

You are at 164279.4, 327847.7, 28.3  in Retrospect located at
simhost-0fb5f7595f1c9cea9.agni.secondlife.io (52.12.29.136:13051)
Alias: ec2-52-12-29-136.us-west-2.compute.amazonaws.com
Second Life Server 2022-01-06.567269
Release notes

CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (4200 MHz)
Memory: 16384MB
OS version: Mac OS X 10.14.6 Darwin 18.7.0 Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64 x86_64
Memory manager: OS native
Graphics card vendor: ATI Technologies Inc.
Graphics card: AMD Radeon Pro 580 OpenGL Engine
OpenGL version: 2.1 ATI-2.11.26
Detected VRAM: 8101MB
J2C decoder: OpenJPEG: 1.4.0.635f
Audio driver: FMOD Studio v2.02.05
Networking backend: libcurl 7.47.0/OpenSSL 1.0.2u/zlib 1.2.11.zlib-ng
Embedded browser: Dullahan 1.8.0/CEF 3.3626.1895.g7001d56
Packets lost: 637/1059974 (0.1%)

Built with: Clang/LLVM v13.0.0
Compiler-generated maths: SSE3.

Compile flags used for this build:
-O2 -fno-delete-null-pointer-checks -mno-retpoline -mno-retpoline-external-thunk -DNDEBUG -std=c++14 -stdlib=libc++ -fno-threadsafe-statics -pipe -g -fexceptions -fno-strict-aliasing -fvisibility=hidden -fsigned-char -m64 -mfpmath=sse -fno-math-errno -fno-trapping-math -pthread -Wall -Wno-reorder -Wno-deprecated-declarations -Wno-tautological-overlap-compare -DLL_DARWIN=1 -DXML_STATIC -DLL_PHMAP=1 -DOV_EXCLUDE_STATIC_CALLBACKS -DLL_FMOD=1


Attachments:
CoolVLViewer.log.zip [14.53 KiB]
Downloaded 125 times
2022-01-30 06:02:23
Profile

Joined: 2009-03-17 18:42:51
Posts: 5523
Reply with quote
Strange... I did not change a single byte of the copy/paste code for macOS in like... years !

I do not see why there would be any difference between the two versions you cite, unless something changed on the compilation step side. Catten would be able to reply to this question...

In your log, I also see that the viewer crashes on exit in the keyboard handler... Is the previous version producing the same log (i.e. does it crash on exit too) ?

EDIT: the (years old) change that is causing this is a workaround implemented to avoid seeing a 'nul' character appended to the pasted text on macOS. Somehow, this bug won't happen any more with v1.28.2.56 (compiled with a new Xcode version ?) and so the workaround needs to be changed as follow (in linden/indra/llwindow/llwindowmacosx.cpp):

Code:
bool LLWindowMacOSX::pasteTextFromClipboard(LLWString& dst)
{
   llutf16string str(copyFromPBoard());
   dst = utf16str_to_wstring(str);
   // *HACK: there is (sometimes) a spurious 'nul' character appearing at the
   // end of the string returned by copyFromPBoard()... So, let's remove it.
   size_t len = dst.size();
   if (len > 1 && dst[len - 1] == '\0')
   {
      dst = dst.substr(0, len - 1);
   }
   return dst != L"";
}

I.e. instead of unconditionally removing the character, we must now test and see if it indeed is a 'nul' (the added "&& dst[len - 1] == '\0'" test).


2022-01-30 09:51:49
Profile WWW

Joined: 2012-01-19 03:18:40
Posts: 196
Location: Sydney, Australia (UTC +10)
Reply with quote
Henri Beauchamp wrote:
In your log, I also see that the viewer crashes on exit in the keyboard handler... Is the previous version producing the same log (i.e. does it crash on exit too) ?

I didn't notice that my viewer had crashed on exit. I'll have to do some testing.


2022-01-31 01:14:33
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.