View Issue Details

IDProjectCategoryView StatusLast Update
0017263LazarusIDEpublic2010-08-27 07:11
ReporterРустам Асмандияров Assigned ToPaul Ishenin  
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Fixed in Version0.9.29 (SVN) 
Summary0017263: ListView shows a critical error.
DescriptionИзвените за мой плохой английский я перевожу через гугл.
В компоненте ListView , при добавлении нового элемента в колонку, появляется критическая ошибка List index (0) out of bounds .

Sorry for my bad English, I translate through Google.
As a component of the ListView, when you add a new element in the column, there is a critical error List index (0) out of bounds.
TagsNo tags attached.
Fixed in Revision27199
Attached Files


2010-08-25 19:03


1.jpg (128,953 bytes)   
1.jpg (128,953 bytes)   

Рустам Асмандияров

2010-08-26 09:49

reporter   ~0040455

Product Version Lazarus-0.9.29-27175

Anton Kavalenka

2010-08-26 10:24

reporter   ~0040457

Last edited: 2010-08-26 10:25

Also have seen that bug.
if no columns are added in Columns collection, addition of new item via Items.Add cause List index out of bounds error.

Рустам Асмандияров

2010-08-26 11:43

reporter   ~0040462

Извените я немного неправильно описал проблему, ошибка в ListItems при добавлении.
Я немного проследил откуда появляется ошибка и нашел ее тут:

Sorry I was a little wrong to describe the problem, the error in ListItems in the appendix.
I watched from a little error and found it here:

procedure TListItems.AddItem(AItem: TListItem);
  FCacheIndex := FItems.Add(AItem);
  FCacheItem := AItem;

  if WSUpdateAllowed
  then WSCreateCacheItem; //Here error

  //Notify parent TListView that something was added.
  if FOwner <> nil
  then FOwner.ItemInserted(AItem);

Anton Kavalenka

2010-08-26 12:27

reporter   ~0040465

Last edited: 2010-08-26 12:28 , line 681

in procedure
class procedure TWin32WSCustomListView.ItemSetText()
if ALV.Column[ASubIndex].AutoSize and (TCustomListViewAccess(ALV).GetUpdateCount = 0) then
    ListView_SetColumnWidth(ALV.Handle, ASubIndex, AutoSizeWidth);

ALV.Column[ASubIndex] raises EListError when the ListView has no columns defined

Adding at least one column to ListView eliminates the problem.

IMO - this is error - referencing columns without checking if there are some.
List views can be used without columns to display list of icons with text (vsIcon mode).

Рустам Асмандияров

2010-08-26 13:56

reporter   ~0040474

Yes, after your description of the problem has been resolved, thanks a lot! This would avoid the errors in my project until the developers Lazarus solve the problem.

Да, после вашего описания ошибка исчезла, спасибо больше! Это позволит избежать ошибок в моем проекте пока разработчики лазаруса решат проблему.

Paul Ishenin

2010-08-26 18:40

manager   ~0040495

Thanks for deep analyses. Please test and close if ok.

Рустам Асмандияров

2010-08-27 07:11

reporter   ~0040511

Problem solved

Issue History

Date Modified Username Field Change
2010-08-25 19:03 Рустам Асмандияров New Issue
2010-08-25 19:03 Рустам Асмандияров File Added: 1.jpg
2010-08-25 19:03 Рустам Асмандияров Widgetset => Win32/Win64
2010-08-26 09:49 Рустам Асмандияров Note Added: 0040455
2010-08-26 10:24 Anton Kavalenka Note Added: 0040457
2010-08-26 10:25 Anton Kavalenka Note Edited: 0040457
2010-08-26 11:43 Рустам Асмандияров Note Added: 0040462
2010-08-26 12:27 Anton Kavalenka Note Added: 0040465
2010-08-26 12:28 Anton Kavalenka Note Edited: 0040465
2010-08-26 13:56 Рустам Асмандияров Note Added: 0040474
2010-08-26 18:40 Paul Ishenin Fixed in Revision => 27199
2010-08-26 18:40 Paul Ishenin LazTarget => -
2010-08-26 18:40 Paul Ishenin Status new => resolved
2010-08-26 18:40 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2010-08-26 18:40 Paul Ishenin Resolution open => fixed
2010-08-26 18:40 Paul Ishenin Assigned To => Paul Ishenin
2010-08-26 18:40 Paul Ishenin Note Added: 0040495
2010-08-27 07:11 Рустам Асмандияров Status resolved => closed
2010-08-27 07:11 Рустам Асмандияров Note Added: 0040511