Commit 6718d6dc authored by Kitty Barnett's avatar Kitty Barnett
Browse files

Merged with .Catznip tip

--HG--
branch : Catznip
parents 2fafc800 4497119c
241a5b4e35031f0e73033ae57b1b294a47733888
\ No newline at end of file
f8781f22f9c3a67722bbb56eec4f3562eb71349d
\ No newline at end of file
......@@ -538,6 +538,7 @@ ad0e15543836d64d6399d28b32852510435e344a 5.1.0-release
7b6b020fd5ad9a8dc3670c5c92d1ca92e55fc485 5.1.4-release
2ea47f358b171178eb9a95503a1670d519c2886f 5.1.5-release
04538b8157c1f5cdacd9403f0a395452d4a93689 5.1.6-release
ac3b1332ad4f55b7182a8cbcc1254535a0069f75 5.1.7-release
0000000000000000000000000000000000000000 v2start
0000000000000000000000000000000000000000 alpha-3
0000000000000000000000000000000000000000 fork to viewer-2-0
......@@ -1077,6 +1078,7 @@ ad0e15543836d64d6399d28b32852510435e344a 5.1.0-release
0000000000000000000000000000000000000000 5.1.3-release
0000000000000000000000000000000000000000 5.1.4-release
0000000000000000000000000000000000000000 5.1.5-release
0000000000000000000000000000000000000000 5.1.7-release
4f777ffb99fefdc6497c61385c22688ff149c659 SL-2.0.0
668851b2ef0f8cf8df07a0fba429e4a6c1e70abb SL-2.0.1
b03065d018b8a2e28b7de85b293a4c992cb4c12d SL-2.1.0
......@@ -1204,6 +1206,7 @@ ad0e15543836d64d6399d28b32852510435e344a SL-5.1.0
7b6b020fd5ad9a8dc3670c5c92d1ca92e55fc485 SL-5.1.4
2ea47f358b171178eb9a95503a1670d519c2886f SL-5.1.5
04538b8157c1f5cdacd9403f0a395452d4a93689 SL-5.1.6
ac3b1332ad4f55b7182a8cbcc1254535a0069f75 SL-5.1.7
89532c8dfd5b6c29f1cb032665b44a74a52452e1 RLVa-1.3.0
7bc5039ccf0b36eafbf6ce33a52b5e26332aa04c RLVa-1.3.1
a563f7e215c7883c1cfd20908085687a0ed96284 RLVa-1.4.0
......
......@@ -1632,7 +1632,7 @@
<key>darwin</key>
<map>
<key>archive</key>
<map>
<map>
<key>hash</key>
<string>3855bd40f950e3c22739ae8f3ee2afc9</string>
<key>url</key>
......@@ -1645,10 +1645,10 @@
<map>
<key>archive</key>
<map>
<key>hash</key>
<key>hash</key>
<string>d1521becaf21bf7233173722af63f57d</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/15257/98440/kdu-7.10.4.513518-darwin64-513518.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/15257/98440/kdu-7.10.4.513518-darwin64-513518.tar.bz2</string>
</map>
<key>name</key>
<string>darwin64</string>
......@@ -1657,10 +1657,10 @@
<map>
<key>archive</key>
<map>
<key>hash</key>
<key>hash</key>
<string>43d7a6a69a54534a736f132e9c81795b</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/15255/98451/kdu-7.10.4.513518-linux-513518.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/15255/98451/kdu-7.10.4.513518-linux-513518.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
......@@ -1692,11 +1692,11 @@
<key>windows64</key>
<map>
<key>archive</key>
<map>
<map>
<key>hash</key>
<string>da3b1ea90797b189d80ab5d50fdf05d4</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/15260/98469/kdu-7.10.4.513518-windows64-513518.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/ct2/15260/98469/kdu-7.10.4.513518-windows64-513518.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
......
......@@ -220,7 +220,6 @@ Ansariel Hiller
STORM-2151
MAINT-6917
MAINT-8085
STORM-2122
Aralara Rajal
Arare Chantilly
CHUIBUG-191
......
......@@ -346,6 +346,7 @@ const U8 CLICK_ACTION_OPEN = 4;
const U8 CLICK_ACTION_PLAY = 5;
const U8 CLICK_ACTION_OPEN_MEDIA = 6;
const U8 CLICK_ACTION_ZOOM = 7;
const U8 CLICK_ACTION_DISABLED = 8;
// DO NOT CHANGE THE SEQUENCE OF THIS LIST!!
......
......@@ -35,6 +35,7 @@
// external library headers
#include <boost/bind.hpp>
// other Linden headers
#include "lltimer.h"
#include "llevents.h"
#include "llerror.h"
#include "stringize.h"
......@@ -280,6 +281,25 @@ void LLCoros::setStackSize(S32 stacksize)
mStackSize = stacksize;
}
void LLCoros::printActiveCoroutines()
{
LL_INFOS("LLCoros") << "Number of active coroutines: " << (S32)mCoros.size() << LL_ENDL;
if (mCoros.size() > 0)
{
LL_INFOS("LLCoros") << "-------------- List of active coroutines ------------";
CoroMap::iterator iter;
CoroMap::iterator end = mCoros.end();
F64 time = LLTimer::getTotalSeconds();
for (iter = mCoros.begin(); iter != end; iter++)
{
F64 life_time = time - iter->second->mCreationTime;
LL_CONT << LL_NEWLINE << "Name: " << iter->first << " life: " << life_time;
}
LL_CONT << LL_ENDL;
LL_INFOS("LLCoros") << "-----------------------------------------------------" << LL_ENDL;
}
}
#if LL_WINDOWS
static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific
......@@ -375,7 +395,8 @@ LLCoros::CoroData::CoroData(CoroData* prev, const std::string& name,
mCoro(boost::bind(toplevel, _1, this, callable), stacksize),
// don't consume events unless specifically directed
mConsuming(false),
mSelf(0)
mSelf(0),
mCreationTime(LLTimer::getTotalSeconds())
{
}
......@@ -384,7 +405,13 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
std::string name(generateDistinctName(prefix));
Current current;
// pass the current value of Current as previous context
CoroData* newCoro = new CoroData(current, name, callable, mStackSize);
CoroData* newCoro = new(std::nothrow) CoroData(current, name, callable, mStackSize);
if (newCoro == NULL)
{
// Out of memory?
printActiveCoroutines();
LL_ERRS("LLCoros") << "Failed to start coroutine: " << name << " Stacksize: " << mStackSize << " Total coroutines: " << mCoros.size() << LL_ENDL;
}
// Store it in our pointer map
mCoros.insert(name, newCoro);
// also set it as current
......
......@@ -151,6 +151,9 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
/// for delayed initialization
void setStackSize(S32 stacksize);
/// for delayed initialization
void printActiveCoroutines();
/// get the current coro::self& for those who really really care
static coro::self& get_self();
......@@ -223,6 +226,7 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros>
// function signature down to that point -- and of course through every
// other caller of every such function.
LLCoros::coro::self* mSelf;
F64 mCreationTime; // since epoch
};
typedef boost::ptr_map<std::string, CoroData> CoroMap;
CoroMap mCoros;
......
......@@ -325,23 +325,13 @@ namespace LLError
{
#ifdef __GNUC__
// GCC: type_info::name() returns a mangled class name,st demangle
static size_t abi_name_len = 100;
static char* abi_name_buf = (char*)malloc(abi_name_len);
// warning: above is voodoo inferred from the GCC manual,
// do NOT change
int status;
// We don't use status, and shouldn't have to pass apointer to it
// but gcc 3.3 libstc++'s implementation of demangling is broken
// and fails without.
char* name = abi::__cxa_demangle(mangled,
abi_name_buf, &abi_name_len, &status);
// this call can realloc the abi_name_buf pointer (!)
return name ? name : mangled;
// passing nullptr, 0 forces allocation of a unique buffer we can free
// fixing MAINT-8724 on OSX 10.14
int status = -1;
char* name = abi::__cxa_demangle(mangled, nullptr, 0, &status);
std::string result(name ? name : mangled);
free(name);
return result;
#elif LL_WINDOWS
// DevStudio: type_info::name() includes the text "class " at the start
......
......@@ -95,10 +95,12 @@ HttpService::~HttpService()
if (! mThread->timedJoin(250))
{
// Failed to join, expect problems ahead so do a hard termination.
mThread->cancel();
LL_WARNS(LOG_CORE) << "Destroying HttpService with running thread. Expect problems." << LL_NEWLINE
<< "State: " << S32(sState)
<< " Last policy: " << U32(mLastPolicy)
<< LL_ENDL;
LL_WARNS(LOG_CORE) << "Destroying HttpService with running thread. Expect problems."
<< LL_ENDL;
mThread->cancel();
}
}
}
......
......@@ -192,7 +192,13 @@ volatile U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
ret = (U8*) ll_aligned_malloc<64>(size);
if (!ret)
{
LL_ERRS() << "Failed to allocate for LLVBOPool buffer" << LL_ENDL;
LL_ERRS() << "Failed to allocate "<< size << " bytes for LLVBOPool buffer " << name <<"." << LL_NEWLINE
<< "Free list size: " << mFreeList.size() // this happens if we are out of memory so a solution might be to clear some from freelist
<< " Allocated Bytes: " << LLVertexBuffer::sAllocatedBytes
<< " Allocated Index Bytes: " << LLVertexBuffer::sAllocatedIndexBytes
<< " Pooled Bytes: " << sBytesPooled
<< " Pooled Index Bytes: " << sIndexBytesPooled
<< LL_ENDL;
}
}
}
......
......@@ -2966,7 +2966,6 @@ void LLScrollListCtrl::onClickColumn(void *userdata)
}
// if this column is the primary sort key, reverse the direction
sort_column_t cur_sort_column;
if (!parent->mSortColumns.empty() && parent->mSortColumns.back().first == column_index)
{
ascending = !parent->mSortColumns.back().second;
......
......@@ -206,6 +206,7 @@ set(viewer_SOURCE_FILES
llfloaterabout.cpp
llfloaterassetrecovery.cpp
llfloaterbvhpreview.cpp
llfloaterauction.cpp
llfloaterautoreplacesettings.cpp
llfloateravatar.cpp
llfloateravatarpicker.cpp
......@@ -875,6 +876,7 @@ set(viewer_HEADER_FILES
llfloaterabout.h
llfloaterassetrecovery.h
llfloaterbvhpreview.h
llfloaterauction.h
llfloaterautoreplacesettings.h
llfloateravatar.h
llfloateravatarpicker.h
......@@ -2164,7 +2166,12 @@ if (DARWIN)
# These all get set with PROPERTIES
set(product "Catznip")
# this is the setting for the Python wrapper, see SL-322 and WRAPPER line in Info-SecondLife.plist
set(MACOSX_WRAPPER_EXECUTABLE_NAME "SL_Launcher")
if (PACKAGE)
set(MACOSX_WRAPPER_EXECUTABLE_NAME "SL_Launcher")
else (PACKAGE)
# force the name of the actual executable to allow running it within Xcode for debugging
set(MACOSX_WRAPPER_EXECUTABLE_NAME "../Resources/Second Life Viewer.app/Contents/MacOS/Second Life")
endif (PACKAGE)
set(MACOSX_BUNDLE_INFO_STRING "Catznip Viewer")
set(MACOSX_BUNDLE_ICON_FILE "catznip.icns")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.catznip.indra.viewer")
......
......@@ -4250,13 +4250,13 @@
<key>FeatureManagerHTTPTable</key>
<map>
<key>Comment</key>
<string>Base directory for HTTP feature/gpu table fetches</string>
<string>Deprecated</string>
<key>Persist</key>
<integer>1</integer>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>http://viewer.catznip.com/data/settings</string>
<string></string>
</map>
<key>FPSLogFrequency</key>
<map>
......@@ -13718,7 +13718,7 @@
<key>Comment</key>
<string>If TRUE, always load textures at full resolution (discard = 0)</string>
<key>Persist</key>
<integer>1</integer>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
......
......@@ -80,6 +80,8 @@ const F32 AVATAR_ZOOM_MIN_Y_FACTOR = 0.7f;
const F32 AVATAR_ZOOM_MIN_Z_FACTOR = 1.15f;
const F32 MAX_CAMERA_DISTANCE_FROM_AGENT = 50.f;
const F32 MAX_CAMERA_DISTANCE_FROM_OBJECT = 496.f;
const F32 CAMERA_FUDGE_FROM_OBJECT = 16.f;
const F32 MAX_CAMERA_SMOOTH_DISTANCE = 50.0f;
......@@ -753,10 +755,7 @@ F32 LLAgentCamera::getCameraZoomFraction()
else
{
F32 min_zoom;
const F32 DIST_FUDGE = 16.f; // meters
F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE,
LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE,
MAX_CAMERA_DISTANCE_FROM_AGENT);
F32 max_zoom = getCameraMaxZoomDistance();
F32 distance = (F32)mCameraFocusOffsetTarget.magVec();
if (mFocusObject.notNull())
......@@ -802,23 +801,17 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction)
else
{
F32 min_zoom = LAND_MIN_ZOOM;
const F32 DIST_FUDGE = 16.f; // meters
F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE,
LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE,
MAX_CAMERA_DISTANCE_FROM_AGENT);
F32 max_zoom = getCameraMaxZoomDistance();
if (mFocusObject.notNull())
{
if (mFocusObject.notNull())
if (mFocusObject->isAvatar())
{
if (mFocusObject->isAvatar())
{
min_zoom = AVATAR_MIN_ZOOM;
}
else
{
min_zoom = OBJECT_MIN_ZOOM;
}
min_zoom = AVATAR_MIN_ZOOM;
}
else
{
min_zoom = OBJECT_MIN_ZOOM;
}
}
......@@ -930,10 +923,7 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
new_distance = llmax(new_distance, min_zoom);
// Don't zoom too far back
const F32 DIST_FUDGE = 16.f; // meters
F32 max_distance = llmin(mDrawDistance - DIST_FUDGE,
LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE );
F32 max_distance = getCameraMaxZoomDistance();
max_distance = llmin(max_distance, current_distance * 4.f); //Scaled max relative to current distance. MAINT-3154
......@@ -1004,10 +994,7 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
new_distance = llmax(new_distance, min_zoom);
// Don't zoom too far back
const F32 DIST_FUDGE = 16.f; // meters
F32 max_distance = llmin(mDrawDistance - DIST_FUDGE,
LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE );
F32 max_distance = getCameraMaxZoomDistance();
if (new_distance > max_distance)
{
......@@ -2066,6 +2053,13 @@ LLVector3 LLAgentCamera::getCameraOffsetInitial()
return convert_from_llsd<LLVector3>(mCameraOffsetInitial[mCameraPreset]->get(), TYPE_VEC3, "");
}
F32 LLAgentCamera::getCameraMaxZoomDistance()
{
// Ignore "DisableCameraConstraints", we don't want to be out of draw range when we focus onto objects or avatars
return llmin(MAX_CAMERA_DISTANCE_FROM_OBJECT,
mDrawDistance - 1, // convenience, don't hit draw limit when focusing on something
LLWorld::getInstance()->getRegionWidthInMeters() - CAMERA_FUDGE_FROM_OBJECT);
}
//-----------------------------------------------------------------------------
// handleScrollWheel()
......
......@@ -117,6 +117,8 @@ class LLAgentCamera
private:
/** Determines default camera offset depending on the current camera preset */
LLVector3 getCameraOffsetInitial();
/** Determines maximum camera distance from target for mouselook, opposite to LAND_MIN_ZOOM */
F32 getCameraMaxZoomDistance();
/** Camera preset in Third Person Mode */
ECameraPreset mCameraPreset;
......
......@@ -42,6 +42,7 @@
#include "llagentlanguage.h"
#include "llagentui.h"
#include "llagentwearables.h"
#include "lldirpicker.h"
#include "llfloaterimcontainer.h"
#include "llimprocessing.h"
// [SL:KB] - Patch: Viewer-Updater | Checked: Catznip-3.6
......@@ -1164,6 +1165,8 @@ bool LLAppViewer::init()
}
}
//// don't nag developers who need to run the executable directly
//#if LL_RELEASE_FOR_DOWNLOAD
// // MAINT-8305: If we're processing a SLURL, skip the launcher check.
// if (gSavedSettings.getString("CmdLineLoginLocation").empty())
// {
......@@ -1180,6 +1183,7 @@ bool LLAppViewer::init()
// LLNotificationsUtil::add("RunLauncher");
// }
// }
//#endif
#if LL_WINDOWS
if (gGLManager.mGLVersion < LLFeatureManager::getInstance()->getExpectedGLVersion())
......@@ -1665,6 +1669,11 @@ bool LLAppViewer::doFrame()
saveFinalSnapshot();
}
if (LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->terminate();
}
delete gServicePump;
destroyMainloopTimeout();
......@@ -1764,11 +1773,6 @@ bool LLAppViewer::cleanup()
// Give any remaining SLPlugin instances a chance to exit cleanly.
LLPluginProcessParent::shutdown();
if (LLVoiceClient::instanceExists())
{
LLVoiceClient::getInstance()->terminate();
}
disconnectViewer();
LL_INFOS() << "Viewer disconnected" << LL_ENDL;
......@@ -1882,6 +1886,8 @@ bool LLAppViewer::cleanup()
// (Deleted observers should have already removed themselves)
gInventory.cleanupInventory();
LLCoros::getInstance()->printActiveCoroutines();
LL_INFOS() << "Cleaning up Selections" << LL_ENDL;
// Clean up selection managers after UI is destroyed, as UI may be observing them.
......@@ -2073,6 +2079,7 @@ bool LLAppViewer::cleanup()
mAppCoreHttp.cleanup();
SUBSYSTEM_CLEANUP(LLFilePickerThread);
SUBSYSTEM_CLEANUP(LLDirPickerThread);
//MUST happen AFTER SUBSYSTEM_CLEANUP(LLCurl)
delete sTextureCache;
......@@ -2352,6 +2359,7 @@ bool LLAppViewer::initThreads()
gMeshRepo.init();
LLFilePickerThread::initClass();
LLDirPickerThread::initClass();
// *FIX: no error handling here!
return true;
......@@ -5342,7 +5350,7 @@ void LLAppViewer::idle()
LLSmoothInterpolation::updateInterpolants();
LLMortician::updateClass();
LLFilePickerThread::clearDead(); //calls LLFilePickerThread::notify()
LLDirPickerThread::clearDead();
F32 dt_raw = idle_timer.getElapsedTimeAndResetF32();
// Cap out-of-control frame times
......
......@@ -598,10 +598,24 @@ class LLChatHistoryHeader: public LLPanel
registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2));
LLMenuGL* menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_avatar_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleAvatar = menu->getHandle();
if (menu)
{
mPopupMenuHandleAvatar = menu->getHandle();
}
else
{
LL_WARNS() << " Failed to create menu_avatar_icon.xml" << LL_ENDL;
}
menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
mPopupMenuHandleObject = menu->getHandle();
if (menu)
{
mPopupMenuHandleObject = menu->getHandle();
}
else
{
LL_WARNS() << " Failed to create menu_object_icon.xml" << LL_ENDL;
}
setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this));
......@@ -709,7 +723,12 @@ class LLChatHistoryHeader: public LLPanel
}
mUserNameFont = style_params.font();
LLTextBox* user_name = getChild<LLTextBox>("user_name");
if (!mUserNameTextBox)
{
mUserNameTextBox = getChild<LLTextBox>("user_name");
mTimeBoxTextBox = getChild<LLTextBox>("time_box");
}
LLTextBox* user_name = mUserNameTextBox;
user_name->setReadOnlyColor(style_params.readonly_color());
user_name->setColor(style_params.color());
......
......@@ -77,6 +77,14 @@ LLDirPicker::LLDirPicker() :
mFileName(NULL),
mLocked(false)
{
bi.hwndOwner = NULL;
bi.pidlRoot = NULL;
bi.pszDisplayName = NULL;
bi.lpszTitle = NULL;
bi.ulFlags = BIF_USENEWUI;
bi.lpfn = NULL;
bi.lParam = NULL;
bi.iImage = 0;
}
LLDirPicker::~LLDirPicker()
......@@ -84,7 +92,7 @@ LLDirPicker::~LLDirPicker()
// nothing
}
BOOL LLDirPicker::getDir(std::string* filename)
BOOL LLDirPicker::getDir(std::string* filename, bool blocking)
{
if( mLocked )
{
......@@ -99,39 +107,39 @@ BOOL LLDirPicker::getDir(std::string* filename)
BOOL success = FALSE;
// Modal, so pause agent
send_agent_pause();
BROWSEINFO bi;
memset(&bi, 0, sizeof(bi));
bi.ulFlags = BIF_USENEWUI;
bi.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
bi.lpszTitle = NULL;
::OleInitialize(NULL);
if (blocking)
{
// Modal, so pause agent
send_agent_pause();
}
LPITEMIDLIST pIDL = ::SHBrowseForFolder(&bi);
bi.hwndOwner = (HWND)gViewerWindow->getPlatformWindow();
if(pIDL != NULL)
{
WCHAR buffer[_MAX_PATH] = {'\0'};
::OleInitialize(NULL);
LPITEMIDLIST pIDL = ::SHBrowseForFolder(&bi);
if(::SHGetPathFromIDList(pIDL, buffer) != 0)
{
// Set the string value.
if(pIDL != NULL)
{
WCHAR buffer[_MAX_PATH] = {'\0'};
mDir = utf16str_to_utf8str(llutf16string(buffer));
success = TRUE;
}
if(::SHGetPathFromIDList(pIDL, buffer) != 0)
{
// Set the string value.
// free the item id list
CoTaskMemFree(pIDL);
}
mDir = utf16str_to_utf8str(llutf16string(buffer));
success = TRUE;
}
// free the item id list
CoTaskMemFree(pIDL);