Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PANIC-PANIC during Quick view of a directory containing inaccessible folders #2207

Closed
spnethw opened this issue May 7, 2024 · 2 comments · Fixed by #2251
Closed

PANIC-PANIC during Quick view of a directory containing inaccessible folders #2207

spnethw opened this issue May 7, 2024 · 2 comments · Fixed by #2251

Comments

@spnethw
Copy link
Contributor

spnethw commented May 7, 2024

После fa01a50 far2l стал падать при попытке быстрого просмотра папки, содержащей папки, недоступные для текущего пользователя (скажем, если попытаться посмотреть /home по Ctrl-Q, и там есть папки других пользователей с атрибутами rwx------).
Без разницы, был введён пароль или нет, far2l падает в PANIC-PANIC-PANIC.

UPD: по F3 на такой папке тоже падает.

UPD2: а вот эта бага #2047 вроде бы, наоборот, ушла... 👀

Похоже, проблема связана с новым флагом bDamaged и возникает тут:

if (!rec->Event.WindowBufferSizeEvent.bDamaged && (PScrX + 1 == CurSize.X && PScrY + 1 == CurSize.Y)) {

@spnethw
Copy link
Contributor Author

spnethw commented May 20, 2024

Непосредственное падение происходит в строчке

Message(0, 0, Title, Msg::ScanningFolder, Name, strSize);

На момент вызова в Title и Name значения null.

Цепочка вызовов:

PreRedrawItem preRedrawItem = PreRedraw.Peek();
if (preRedrawItem.PreRedrawFunc) {
preRedrawItem.PreRedrawFunc();
}

static void PR_DrawGetDirInfoMsg()
{
PreRedrawItem preRedrawItem = PreRedraw.Peek();
DrawGetDirInfoMsg((const wchar_t *)preRedrawItem.Param.Param1,
(const wchar_t *)preRedrawItem.Param.Param2,
reinterpret_cast<const UINT64>(preRedrawItem.Param.Param3));
}

static void DrawGetDirInfoMsg(const wchar_t *Title, const wchar_t *Name, const UINT64 Size)
{
FARString strSize;
FileSizeToStr(strSize, Size, 8, COLUMN_FLOATSIZE | COLUMN_COMMAS);
RemoveLeadingSpaces(strSize);
Message(0, 0, Title, Msg::ScanningFolder, Name, strSize);
PreRedrawItem preRedrawItem = PreRedraw.Peek();
preRedrawItem.Param.Param1 = (void *)Title;
preRedrawItem.Param.Param2 = (void *)Name;
preRedrawItem.Param.Param3 = reinterpret_cast<LPCVOID>(Size);
PreRedraw.SetParam(preRedrawItem.Param);
}

@unxed
Copy link
Contributor

unxed commented May 20, 2024

Заметил тоже. Проще всего на /tmp воспроизвести.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants