* * *

Author Topic: [SOLVED] Error "List index (0) out of bounds" while opening form in IDE on Linux  (Read 5961 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3363
  • I like bugs.
Hi, guys! If i open my project in IDE on Windows (XP, 7, 10 - any) its opens normally. If i open same project in Lazarus on my Ubuntu Mate 16.04 x64 desktop, i see error: "List index (0) out of bounds".
@Unvictis, are you still reading this forum?
I can reproduce the issue :
  http://bugs.freepascal.org/view.php?id=31380
and I debugged it for a long time. See my note there.
To reproduce on different platforms you should build the IDE with all possible debug flags, including -gt or -gtt.
Even then it may not reproduce everywhere. Linux may be better for debugging such issues than WinXP.

I hope either my workaround or a proper fix by Jesus Reyes will be merged to Lazarus 1.8.

After some testings, I found the culprit. I can't explain why, but I have solution to fix the error.

Use your text editor to open fDevEditor.pas and add dgIndicator in the line 125. So it will become:
Quote
Options = [dgIndicator, dgColumnResize, dgColumnMove, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgTruncCellHints]
Did you figure it out without studying the code? Quite amazing!
The reason can be seen in function TCustomDBGrid.UpdateGridCounts.
With dgIndicator both column count and row count are incremented -> the columns are not cleared later.
This forum thread is marked as [SOLVED]. It is not solved yet but now we are closer.  :)
« Last Edit: September 22, 2017, 03:49:47 pm by JuhaManninen »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3363
  • I like bugs.
I fixed it myself. Please test.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus