Access Violation v7.5.3

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34839
    TAZ
    Participant

    Hello Again,

    I am assuming that this is new code. In sSkinProvider.pas file line 6154, Form.WindowMenu is nil. When you press on a menu item you get an access violation. Attached project and Eureka Log error file.

    I would classify this as a priority because for people like me, I no longer have v7.5.2 which means my projects access to menu items is useless until a fix is released.

    By the way, until the menu item is fixed I cannot test the border icons issue you said was resolved.

    Thanks.

    More investigation.

    Here is the code from v7.5.1

    if (Form.FormStyle = fsMDIForm) and (Form.MDIChildCount > 0) and (Form.WindowMenu <> nil) then

    begin

    if Form.WindowMenu.Handle = Message.MenuPopup then

    begin

    // Clear old items

    i := Form.WindowMenu.Count – 1;

    while i >= 0 do

    begin

    if Form.WindowMenu.Items.Tag and $200 = $200 then

    Form.WindowMenu.Delete(i);

    dec(i);

    end;

    c := GetMenuItemCount(Message.MenuPopup);

    i := c;

    while i >= 0 do

    begin

    if GetItemText(i, s, sCut, MF_BYPOSITION) then

    begin

    RemoveMenu(Message.MenuPopup, i, MF_BYPOSITION);

    dec(i);

    Continue;

    end;

    mi.cbSize := SizeOf(mi);

    mi.fMask := MIIM_STATE or MIIM_DATA or MIIM_FTYPE;

    if GetMenuItemInfo(Message.MenuPopup, i, True, mi) then

    begin

    if (mi.dwItemData = 0) and (mi.fType and MF_SEPARATOR = MF_SEPARATOR) then

    RemoveMenu(Message.MenuPopup, i, MF_BYPOSITION);

    end;

    dec(i);

    end;

    Here is the code from v7.5.3

    /////////////////////

    // Remove MDI items

    i := Form.WindowMenu.Count – 1; <<<<<<<<<<<<<<<<<<<<
    while i >= 0 do begin

    if Form.WindowMenu.Items.Tag and $200 = $200 then

    Form.WindowMenu.Delete(i);

    dec(i);

    end;

    if (Form.FormStyle = fsMDIForm) and (Form.MDIChildCount > 0) and (Form.WindowMenu <> nil) then

    begin

    if Form.WindowMenu.Handle = Message.MenuPopup then

    begin

    // Clear old items

    c := GetMenuItemCount(Message.MenuPopup);

    i := c;

    while i >= 0 do begin

    if GetItemText(i, s, sCut, MF_BYPOSITION) then

    begin

    RemoveMenu(Message.MenuPopup, i, MF_BYPOSITION);

    dec(i);

    Continue;

    end;

    mi.cbSize := SizeOf(mi);

    mi.fMask := MIIM_STATE or MIIM_DATA or MIIM_FTYPE;

    if GetMenuItemInfo(Message.MenuPopup, i, True, mi) then

    begin

    if (mi.dwItemData = 0) and (mi.fType and MF_SEPARATOR = MF_SEPARATOR) then

    RemoveMenu(Message.MenuPopup, i, MF_BYPOSITION);

    end;

    dec(i);

    end;

    #46943
    Support
    Keymaster

    Hello and thank you for a help. The issue is solved now.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.