Merge remote-tracking branch 'singu/master'
This commit is contained in:
@@ -138,7 +138,7 @@ namespace HACD
|
||||
if (m_callBack)
|
||||
{
|
||||
char msg[1024];
|
||||
sprintf(msg, "nCC %lu\n", m_graph.m_nCCs);
|
||||
sprintf(msg, "nCC %zu\n", m_graph.m_nCCs);
|
||||
(*m_callBack)(msg, 0.0, 0.0, m_graph.GetNVertices());
|
||||
|
||||
}
|
||||
@@ -879,7 +879,7 @@ namespace HACD
|
||||
if (m_callBack)
|
||||
{
|
||||
char msg[1024];
|
||||
sprintf(msg, "\t CH(%zu) \t %zu \t %lf \t %zu \t %f \t %zu\n", v, static_cast<unsigned long>(p), m_graph.m_vertices[v].m_concavity, m_graph.m_vertices[v].m_distPoints.Size(), m_graph.m_vertices[v].m_surf*100.0/m_area, m_graph.m_vertices[v].m_ancestors.size());
|
||||
sprintf(msg, "\t CH(%zu) \t %zu \t %lf \t %zu \t %f \t %zu\n", v, p, m_graph.m_vertices[v].m_concavity, m_graph.m_vertices[v].m_distPoints.Size(), m_graph.m_vertices[v].m_surf*100.0/m_area, m_graph.m_vertices[v].m_ancestors.size());
|
||||
(*m_callBack)(msg, 0.0, 0.0, m_nClusters);
|
||||
p++;
|
||||
}
|
||||
|
||||
@@ -1252,6 +1252,9 @@ void LLAudioEngine::startNextTransfer()
|
||||
// static
|
||||
void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, void *user_data, S32 result_code, LLExtStat ext_status)
|
||||
{
|
||||
if(!gAudiop)
|
||||
return;
|
||||
|
||||
if (result_code)
|
||||
{
|
||||
LL_INFOS("AudioEngine") << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << LL_ENDL;
|
||||
@@ -1472,6 +1475,19 @@ bool LLAudioSource::play(const LLUUID &audio_uuid)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if(mCurrentDatap == adp) //Desired sound did not change. Just re-play it.
|
||||
{
|
||||
if(getChannel() && getChannel()->isPlaying())
|
||||
getChannel()->play();
|
||||
return true;
|
||||
}
|
||||
else //Desired sound did change. Release the old channel if set.
|
||||
{
|
||||
if(getChannel())
|
||||
getChannel()->cleanup();
|
||||
mPlayedOnce = false; //Reset the played flag so the new sound is actually started up.
|
||||
}
|
||||
|
||||
mCurrentDatap = adp;
|
||||
|
||||
// Make sure the audio engine knows that we want to request this sound.
|
||||
|
||||
@@ -600,6 +600,12 @@ void LLAudioChannelFMOD::play()
|
||||
llwarns << "Playing without a channelID, aborting" << llendl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!FSOUND_IsPaused(mChannelID))
|
||||
{
|
||||
FSOUND_SetPaused(mChannelID, true);
|
||||
FSOUND_SetCurrentPosition(mChannelID, 0);
|
||||
}
|
||||
|
||||
if (!FSOUND_SetPaused(mChannelID, false))
|
||||
{
|
||||
|
||||
@@ -823,6 +823,13 @@ void LLAudioChannelFMODEX::play()
|
||||
|
||||
gSoundCheck.assertActiveState(this,true);
|
||||
|
||||
bool paused=true;
|
||||
Check_FMOD_Error(mChannelp->getPaused(&paused), "FMOD::Channel::getPaused");
|
||||
if(!paused)
|
||||
{
|
||||
Check_FMOD_Error(mChannelp->setPaused(true), "FMOD::Channel::setPaused");
|
||||
Check_FMOD_Error(mChannelp->setPosition(0,FMOD_TIMEUNIT_PCMBYTES), "FMOD::Channel::setPosition");
|
||||
}
|
||||
Check_FMOD_Error(mChannelp->setPaused(false), "FMOD::Channel::setPaused");
|
||||
|
||||
if(sVerboseDebugging)
|
||||
|
||||
@@ -199,11 +199,13 @@ void LLAudioChannelOpenAL::play()
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isPlaying())
|
||||
if(isPlaying())
|
||||
{
|
||||
alSourcePlay(mALSource);
|
||||
getSource()->setPlayedOnce(true);
|
||||
alSourceStop(mALSource);
|
||||
}
|
||||
|
||||
alSourcePlay(mALSource);
|
||||
getSource()->setPlayedOnce(true);
|
||||
}
|
||||
|
||||
void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp)
|
||||
|
||||
@@ -307,46 +307,12 @@ void LLApp::setupErrorHandling()
|
||||
// Install the Google Breakpad crash handler for Windows
|
||||
if(mExceptionHandler == 0)
|
||||
{
|
||||
llwarns << "adding breakpad exception handler" << llendl;
|
||||
|
||||
std::wostringstream ws;
|
||||
ws << mCrashReportPipeStr << getPid();
|
||||
std::wstring wpipe_name = ws.str();
|
||||
std::string ptmp = std::string(wpipe_name.begin(), wpipe_name.end());
|
||||
|
||||
::Sleep(2000); //HACK hopefully a static wait won't blow up in my face before google fixes their implementation.
|
||||
|
||||
//HACK this for loop is ueless. Breakpad dumbly returns success when the OOP handler isn't initialized.
|
||||
for (int retries=0;retries<5;++retries)
|
||||
{
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(
|
||||
L"",
|
||||
NULL, //No filter
|
||||
windows_post_minidump_callback,
|
||||
0,
|
||||
google_breakpad::ExceptionHandler::HANDLER_ALL,
|
||||
MiniDumpNormal, //Generate a 'normal' minidump.
|
||||
(WCHAR *)wpipe_name.c_str(),
|
||||
NULL); //No custom client info.
|
||||
if (mExceptionHandler)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
::Sleep(100); //Wait a tick and try again.
|
||||
}
|
||||
}
|
||||
if (!mExceptionHandler)
|
||||
{
|
||||
llwarns << "Failed to initialize OOP exception handler. Defaulting to In Process handling" << llendl;
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(
|
||||
std::wstring(mDumpPath.begin(),mDumpPath.end()), //Dump path
|
||||
0, //dump filename
|
||||
windows_post_minidump_callback,
|
||||
0,
|
||||
google_breakpad::ExceptionHandler::HANDLER_ALL);
|
||||
}
|
||||
mExceptionHandler = new google_breakpad::ExceptionHandler(
|
||||
std::wstring(mDumpPath.begin(),mDumpPath.end()), //Dump path
|
||||
0, //dump filename
|
||||
windows_post_minidump_callback,
|
||||
0,
|
||||
google_breakpad::ExceptionHandler::HANDLER_ALL);
|
||||
if (mExceptionHandler)
|
||||
{
|
||||
mExceptionHandler->set_handle_debug_exceptions(true);
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</array>
|
||||
<key>tags</key>
|
||||
<array>
|
||||
<string>ShaderLoading</string>
|
||||
<!--string>ShaderLoading</string-->
|
||||
<string>Openjpeg</string>
|
||||
<!-- Debug output about messages received from plugins: -->
|
||||
<string>Plugin</string> <!-- Everything except what is listed below -->
|
||||
|
||||
@@ -127,7 +127,8 @@ void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, const LLSD& value)
|
||||
if (enabled)
|
||||
{
|
||||
LLVector3d lpos_global = gAgent.getPositionGlobal();
|
||||
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
|
||||
if(gAudiop)
|
||||
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
|
||||
LLChat chat;
|
||||
chat.mSourceType = CHAT_SOURCE_SYSTEM;
|
||||
chat.mText = LLTrans::getString("PowerUser1") + "\n" + LLTrans::getString("PowerUser2") + "\n" + LLTrans::getString("Unlocked:") + "\n" + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5");
|
||||
|
||||
@@ -522,61 +522,7 @@ bool LLAppViewerWin32::restoreErrorTrap()
|
||||
|
||||
void LLAppViewerWin32::initCrashReporting(bool reportFreeze)
|
||||
{
|
||||
/* Singu Note: don't fork the crash logger on start
|
||||
const char* logger_name = "win_crash_logger.exe";
|
||||
std::string exe_path = gDirUtilp->getExecutableDir();
|
||||
exe_path += gDirUtilp->getDirDelimiter();
|
||||
exe_path += logger_name;
|
||||
|
||||
std::stringstream pid_str;
|
||||
pid_str << LLApp::getPid();
|
||||
std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
|
||||
std::string appname = gDirUtilp->getExecutableFilename();
|
||||
|
||||
S32 slen = logdir.length() -1;
|
||||
S32 end = slen;
|
||||
while (logdir.at(end) == '/' || logdir.at(end) == '\\') end--;
|
||||
|
||||
if (slen !=end)
|
||||
{
|
||||
logdir = logdir.substr(0,end+1);
|
||||
}
|
||||
std::string arg_str = "\"" + exe_path + "\" -dumpdir \"" + logdir + "\" -procname \"" + appname + "\" -pid " + pid_str.str();
|
||||
llinfos << "spawning " << arg_str << llendl;
|
||||
_spawnl(_P_NOWAIT, exe_path.c_str(), arg_str.c_str(), NULL);
|
||||
*/
|
||||
|
||||
/* STARTUPINFO siStartupInfo;
|
||||
|
||||
std::string arg_str = "-dumpdir \"" + logdir + "\" -procname \"" + appname + "\" -pid " + pid_str.str();
|
||||
|
||||
memset(&siStartupInfo, 0, sizeof(siStartupInfo));
|
||||
memset(&mCrashReporterProcessInfo, 0, sizeof(mCrashReporterProcessInfo));
|
||||
|
||||
siStartupInfo.cb = sizeof(siStartupInfo);
|
||||
|
||||
std::wstring exe_wstr;
|
||||
exe_wstr.assign(exe_path.begin(), exe_path.end());
|
||||
|
||||
std::wstring arg_wstr;
|
||||
arg_wstr.assign(arg_str.begin(), arg_str.end());
|
||||
|
||||
if(CreateProcess(&exe_wstr[0],
|
||||
&arg_wstr[0], // Application arguments
|
||||
0,
|
||||
0,
|
||||
FALSE,
|
||||
CREATE_DEFAULT_ERROR_MODE,
|
||||
0,
|
||||
0, // Working directory
|
||||
&siStartupInfo,
|
||||
&mCrashReporterProcessInfo) == FALSE)
|
||||
// Could not start application -> call 'GetLastError()'
|
||||
{
|
||||
//llinfos << "CreateProcess failed " << GetLastError() << llendl;
|
||||
return;
|
||||
}
|
||||
*/
|
||||
// Singu Note: we don't fork the crash logger on start
|
||||
}
|
||||
|
||||
//virtual
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
#include "llhttpclient.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llproxy.h"
|
||||
#include "llwindow.h"
|
||||
#include "lltrans.h"
|
||||
#include "aistatemachine.h"
|
||||
#include "boost/filesystem.hpp"
|
||||
|
||||
class AIHTTPTimeoutPolicy;
|
||||
extern AIHTTPTimeoutPolicy crashLoggerResponder_timeout;
|
||||
@@ -144,6 +147,36 @@ std::string getStartupStateFromLog(std::string& sllog)
|
||||
return startup_state;
|
||||
}
|
||||
|
||||
bool miniDumpExists(const std::string& dumpDir)
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
try
|
||||
{
|
||||
if (!boost::filesystem::exists(dumpDir))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
boost::filesystem::directory_iterator end_itr;
|
||||
for (boost::filesystem::directory_iterator i(dumpDir); i != end_itr; ++i)
|
||||
{
|
||||
if (!boost::filesystem::is_regular_file(i->status())) continue;
|
||||
if (".dmp" == i->path().extension())
|
||||
{
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (const boost::filesystem::filesystem_error& e)
|
||||
{
|
||||
llwarns << "Failed to determine existance of the minidump file: '" + e.code().message() +"'" << llendl;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
bool LLCrashLogger::readDebugFromXML(LLSD& dest, const std::string& filename )
|
||||
{
|
||||
std::string db_file_name = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,filename);
|
||||
@@ -350,20 +383,29 @@ bool LLCrashLogger::sendCrashLog(std::string dump_dir)
|
||||
|
||||
void LLCrashLogger::checkCrashDump()
|
||||
{
|
||||
mCrashHost = gSavedSettings.getString("CrashHostUrl");
|
||||
|
||||
std::string dumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "") + "singularity-debug";
|
||||
if (gDirUtilp->fileExists(dumpDir))
|
||||
{
|
||||
#if LL_SEND_CRASH_REPORTS
|
||||
if (!mCrashHost.empty() && gSavedSettings.getS32("CrashSubmitBehavior") != 2)
|
||||
// 0 - ask, 1 - always send, 2 - never send
|
||||
S32 pref = gSavedSettings.getS32("CrashSubmitBehavior");
|
||||
if (pref == 2) return; //never send
|
||||
|
||||
mCrashHost = gSavedSettings.getString("CrashHostUrl");
|
||||
std::string dumpDir = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "") + "singularity-debug";
|
||||
|
||||
// Do we have something to send, and somewhere to send it
|
||||
if (!mCrashHost.empty() && miniDumpExists(dumpDir))
|
||||
{
|
||||
if (pref == 1) // always send
|
||||
{
|
||||
sendCrashLog(dumpDir);
|
||||
}
|
||||
else // ask
|
||||
{
|
||||
U32 response = OSMessageBox(LLTrans::getString("MBFrozenCrashed"), LLTrans::getString("MBAlert"), OSMB_YESNO);
|
||||
if (response == OSBTN_YES)
|
||||
{
|
||||
sendCrashLog(dumpDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
llinfos << "No crash dump found frome previous run, not sending report" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ BOOL LLPanelDirFind::postBuild()
|
||||
}
|
||||
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("filter_gaming"))
|
||||
ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL));
|
||||
ctrl->setVisible(gAgent.getRegion() && (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -558,7 +558,7 @@ BOOL LLPanelDirFindAllOld::postBuild()
|
||||
setDefaultBtn( "Search" );
|
||||
|
||||
if (LLUICtrl* ctrl = findChild<LLUICtrl>("filter_gaming"))
|
||||
ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC));
|
||||
ctrl->setVisible(gAgent.getRegion() && (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -2815,24 +2815,33 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
|
||||
if(ft && (0 == error_code) &&
|
||||
(object = gObjectList.findObject(ft->mTaskID)))
|
||||
{
|
||||
object->loadTaskInvFile(ft->mFilename);
|
||||
|
||||
LLInventoryObject::object_list_t::iterator it = object->mInventory->begin();
|
||||
LLInventoryObject::object_list_t::iterator end = object->mInventory->end();
|
||||
std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs;
|
||||
|
||||
for (; it != end && pending_lst.size(); ++it)
|
||||
if (object->loadTaskInvFile(ft->mFilename))
|
||||
{
|
||||
LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get());
|
||||
if(item && item->getType() != LLAssetType::AT_CATEGORY)
|
||||
|
||||
LLInventoryObject::object_list_t::iterator it = object->mInventory->begin();
|
||||
LLInventoryObject::object_list_t::iterator end = object->mInventory->end();
|
||||
std::list<LLUUID>& pending_lst = object->mPendingInventoryItemsIDs;
|
||||
|
||||
for (; it != end && pending_lst.size(); ++it)
|
||||
{
|
||||
std::list<LLUUID>::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID());
|
||||
if (id_it != pending_lst.end())
|
||||
LLViewerInventoryItem* item = dynamic_cast<LLViewerInventoryItem*>(it->get());
|
||||
if(item && item->getType() != LLAssetType::AT_CATEGORY)
|
||||
{
|
||||
pending_lst.erase(id_it);
|
||||
std::list<LLUUID>::iterator id_it = std::find(pending_lst.begin(), pending_lst.begin(), item->getAssetUUID());
|
||||
if (id_it != pending_lst.end())
|
||||
{
|
||||
pending_lst.erase(id_it);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// MAINT-2597 - crash when trying to edit a no-mod object
|
||||
// Somehow get an contents inventory response, but with an invalid stream (possibly 0 size?)
|
||||
// Stated repro was specific to no-mod objects so failing without user interaction should be safe.
|
||||
llwarns << "Trying to load invalid task inventory file. Ignoring file contents." << llendl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2844,7 +2853,7 @@ void LLViewerObject::processTaskInvFile(void** user_data, S32 error_code, LLExtS
|
||||
delete ft;
|
||||
}
|
||||
|
||||
void LLViewerObject::loadTaskInvFile(const std::string& filename)
|
||||
BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
|
||||
{
|
||||
std::string filename_and_local_path = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, filename);
|
||||
llifstream ifs(filename_and_local_path);
|
||||
@@ -2875,6 +2884,7 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename)
|
||||
{
|
||||
LLPointer<LLInventoryObject> inv = new LLInventoryObject;
|
||||
inv->importLegacyStream(ifs);
|
||||
inv->rename("Contents");
|
||||
mInventory->push_front(inv);
|
||||
}
|
||||
else
|
||||
@@ -2890,8 +2900,11 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename)
|
||||
{
|
||||
llwarns << "unable to load task inventory: " << filename_and_local_path
|
||||
<< llendl;
|
||||
return FALSE;
|
||||
}
|
||||
doInventoryCallback();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLViewerObject::doInventoryCallback()
|
||||
@@ -4904,11 +4917,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
|
||||
mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER);
|
||||
mAudioSourcep->setSyncSlave(flags & LL_SOUND_FLAG_SYNC_SLAVE);
|
||||
mAudioSourcep->setQueueSounds(queue);
|
||||
if(!queue) // stop any current sound first to avoid "farts of doom" (SL-1541) -MG
|
||||
{
|
||||
mAudioSourcep->play(LLUUID::null);
|
||||
}
|
||||
|
||||
|
||||
// Play this sound if region maturity permits
|
||||
if( gAgent.canAccessMaturityAtGlobal(this->getPositionGlobal()) )
|
||||
{
|
||||
|
||||
@@ -673,7 +673,7 @@ protected:
|
||||
//
|
||||
|
||||
static void processTaskInvFile(void** user_data, S32 error_code, LLExtStat ext_status);
|
||||
void loadTaskInvFile(const std::string& filename);
|
||||
BOOL loadTaskInvFile(const std::string& filename);
|
||||
void doInventoryCallback();
|
||||
|
||||
BOOL isOnMap();
|
||||
|
||||
@@ -2529,11 +2529,19 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
|
||||
{{
|
||||
LLViewerJointAttachment* attachment = attachment_iter->second;
|
||||
LLViewerObject* attached_object = attachment_iter->first;
|
||||
BOOL visibleAttachment = visible || (attached_object && attached_object->mDrawable.notNull() &&
|
||||
!(attached_object->mDrawable->getSpatialBridge() &&
|
||||
attached_object->mDrawable->getSpatialBridge()->getRadius() < 2.0));
|
||||
|
||||
if (visibleAttachment && attached_object && attached_object->mDrawable && !attached_object->isDead() && attachment->getValid())
|
||||
if( !attached_object ||
|
||||
attached_object->isDead() ||
|
||||
!attached_object->mDrawable ||
|
||||
!attachment ||
|
||||
!attachment->getValid())
|
||||
continue;
|
||||
|
||||
BOOL visibleAttachment = visible ||
|
||||
!attached_object->mDrawable->getSpatialBridge() ||
|
||||
attached_object->mDrawable->getSpatialBridge()->getRadius() >= 2.f;
|
||||
|
||||
if (visibleAttachment)
|
||||
{
|
||||
// if selecting any attachments, update all of them as non-damped
|
||||
if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() && LLSelectMgr::getInstance()->getSelection()->isAttachment())
|
||||
|
||||
Reference in New Issue
Block a user