[DUG] Access violation in TTntCustomListView (Delphi 7)

Ross Levis ross at stationplaylist.com
Mon Nov 3 20:06:49 NZDT 2014


I hope someone can help.  I'm using the freeware TNT controls with D7 for a
TTntListView component.  This is working fine for many users but one user
experiences a crash when simply using the keyboard to move up and down the
listview.  He is using Win8 64-bit as I do here, but I can't duplicate it.

 

It is a virtual listview using OnData.  Here is a portion of a MadExcept
log.  Can provide more if required.

 

exception message : Access violation at address 0050DA73 in module
'SPLStudio.exe'. Write of address 00000000.

 

main thread ($d88):

0050da73 SPLStudio.exe TntWideStrUtils   180  +10 WStrLCopy

0053e20e SPLStudio.exe TntComCtrls      2104  +46
TTntCustomListView.CNNotify

004f304f SPLStudio.exe Controls         4645  +53 TControl.WndProc

004f6d5e SPLStudio.exe Controls         6342  +33 TWinControl.WndProc

004c04a5 SPLStudio.exe ComCtrls        14815  +12 TCustomListView.WndProc

0053dee4 SPLStudio.exe TntComCtrls      2023  +98 TTntCustomListView.WndProc

00539335 SPLStudio.exe TntControls       666  +19 TWinControlTrap.WindowProc

004f2d5a SPLStudio.exe Controls         4552   +5 TControl.Perform

004f6f20 SPLStudio.exe Controls         6388   +6 DoControlMsg

004f772f SPLStudio.exe Controls         6579   +1 TWinControl.WMNotify

...

Code in TntComCtrls.pas where it crashes updating a list item caption...

 

      // handle any text info

      with PLVDispInfoW(NMHdr)^.item do

      begin

        if (mask and LVIF_TEXT) <> 0 then

        begin

          Item := GetItemW(PLVDispInfoW(NMHdr)^.item);

          if iSubItem = 0 then

>>>>>  WStrLCopy(pszText, PWideChar(Item.Caption), cchTextMax - 1)

          else begin

            with Item.SubItems do begin

              if iSubItem <= Count then

                WStrLCopy(pszText, PWideChar(Strings[iSubItem - 1]),
cchTextMax - 1)

              else pszText[0] := #0;

            end;

          end;

        end;

      end;

 

Any ideas appreciated.

 

Thanks,

Ross,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20141103/b9808a13/attachment.html 


More information about the Delphi mailing list