Closed Dobby233Liu closed 1 year ago
creation date = 2009-03-04T08:37:50.153-08:00
I think I've fixed it by moving the DataIsLoaded check to GetNextLang and doing a recursive loop there rather than the iterative approach, but I'm haunted by the feeling this might result in a stack overflow.
creation date: 2009-03-04T10:38:09.033-08:00
Your problem most likely derives from:
ResourceLang lang = GetNextLang();
if( _onlyLoaded ) {
while( !lang.DataIsLoaded ) {
lang = GetNextLang();
if(lang == null) return false;
}
There may be the case where you are using the dot operator on lang when it is null (as GetNextLang may return null). Either go for a try/catch, or a do/while instead of while/do, something like this:
ResourceLang lang;
if (_onlyLoaded) do
{
lang = GetNextLang();
if (lang == null) return false;
}
while (!lang.DataIsLoaded);
This is the safe way of doing it, as while condition doesn't get evaluated if there's no language
creation date = 2009-03-04T12:37:19.763-08:00
Thanks dexter, that was the problem.
Disregard my earlier comment at 16:37 today, my recursive approach was buggy and I've since independently came to the same solution as you to use a do/while but I didn't use the guard expression like that. This is my solution:
ResourceLang lang;
do {
lang = GetNextLang();
if( lang == null ) return false; // lang will be null when all the langs have been iterated through
} while( _onlyLoaded && !lang.DataIsLoaded );
_currentData = lang.Data; // this may lazy-load the data
return true;
It will be included in the next check-in.
closed date = 2009-03-14T17:42:28.823-07:00
creation date =
2009-02-28T18:32:51.507-08:00
Bug in Anolis Resourcer 0.8 Beta: Bug invoked when loading a DLL. In my case, error when loading 7-Zip's 7z.dll, navigating, and loading 7z.dll again... I dunno... (Can be caused when using the recent items list or the open files-navigate to folder list.) W3bbo: dang, I saw this error /once/ before but couldn't repro W3bbo: my ResourceEnumerator class is a bit of a hack, I knew this would happen someday -------------------------------Debug report below-------------------------------