bbcp icon indicating copy to clipboard operation
bbcp copied to clipboard

`NIL dereference` error for menu item "SQL" > "Help" in 2.0 tiled interface

Open dram opened this issue 2 years ago • 2 comments

When clicking menu item "SQL" > "Help" in BlackBox-2.0-a1.098 (tiled interface) under Windows 11, a NIL dereference error will be occurred, which I think is a regression, as it works in bbcb-1.8-b1.166, and also BlackBoxMDI-2.0-a1.098.

dram avatar Aug 25 '22 13:08 dram

Thanks again for checking out BB 2.0 and pointing this out! I cannot reproduce it on my development version, so let's ask Ivan to look into this first.

Ivan, could you look into this issue?

adimetrius avatar Aug 26 '22 21:08 adimetrius

Following patch will fix this problem:

--- a/Std/Mod/Windows.odc
+++ b/Std/Mod/Windows.odc
@@ -1285,7 +1285,7 @@ MODULE StdWindows;
                VAR v, w: Windows.Window;
        BEGIN
                w := s.home;
-               IF (w = NIL) OR (st = w.doc) OR (st = w.doc.ThisView()) THEN
+               IF (w = NIL) OR (st = w.doc) OR (w.doc = NIL) OR (st = w.doc.ThisView()) THEN
                        RETURN TRUE
                ELSE
                        v := w.link;

dram avatar Aug 27 '22 11:08 dram

trial fix in version 2.0-a1.099, thanks to @adimetrius I did not see side effects for two days, so decided to commit. Anton said there was a problem, because of sequencers. Maybe he can give more accurate comment about provided fix.

iadenisov avatar Sep 07 '22 13:09 iadenisov

Fix confirmed, thanks!

dram avatar Sep 08 '22 12:09 dram