On Tue, 1 Jul 2003 01:42:12 +0200 (Romance Daylight Time) Vadim Zeitlin <[EMAIL 
PROTECTED]> wrote:

> [send here the stack when it crashes]

Maybe I've got one: I just clicked on a folder, and got this stack...
The busy indicator is visible, which means that the sorting/treading is
going on, but it seems that some event is in the queue, that needs some
info about the headers of the current message, but the headers must be
first sorted/threaded, and this loops...

HeaderInfoListImpl::FreeSortAndThreadData() line 572
HeaderInfoListImpl::MustRebuildTables() line 490
HeaderInfoListImpl::IsInCache(unsigned long 417) line 1985 + 8 bytes
wxFolderListCtrl::GetHeaderInfo(unsigned int 417) line 2290 + 50 bytes
wxFolderListCtrl::OnGetItemText(long 417, long 0) line 2804 + 12 bytes
wxListCtrl::MSWOnNotify(int 6, long 1236708, long * 0x0012dd24) line 2097
wxWindow::HandleNotify(int 6, long 1236708, long * 0x0012dd24) line 3122 + 26 bytes
wxWindow::MSWWindowProc(unsigned int 78, unsigned int 6, long 1236708) line 2569 + 23 
bytes
wxWndProc(HWND__ * 0x003409ea, unsigned int 78, unsigned int 6, long 1236708) line 
2333 + 26 bytes
USER32! 77d67ad7()
USER32! 77d6ccd4()
USER32! 77d456b6()
USER32! 77d46202()
COMCTL32! 773456f8()
COMCTL32! 77349975()
COMCTL32! 77349d88()

The loop is because whenever I 'continue' in the debugger, this even
comes first (I suppose this is because the whole window must be
refreshed). When I removed the breakpoint in FreeSortAndThreadData(), I
got the assert mentioned in the previous message...

So it seems that we should have a mechanism to avoid doing anything that
is sorting/threading related while this process is going on. Thus
MustRebuildTables() should (1) not free the sorting data and (2) return
false in this case, instead of freeing the tables that are actually in
the process of being built!

inline bool HeaderInfoListImpl::MustRebuildTables() const
{
   // if we don't have tables anyhow, we surely are not going to rebuild them
   if ( !ShouldHaveTables() )
      return false;

   // if the tables exist but are out of date, i.e. we got some new messages
   // since they were built we have to rebuild them -- as we do if they don't
   // exist at all yet
   if ( !HasTransTable() || m_sizeTables < m_count || m_mustRebuildTables )
   {
      ((HeaderInfoListImpl *)this)->FreeSortAndThreadData(); // const_cast

      // there is no need to rebuild tables for 1 message only
      return m_count >= 2;
   }

   // nothing to do: tables are up to date
   return false;
}




-- 
Xavier Nodet
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." - Benjamin Franklin, 1759.


Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to