A rather serious bug was reported to me. It causes a trap that sometimes crashes BlackBox. Seems to destroy the memory integrity of the system.
For the issue see https://redmine.blackboxframework.org/issues/202.
- Josef
issue-#202 drag & pick across BlackBox instances traps
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#202 drag & pick across BlackBox instances traps
this issue caused by illeagal memeory access, track to HostWindows.Directory.GetThisWindow,
the patch is simple(on windows):
luowy
the patch is simple(on windows):
Code: Select all
VAR mpid:INTEGER;
...
PROCEDURE (dir: Directory) GetThisWindow* (
..VAR wpid:INTEGER;
BEGIN
...
wnd := WinApi.WindowFromPoint(pt); res:=WinApi.GetWindowThreadProcessId(wnd,wpid);
IF (wnd # 0)&(wpid = mpid) THEN
...
END GetThisWindow;
...
PROCEDURE Init;
....
res:=WinApi.GetWindowThreadProcessId(main,mpid);
END;
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#202 drag & pick across BlackBox instances traps
This does not work for me.
drag & pick is now disabled at all.
- Josef
P.S. I will be on vacation the next 2 weeks and only occasionally on the internet.
drag & pick is now disabled at all.
- Josef
P.S. I will be on vacation the next 2 weeks and only occasionally on the internet.
Re: issue-#202 drag & pick across BlackBox instances traps
i test it ok:
1, drag&drop selected text to another bb instance window worked as before;
2,holding the alt key and drap the selected text on another instance bb window is forbidden, no trap window anymore
1, drag&drop selected text to another bb instance window worked as before;
2,holding the alt key and drap the selected text on another instance bb window is forbidden, no trap window anymore
Re: issue-#202 drag & pick across BlackBox instances traps
Drag & pick (between instances) being not allowed seems better than having it crash.
I don't think that not being able to drag & pick between instances is a serious limitation.
I don't think that not being able to drag & pick between instances is a serious limitation.
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#202 drag & pick across BlackBox instances traps
It has been reported to me that if the line in Init is appended to CreateMainWindows then it works.
- Josef
- Josef
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#202 drag & pick across BlackBox instances traps
I have committed the fix to the issue branch.
For the changes see https://redmine.blackboxframework.org/p ... 44565bf663.
The fix is as proposed by luowy except that mpid initialization is done in CreateMainWindows, not in Init.
@luowy: please check.
- Josef
For the changes see https://redmine.blackboxframework.org/p ... 44565bf663.
The fix is as proposed by luowy except that mpid initialization is done in CreateMainWindows, not in Init.
@luowy: please check.
- Josef
Re: issue-#202 drag & pick across BlackBox instances traps
ok! The change is more reasonable.
- Josef Templ
- Posts: 2047
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#202 drag & pick across BlackBox instances traps
There seems to be no problem with the fix.
So I would like to propose to continue with the voting.
- Josef
So I would like to propose to continue with the voting.
- Josef