AIFilePicker related bug fixes.
Bug fix in LLPreviewAnim::gotAssetForSave_continued: the if() that tests if the result from the filepicker can be used was accidently negated, mostly causing a crash when cancelling an animation preview download (open animation, File -> Save Texture As..), and canceling the save when a filename is picked. The lifetime of AIFileUpload is actually till the very end of the main(), causing it's member mPicker to be reused. This leads to problems. When someone tries to open a file picker for a file upload of the same time before the previous filepicker called the callback function (ie, when two filepickers are opened at the same time, or when the plugin crashes). With this fix it is possible to open any number of file pickers. Finally, for linux, LLFastTimers was using assembly with gives rather random results on multicore machines. Since AIStateMachine is using this for wait timing, it had a negative effect on how well the file picker worked (the last message wasn't flushed for several seconds).
This commit is contained in:
@@ -79,7 +79,7 @@ AITHREADSAFESIMPLE(U64, AIStateMachine::sMaxCount, );
|
||||
void AIStateMachine::updateSettings(void)
|
||||
{
|
||||
Dout(dc::statemachine, "Initializing AIStateMachine::sMaxCount");
|
||||
*AIAccess<U64>(sMaxCount) = LLFastTimer::countsPerSecond() * gSavedSettings.getU32("StateMachineMaxTime") / 1000;
|
||||
*AIAccess<U64>(sMaxCount) = LLFastTimer::sClockResolution * gSavedSettings.getU32("StateMachineMaxTime") / 1000;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -319,7 +319,7 @@ void AIStateMachine::mainloop(void*)
|
||||
if (total_clocks >= max_count)
|
||||
{
|
||||
#ifndef LL_RELEASE_FOR_DOWNLOAD
|
||||
llwarns << "AIStateMachine::mainloop did run for " << (total_clocks * 1000 / LLFastTimer::countsPerSecond()) << " ms." << llendl;
|
||||
llwarns << "AIStateMachine::mainloop did run for " << (total_clocks * 1000 / LLFastTimer::sClockResolution) << " ms." << llendl;
|
||||
#endif
|
||||
std::sort(active_statemachines.begin(), active_statemachines.end(), QueueElementComp());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user