In the following snippet :
BOOL CALLBACK IoEditProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg)
{
case WM_INITDIALOG:
MoveWindow(hwnd, (POINT *)lParam- //As you press '>' to complete pointer symbol autocomplete crashes the IDE
The statement should have been:
MoveWindow(hwnd, ((POINT *)lParam)->x, ((POINT *)lParam)->y, width, height, TRUE);
I will see if I can reproduce this. Right now I can't...
Thanks Pelle.
I made an error reporting the snippet, now I have fixed it (was missing the 'lParam' in 'MoveWindow(hwnd, (POINT *)lParam-').
I can confirm that it happen almost always when a cast to a pointer is applied.
It crashes version 10 as well.
to reproduce first paste in the line below
MoveWindow(hwnd, ((POINT *)lParam)->x, ((POINT *)lParam)->y, width, height, TRUE);
1) remove second ) shown in red
2) remove first > shown in red
3) now put first > back and then click in the iDE somewhere else.
IDE will go busy then 'not responding' then total crash a few moments later.
Restart IDE and it will ask if you want to restore the open file from a backup.
John Z
Quote from: frankie on November 21, 2021, 10:14:57 PM
I made an error reporting the snippet, now I have fixed it (was missing the 'lParam' in 'MoveWindow(hwnd, (POINT *)lParam-').
I can confirm that it happen almost always when a cast to a pointer is applied.
OK, thanks, now I can reproduce...
(...even the Visual Studio JIT-debugger catches on, eventually, after a minute or so... not terribly impressive...)