Commit Graph

86 Commits (9ea2d90a0dd9ca9ab76583187354533011ef3fcb)

Author SHA1 Message Date
Dave Parks 9ea2d90a0d Automated merge with http://bitbucket.org/lindenlab/viewer-release 2013-06-20 12:10:26 -05:00
simon f62d04d425 MAINT-2791: Yet another crash in LLTextureCache::writeToFastCache(). Reviewed
by Kelly
2013-06-14 11:32:12 -07:00
Graham Madarasz fe077cfba6 MAINT-2414 fix for texture cache crasher 2013-06-10 10:45:15 -07:00
simon c7f7c4bc4d Merge viewer-beta 2013-05-09 13:14:49 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Xiaohong Bao d3b9f446a6 fix for MAINT-2147: crash in LLTextureCache::writeToFastCache on OSX 2013-01-03 22:37:44 -07:00
Xiaohong Bao 11bebcbcac more for MAINT-1955: Viewer crashes while login after clearing cache 2012-12-03 21:34:36 -07:00
Xiaohong Bao e3b5d8b24f more for MAINT-1955: Viewer crashes while login after clearing cache 2012-12-03 21:34:36 -07:00
Xiaohong Bao a1c52b7cd1 fix for MAINT-1955: Viewer crashes while login after clearing cache 2012-11-26 17:27:25 -07:00
Xiaohong Bao fe2f9e12f7 fix for MAINT-1955: Viewer crashes while login after clearing cache 2012-11-26 17:27:25 -07:00
Xiaohong Bao 0d80aced24 for SH-3073: implement a fast cache system for texture fetching 2012-06-12 17:01:48 -06:00
Dave Parks 78233d1bf9 SH-2652 WIP -- Add timers to relevant areas, pause render pipeline while occlusion queries from previous frame are still pending and perform texture decode work. 2011-12-05 17:55:40 -06:00
Brad Payne (Vir Linden) 51c7887f8d merge 2011-10-31 11:35:22 -04:00
Xiaohong Bao fa04683aba fix for SH-2573: Flaw in Purging Texture Cache when it Exceeds Limit 2011-10-26 11:10:18 -06:00
Dave Parks 4924f0c99b b782a75c99e6 backout cleanup 2011-10-14 12:38:48 -05:00
Dave Parks c0ca8e5e2e Merge backout of b782a75c99e6 2011-10-14 11:58:35 -05:00
Dave Parks 4331c112ab Backed out changeset b782a75c99e6 2011-10-14 11:52:40 -05:00
Xiaohong Bao d951267467 Merge from viewer-development 2011-07-15 12:14:34 -06:00
Logan Dethrow 2662c4b679 Merge. Pulling fix for VWR-25862 into bigger cache tree. 2011-06-01 17:05:38 -04:00
Logan Dethrow 57bdcd6bda VWR-25862 Potential fix for caches not clearing when they are supposed to.
* Removed leading delimiter from filename mask in all calls to
  LLDir::deleteFilesInDir() that are related to the viewer asset caches
  (texture, VFS, and VO).
2011-05-25 15:44:03 -04:00
Xiaohong Bao b594d3b04d add debug mode to track the memory allocation/deallocation. 2011-05-10 21:02:20 -06:00
Logan Dethrow 5c7a906b44 Increased the viewer cache size limit to 10GB. Increased the default to 1GB.
* Changed the hard coded cache limit in llappviewer.cpp to 10GB as well as the
   slider maximum in the preferences menu. * The VFS cache is capped at 1GB due
   to file system limitations. The former 80/20 split between texture/vfs is
   maintained up to 5GB. Above this limit the texture cache is given all
   the additional cache space up to 10GB.
 * Fixed a log message in lltexturecache.cpp that was not showing the correct
   texture size. ER-883
 * Fixed a bug in llfloaterpreference.cpp that caused new cache value to be
   written to the old cache setting. This resulted in the the cache not being
   cleared when the location was set back to the default. ER-882
 * Disabled the "The cache will be cleared on reboot" message that is triggered
   by the reset button in the cache preferences in the case where the cache
   is already located in the default location.  The cache is only cleared when
   its location is changed. This is intended to address resident confusion
   regarding the purpose of the reset button, as demonstrated in VWR-19562.
2011-05-06 15:15:17 -04:00
Merov Linden 005da00fff STORM-1059 : Fix for cache purging (fix by Aleric) 2011-03-11 14:38:09 -08:00
Xiaohong Bao 29415d1407 Merge 2011-02-23 13:48:35 -07:00
Xiaohong Bao 01cdeb0cdd Merge from viewer-development 2011-02-23 10:44:59 -07:00
Aleric Inglewood ef490e308c Introduces a LLThreadLocalData class that can be
accessed through the static LLThread::tldata().
Currently this object contains two (public) thread-local
objects: a LLAPRRootPool and a LLVolatileAPRPool.

The first is the general memory pool used by this thread
(and this thread alone), while the second is intended
for short lived memory allocations (needed for APR).
The advantages of not mixing those two is that the latter
is used most frequently, and as a result of it's nature
can be destroyed and reconstructed on a "regular" basis.

This patch adds LLAPRPool (completely replacing the old one),
which is a wrapper around apr_pool_t* and has complete
thread-safity checking.

Whenever an apr call requires memory for some resource,
a memory pool in the form of an LLAPRPool object can
be created with the same life-time as this resource;
assuring clean up of the memory no sooner, but also
not much later than the life-time of the resource
that needs the memory.

Many, many function calls and constructors had the
pool parameter simply removed (it is no longer the
concern of the developer, if you don't write code
that actually does an libapr call then you are no
longer bothered with memory pools at all).

However, I kept the notion of short-lived and
long-lived allocations alive (see my remark in
the jira here: https://jira.secondlife.com/browse/STORM-864?focusedCommentId=235356&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235356
which requires that the LLAPRFile API needs
to allow the user to specify how long they
think a file will stay open. By choosing
'short_lived' as default for the constructor
that immediately opens a file, the number of
instances where this needs to be specified is
drastically reduced however (obviously, any
automatic LLAPRFile is short lived).

***

Addressed Boroondas remarks in https://codereview.secondlife.com/r/99/
regarding (doxygen) comments. This patch effectively only changes comments.

Includes some 'merge' stuff that ended up in llvocache.cpp
(while starting as a bug fix, now only resulting in a cleanup).

***

Added comment 'The use of apr_pool_t is OK here'.

Added this comment on every line where apr_pool_t
is correctly being used.

This should make it easier to spot (future) errors
where someone started to use apr_pool_t; you can
just grep all sources for 'apr_pool_t' and immediately
see where it's being used while LLAPRPool should
have been used.

Note that merging this patch is very easy:
If there are no other uses of apr_pool_t in the code
(one grep) and it compiles, then it will work.

***

Second Merge (needed to remove 'delete mCreationMutex'
from LLImageDecodeThread::~LLImageDecodeThread).

***

Added back #include <apr_pools.h>.

Apparently that is needed on libapr version 1.2.8.,
the version used by Linden Lab, for calls to
apr_queue_*. This is a bug in libapr (we also
include <apr_queue.h>, that is fixed in (at least) 1.3.7.

Note that 1.2.8 is VERY old. Even 1.3.x is old.

***

License fixes (GPL -> LGPL). And typo in comments.
Addresses merov's comments on the review board.

***

Added Merov's compile fixes for windows.
2011-02-05 15:58:07 +01:00
Xiaohong Bao eec332cfbe Automated merge with http://hg.secondlife.com/viewer-development 2011-01-24 15:51:33 -07:00
Aleric Inglewood 295536ae98 VWR-24321: fix validation of textures that start with 00 2011-01-24 09:35:41 -05:00
Xiaohong Bao 4af7e9eb64 Merge viewer-development-shining up to REV 3bf724ecb7c6 (fix for SH-829: Viewer attempting to load precached images in file types that are not being used.) 2011-01-21 16:25:23 -07:00
Xiaohong Bao e3f5b66d5a fix for SH-829: Viewer attempting to load precached images in file types that are not being used. 2011-01-20 15:20:27 -07:00
Aleric Inglewood e9c6800e23 VWR-24317: remove warnings for deleting non-existant texture file on startup 2011-01-20 14:57:33 -05:00
Xiaohong Bao 611d8bdf61 use the private pool in the texture pipeline 2011-01-06 16:20:21 -07:00
Xiaohong Bao e29f811d56 code for DEV-52939: viewer's object geometry cache files are not limited in number, and can also be incorrectly cleared with the VFS cache.
reviewed by andrew.
2010-09-01 13:40:10 -06:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Xiaohong Bao 4682264ead EXT-8447: FIXED: crash at LLTextureCache::writeEntryToHeaderImmediately(int,LLTextureCache::Entry &,bool) [secondlife-bin lltexturecache.cpp] 2010-08-06 09:29:33 -06:00
Brad Payne (Vir Linden) d5655c9bbf EXT-8283 FIX - allow saveWearable to change name of wearable, split off logic for saveAs case. Some remaining UI issues will be filed separately. Reviewed by Nyx 2010-07-15 13:56:46 -04:00
Xiaohong Bao 6eb0d854b8 EXT-7294: FIXED: crash at LLTextureCache::updateEntry [secondlife-bin lltexturecache.cpp:1231]
Also simply the writing flow of the texture cache.
2010-05-10 16:21:15 -06:00
Tofu Linden d6996c7d3d fix merge poopage. 2010-04-12 11:32:31 +01:00
Tofu Linden 9fbe736774 (slightly hairy) merge from viewer-hotfix 2010-04-12 11:03:16 +01:00
Xiaohong Bao 03b0c60ff5 fix for all wierd crashes happening to lltexturecache.cpp, cuased by running viewer 2.0 and viewer 1.23 at the same time. Specifically for the following jiras:
EXT-6692: crash at LLTextureCache::readEntryFromHeaderImmediately [secondlife-bin lltexturecache.cpp:1145]
EXT-6691: crash at LLTextureCache::writeEntryToHeaderImmediately [secondlife-bin lltexturecache.cpp:1126]
possible fix for EXT-6567: crash at LLImageBase::allocateData [secondlife-bin llimage.cpp:170]
2010-04-07 11:51:41 -06:00
Xiaohong Bao 309d94452b fix for EXT-6678: crash at LLTextureCache::openAndReadEntry [secondlife-bin lltexturecache.cpp:1111] 2010-04-01 11:39:01 -06:00
Xiaohong Bao 8b40230f41 fix for EXT-6435: crash at writeEntriesAndClose: ASSERT (num_entries == mHeaderEntriesInfo.mEntries) 2010-03-29 11:32:47 -06:00
Xiaohong Bao 970b7051ac fix for EXT-6566: crash at LLTextureCache::updatedHeaderEntriesFile [secondlife-bin lltexturecache.cpp:1292] 2010-03-29 11:28:42 -06:00
Xiaohong Bao 7de49ce1d1 fix for EXT-6435: crash at writeEntriesAndClose: ASSERT (num_entries == mHeaderEntriesInfo.mEntries) 2010-03-29 11:32:47 -06:00
Xiaohong Bao a0022e65ec fix for EXT-6566: crash at LLTextureCache::updatedHeaderEntriesFile [secondlife-bin lltexturecache.cpp:1292] 2010-03-29 11:28:42 -06:00
Xiaohong Bao 8dd401e4a1 fix for EXT-6678: crash at LLTextureCache::openAndReadEntry [secondlife-bin lltexturecache.cpp:1111] 2010-04-01 11:39:01 -06:00
Xiaohong Bao 88df86bcc3 fix for all wierd crashes happening to lltexturecache.cpp, cuased by running viewer 2.0 and viewer 1.23 at the same time. Specifically for the following jiras:
EXT-6692: crash at LLTextureCache::readEntryFromHeaderImmediately [secondlife-bin lltexturecache.cpp:1145]
EXT-6691: crash at LLTextureCache::writeEntryToHeaderImmediately [secondlife-bin lltexturecache.cpp:1126]
possible fix for EXT-6567: crash at LLImageBase::allocateData [secondlife-bin llimage.cpp:170]
2010-04-07 11:51:41 -06:00
Nyx (Neal Orman) af721d3f54 fixing linux build errors from bao's checkin for EXT-6093
viewer wouldn't compile under linux, due to gcc being paranoid about a few
things. Fixed them up and got them reviewed.

Code reviewed by bao.
2010-03-18 16:10:24 -04:00
Xiaohong Bao 8e1f7ecaf3 more for lltexturecache.cpp: fix the crash due to deleting the entries header file after clearing the texture cache. 2010-03-17 14:43:17 -06:00
Xiaohong Bao f8dc23fc84 fix for EXT-6093: crash at LLTextureCache::updateTextureEntryList[secondlife-bin lltexturecache.cpp:847];
EXT-5711: Some textures loading from cache seems jammed;
EXT-5599: Viewer crashes consistently, in Linden Homes region.
2010-03-17 12:39:39 -06:00