Commit Graph

37387 Commits (2bb19aec989d5964b22f64cc01aa7cbe962e1e6b)

Author SHA1 Message Date
Nat Goodspeed 2bb19aec98 DRTVWR-418, MAINT-6996: Update Mac LLMemory::getCurrentRSS().
Evidently the Mac implementation of LLMemory::getCurrentRSS() goes back to
OS X 10.3, because there was a helpful comment of the form:

------
The API used here is not capable of dealing with 64-bit memory sizes, but is
available before 10.4.

Once we start requiring 10.4, we can use the updated API, which looks like
this:

[new current implementation]

Of course, this doesn't gain us anything unless we start building the viewer
as a 64-bit executable, since that's the only way for our memory allocation to
exceed 2^32.
------

Hey, guess what, we're building 64-bit viewers now!

Thank you, whoever thoughtfully noted that, both for calling out the issue and
sparing us the research. (The comment goes back to Subversion days, so hg
blame shows only the merge-to-release changeset.)
2017-05-02 11:05:13 -04:00
Nat Goodspeed 52899ed62a DRTVWR-418, MAINT-6996: Rationalize LLMemory wrt 64-bit support.
There were two distinct LLMemory methods getCurrentRSS() and
getWorkingSetSize(). It was pointless to have both: on Windows they were
completely redundant; on other platforms getWorkingSetSize() always returned
0. (Amusingly, though the Windows implementations both made exactly the same
GetProcessMemoryInfo() call and used exactly the same logic, the code was
different in the two -- as though the second was implemented without awareness
of the first, even though they were adjacent in the source file.)

One of the actual MAINT-6996 problems was due to the fact that
getWorkingSetSize() returned U32, where getCurrentRSS() returns U64. In other
words, getWorkingSetSize() was both useless *and* wrong. Remove it, and change
its one call to getCurrentRSS() instead.

The other culprit was that in several places, the 64-bit WorkingSetSize
returned by the Windows GetProcessMemoryInfo() call (and by getCurrentRSS())
was explicitly cast to a 32-bit data type. That works only when explicitly or
implicitly (using LLUnits type conversion) scaling the value to kilobytes or
megabytes. When the size in bytes is desired, use 64-bit types instead.

In addition to the symptoms, LLMemory was overdue for a bit of cleanup.

There was a 16K block of memory called reserveMem, the comment on which read:
"reserve 16K for out of memory error handling." Yet *nothing* was ever done
with that block! If it were going to be useful, one would think someone would
at some point explicitly free the block. In fact there was a method
freeReserve(), apparently for just that purpose -- which was never called. As
things stood, reserveMem served only to *prevent* the viewer from ever using
that chunk of memory. Remove reserveMem and the unused freeReserve().

The only function of initClass() and cleanupClass() was to allocate and free
reserveMem. Remove initClass(), cleanupClass() and the LLCommon calls to them.

In a similar vein, there was an LLMemoryInfo::getPhysicalMemoryClamped()
method that returned U32Bytes. Its job was simply to return a size in bytes
that could fit into a U32 data type, returning U32_MAX if the 64-bit value
exceeded 4GB. Eliminate that; change all its calls to getPhysicalMemoryKB()
(which getPhysicalMemoryClamped() used internally anyway). We no longer care
about any platform that cannot handle 64-bit data types.
2017-05-02 10:51:18 -04:00
Nat Goodspeed cdbad842c2 DRTVWR-418: Update llphysicsextensions_source to 504710, _stub to 504712. 2017-04-26 22:29:54 -04:00
Nat Goodspeed 579fd1a958 DRTVWR-418: Update havok-source to build 504680, with Havok fix. 2017-04-26 19:03:52 -04:00
Nat Goodspeed b931fb0c28 Automated merge with ssh://bitbucket.org/lindenlab/viewer64 2017-04-26 18:34:17 -04:00
Nat Goodspeed fad8c7edd7 DRTVWR-418: Binary search for a good size for temp Mac disk image 2017-04-22 19:51:40 -04:00
Nat Goodspeed e4cd2028ea DRTVWR-418: Binary search for a good size for temp Mac disk image 2017-04-22 18:45:18 -04:00
Nat Goodspeed 62ecf70918 DRTVWR-418: Make temporary .sparseimage drive bigger for signing. 2017-04-22 17:37:03 -04:00
Callum Prentice 2a5c47eb08 Automated merge with tip of viewer64 (after it was merged with viewer-release) 2017-04-21 14:32:13 -07:00
Nat Goodspeed 5f6bcaf456 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2017-04-21 16:43:56 -04:00
Callum Prentice 8846f9c7c1 Automated merge with tip of viewer64 2017-04-21 13:39:24 -07:00
Callum Prentice 362ffb2131 Fix windows line endings because it's 2017 and our tools can't deal with it 2017-04-21 13:37:24 -07:00
Callum Prentice b8cf14c51f tweak shutdown procedure for example plugin to match our new methodology 2017-04-21 13:28:47 -07:00
Nat Goodspeed 7a6a2db289 DRTVWR-418: Send address_size with login and viewer stats. 2017-04-21 15:27:10 -04:00
Nat Goodspeed a5247189aa DRTVWR-418: Update to havok-source build 504463. 2017-04-21 12:26:30 -04:00
Nat Goodspeed 504f1db9c9 DRTVWR-418: Update to havok-source build 504455. 2017-04-21 09:12:11 -04:00
Nat Goodspeed e625a65a5b DRTVWR-418: Boost fixed max size of temporary Mac volume
used during construction of the eventual installation .dmg.

With newer 64-bit Havok packages, we need more elbow room on the temporary
volume.
2017-04-20 19:45:17 -04:00
Nat Goodspeed e181166ff8 Automated merge with ssh://bitbucket.org/lindenlab/viewer64 2017-04-20 18:38:54 -04:00
Callum Prentice aa85b420a1 Fix for 32bit builds of example plugin - need an extra parameter for visual studio 2017-04-19 16:59:36 -07:00
Callum Prentice 9dd7c67012 Pull in improvements to LLProcess termination via a commit from Nat Linden here: 4f39500cb4?at=default 2017-04-19 16:50:56 -07:00
Callum Prentice c49eeb9a62 Add back the missing pieces and updated code for the example plugin. It was useful during testing SLPlugin changes. Not shipped with release versions of viewer 2017-04-19 15:59:29 -07:00
Callum Prentice 28824e68ff Turn off message that is expected behavior and will fill up the logs/console 2017-04-19 15:55:26 -07:00
Callum Prentice 95c7feba07 Remove the scary 32bit exception handler that patches kernel32.dll since it was (a) scary, (b) didn't work on 64 bit and (c) likely the cause of a lot of anti-virus false positives 2017-04-19 15:54:26 -07:00
Callum Prentice 45f67f4ed7 Hopeful fix for MAINT-7220 Windows Error Message 'SLPlugin.exe has stopped working ' appears. 2017-04-19 13:22:32 -07:00
Oz Linden f62b550328 increment viewer version to 5.0.5 2017-04-19 15:11:10 -04:00
Oz Linden 37c5150a3c Added tag 5.0.4-release for changeset 022709ef76a3 2017-04-19 15:11:10 -04:00
Callum Prentice 510a753096 Automated merge with head of viewer64 2017-04-06 17:02:10 -07:00
Callum Prentice aee540787a Partial fix for MAINT-7236 Web content does not always respect UI Size preference (pull in new version of Dullahan with improved support) 2017-04-06 17:00:17 -07:00
Nat Goodspeed a83d661250 DRTVWR-418, MAINT-7242: Update viewer64 to KDU 7.9.1 build 504041. 2017-04-06 12:12:35 -04:00
Callum Prentice 2acc472e1e Fix for MAINT-7227 Drop down lists do not close after use in internal web browser. (Surprisingly large amount of changes and new version of Dullahan to support this fix) 2017-04-05 14:34:14 -07:00
Nat Goodspeed 13f8d512ec Automated merge with ssh://bitbucket.org/lindenlab/viewer64 2017-04-03 15:53:53 -04:00
Callum Prentice 510e101627 fix for MAINT-6998 64bit viewer installs to Program Files (x86) by default. - this change also fixes MAINT-5365 Windows viewer uninstall icon is system default not SL logo 2017-03-30 17:36:33 -07:00
AndreyL ProductEngine d5200f0578 Merged in lindenlab/viewer-lynx 2017-03-31 00:17:45 +03:00
Nat Goodspeed e2b56c9bba DRTVWR-418: Eliminate reference to LLParcelSelection::sNullSelection. 2017-03-30 16:13:26 -04:00
Nat Goodspeed b9a2a8b223 Automated merge with ssh://bitbucket.org/lindenlab/viewer64-xcode-8.3 2017-03-30 15:40:22 -04:00
Nat Goodspeed e9fe0714ad DRTVWR-418: Xcode 8.3 complains about LLSafeHandle<T> implementation.
The previous LLSafeHandle<T> implementation declares a static data member of
the template class but provides no (generic) definition, relying on particular
specializations to provide the definition. The data member is a function
pointer, which is called in one of the methods to produce a pointer to a
"null" T instance: that is, a dummy instance to be dereferenced in case the
wrapped T* is null.

Xcode 8.3's version of clang is bothered by the call, in a generic method,
through this (usually) uninitialized pointer. It happens that the only
specializations of LLSafeHandle do both provide definitions. I don't know
whether that's formally valid C++03 or not; but I agree with the compiler: I
don't like it.

Instead of declaring a public static function pointer which each
specialization is required to define, add a protected static method to the
template class. This protected static method simply returns a pointer to a
function-static T instance. This is functionally similar to a static
LLPointer<T> set on demand (as in the two specializations), including lazy
instantiation.

Unlike the previous implementation, this approach prohibits a given
specialization from customizing the "null" instance function. Although there
exist reasonable ways to support that (e.g. a related traits template), I
decided not to complicate the LLSafeHandle implementation to make it more
generally useful. I don't really approve of LLSafeHandle, and don't want to
see it proliferate. It's not clear that unconditionally dereferencing
LLSafeHandle<T> is in any way better than conditionally dereferencing
LLPointer<T>. It doesn't even skip the runtime conditional test; it simply
obscures it. (There exist hints in the code that at one time it might have
immediately replaced any wrapped null pointer value with the pointer to the
"null" instance, obviating the test at dereference time, but this is not the
current functionality. Perhaps it was only ever wishful thinking.)

Remove the corresponding functions and static LLPointers from the two classes
that use LLSafeHandle.
2017-03-30 15:39:47 -04:00
andreykproductengine 7e13f981d2 Add multiline support for MAINT-6959 2017-03-30 21:35:01 +03:00
Mnikolenko Productengine 5e926ece20 MAINT-7245 Use Experience Box in LSL Editor will not show as checked if containing object is in another region 2017-03-30 16:30:01 +03:00
AndreyL ProductEngine f53e142e7d MAINT-7128 Crash in LLDrawable::cleanupReferences - more informative logging 2017-03-30 00:22:36 +03:00
Nat Goodspeed 64581fb8d0 DRTVWR-418: Instead of "Unknown", try be informative about platform.
When a 'family' code isn't recognized, for instance, report the family code.
That should at least clue us in to look up and add an entry for the relevant
family code.
2017-03-29 16:07:58 -04:00
AndreyL ProductEngine d9effe167d Merged in lindenlab/viewer-lynx 2017-03-29 03:15:21 +03:00
andreykproductengine 084f7cf44a MAINT-7257 Added null check for volume manager 2017-03-28 16:24:50 +03:00
andreykproductengine 45dd355d46 MAINT-1858 Fixed camera not looking at avatar if "Editing Appearance" while moving 2017-03-28 13:56:01 +03:00
andreykproductengine 7603eb51c5 Backed out changeset: 50e72280019f 2017-03-28 12:30:20 +03:00
Mnikolenko Productengine f1e00870df MAINT-6980 FIXED Ctrl + Alt + Shift + B does not force a crash on mac 2017-03-28 11:42:17 +03:00
Callum Prentice cb07ca3510 Fix for MAINT-7131 Unable to start the x64 Viewer on Windows 8.1 x64. This appears to be because two of the MS DLLs we ship with the 64 bit viewer are 32bit. Manually replacing them with their 64 bit equivalents allowed the viewer to start on Windows 8.1. The change forces the cmake file which copies the DLLs to look in C:\windows\SysWOW64 for 32 bit versions and C:\windows\system32 for 64 bit versions. (yes really). 2017-03-27 17:11:00 -07:00
Callum Prentice 6d4c737b78 Additional work on : Fix for MAINT-7054 Viewer Crashed when I used Japanese IM. (Drake and Appurist convinced me my initial solution was non-optimal) 2017-03-27 16:20:51 -07:00
Callum Prentice 09003cf405 Fix for MAINT-7054 Viewer Crashed when I used Japanese IM. 2017-03-27 10:59:19 -07:00
Mnikolenko Productengine 5a73e8fc10 MAINT-7238 Change InventoryMarketplaceError text 2017-03-27 15:20:24 +03:00
andreykproductengine f5819240fa MAINT-380 Add "Duplicate" feature into Build-Object sunbmenu 2017-03-24 19:09:54 +02:00