View Issue Details

IDProjectCategoryView StatusLast Update
0021480LazarusLCLpublic2012-03-16 07:45
ReporterJoost van der SluisAssigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0021480: TValueListEditor streaming problems
DescriptionWhen loading a TValueListEditor from a resource I have a 'List index (-1) out of bounds' exception.

The problem is that for the cells-property *all* cells are written to the .lfm. Including the cells in the FixedRows region. But when the cells are read the code expects no FixedRows within the cells-property. (FixedRows is substracted from the row-index, which leads to a reference to row -1)

I don't know how to fix this properly (Why is the cells-property streamed at all?!?) so that's what this bug-report is for. The backtrace is below.

To reproduce: drop a TValueListEditor on a form, and add two strings to the TitleCaptions-property. Then run the application.


#0 fpc_raiseexception(0x9df668, 0xffffffff, 0x7ffff7fef9c0) at ../inc/except.inc:170
0000001 ERROR(0x7ffff7fef9c0, 0x9df668 'List index (%d) out of bounds', -1) at ../objpas/classes/stringl.inc:408
0000002 PUT(0x7ffff7fef9c0, -1, 0x7ffff0aae358 'IDL-Type=Pascal-Type') at ../objpas/classes/stringl.inc:1056
0000003 SETCELLS(0x7ffff7fca410, 0, 0, 0x7ffff0aae258 'IDL-Type') at valedit.pas:464
0000004 READCELLS(0x7ffff7fca410, 0x7ffff1938700) at grids.pas:9678
0000005 DEFINEPROPERTY(0x7ffff1938700, 0xb17268 'Cells', {Proc = {procedure (POINTER, TREADER)} 0x7fffffffcc28, Self = 0x7ffff7fca410}, {Proc = {procedure (POINTER, TWRITER)} 0x7fffffffcc18, Self = 0x7ffff7fca410}, true) at ../objpas/classes/reader.inc:608
0000006 DEFINEPROPERTIES(0x7ffff7fca410, 0x7ffff1938700) at grids.pas:9936
0000007 READPROPERTY(0x7ffff1938700, 0x7ffff7fca410) at ../objpas/classes/reader.inc:1243
0000008 READDATA(0x7ffff1938700, 0x7ffff7fca410) at ../objpas/classes/reader.inc:965
0000009 READSTATE(0x7ffff7fca410, 0x7ffff1938700) at ../objpas/classes/compon.inc:317
0000010 READSTATE(0x7ffff7fca410, 0x7ffff1938700) at include/control.inc:3567
0000011 READCOMPONENT(0x7ffff1938700, 0x0) at ../objpas/classes/reader.inc:929
0000012 READDATA(0x7ffff1938700, 0x7ffff7fc5450) at ../objpas/classes/reader.inc:978
0000013 READSTATE(0x7ffff7fc5450, 0x7ffff1938700) at ../objpas/classes/compon.inc:317
0000014 READSTATE(0x7ffff7fc5450, 0x7ffff1938700) at include/control.inc:3567
0000015 READCOMPONENT(0x7ffff1938700, 0x0) at ../objpas/classes/reader.inc:929
0000016 READDATA(0x7ffff1938700, 0x7ffff7fc4c70) at ../objpas/classes/reader.inc:978
0000017 READSTATE(0x7ffff7fc4c70, 0x7ffff1938700) at ../objpas/classes/compon.inc:317
0000018 READSTATE(0x7ffff7fc4c70, 0x7ffff1938700) at include/control.inc:3567
0000019 READROOTCOMPONENT(0x7ffff1938700, 0x7ffff7fc4c70) at ../objpas/classes/reader.inc:1437
0000020 INITCOMPONENT(0x7fffffffdb70, 0x997880) at lresources.pp:3090
0000021 INITLAZRESOURCECOMPONENT(0x7ffff7fc4c70, 0x98afa0) at lresources.pp:3110
0000022 INITRESOURCECOMPONENT(0x7ffff7fc4c70, 0x98afa0) at lresources.pp:801
0000023 CREATE(0x7ffff7fc4c70, 0x0, 0x7ffff7f8e350) at include/customform.inc:1864
0000024 CREATE(0x7ffff7fc4c70, 0x1, 0x7ffff7f8e350) at include/customform.inc:2955
0000025 CREATEFORM(0x7ffff7f8e350, 0x997880, 0) at include/application.inc:2166
0000026 main at project1.lpr:19
TagsNo tags attached.
Fixed in Revision36064
LazTarget0.99.0
Widgetset
Attached Files

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2012-03-14 13:19 Joost van der Sluis New Issue
2012-03-14 13:19 Joost van der Sluis LazTarget => -
2012-03-14 16:45 Zeljan Rikalo Status new => assigned
2012-03-14 16:45 Zeljan Rikalo Assigned To => Jesus Reyes
2012-03-16 07:45 Jesus Reyes Fixed in Revision => 36064
2012-03-16 07:45 Jesus Reyes LazTarget - => 0.99.0
2012-03-16 07:45 Jesus Reyes Status assigned => resolved
2012-03-16 07:45 Jesus Reyes Fixed in Version => 0.9.31 (SVN)
2012-03-16 07:45 Jesus Reyes Resolution open => fixed
2012-03-16 07:45 Jesus Reyes Target Version => 0.99.0