@domasz
Next time please do the following:
1. Build Lazarus with profile Debug IDE
2. Open package atbinhex_package.lpk, go to Compiler Option->Custom Option. Add $(IDEBuildOptions) to options, so you can debug the package
3. Open lazarus.lpi(IDE folder) then run the project, this will open another instance of Lazarus
4. Drop a TATBinHex component to the form, the first instance will break
5. Open Edit->Debug Window->Call Stack, notice that the issue originates from TATBinHex Redraw method(see attached image)
6. Redraw will call method HideScrollbars, which internally will call a ChangeBound, which will fail because no parent window is available at this moment. A possible solution is to check if parent is nil:
procedure TATBinHex.HideScrollbars;
var
si: TScrollInfo;
begin
if Self.Parent = nil then //<-- add this
Exit; //and this
FillChar(si, SizeOf(si), 0);
with si do
begin
cbSize := SizeOf(si);
fMask := SIF_ALL;
end;
SetScrollInfo(Handle, SB_VERT, si, True);
SetScrollInfo(Handle, SB_HORZ, si, True);
end;
7. Create a patch and report your findings to forum user AlexTP, so he can fix it on githbuh(
https://github.com/Alexey-T/ATBinHex-Lazarus)
8. After the package is fixed, I can update in OPM