Author Topic: How to get more info about exception?  (Read 459 times)


  • Newbie
  • Posts: 4
How to get more info about exception?
« on: May 02, 2019, 10:15:14 pm »
I get the "List index (1722) out of bounds" exception, but there's no useful info in the debugger (check the screenshots attached)
I cannot find out the place, from where the wrong index comes, there are only exception functions in the stack trace

Context: the TZipper packing (SaveToStream) over 2k files with total size over 40 GB inside the Execute of TThread descendant. It all goes fine until the last file has been packed (I receive the OnEndFile event). And then after the short pause and before returning to the caller method the exception raises.
I must say that the destination stream is my TStream descendant. It holds a bunch of TFileStreams (via TFPGObjectList) and switches between them on the fly (yes, it is a self-made multi-volume zip))). At first I thought the problem was there, but then I tried the ordinal TFileStream and got the same error. Moreover I get no problems on both streams with less files count and less files size. Looks weird.
There are only approximate line numbers in stack trace. And breakpoints don't work inside the zipper unit. And no exceptions go from my units including TStream descendant. I'm really confused((

I studied wiki for help ( and links included) but couldn't manage to get more info - given methods provide the same info as IDE
Default Debug options are used for the project and optimizations are switched to 0
Am I missing something? Maybe some complier options or environment things could help?


  • Administrator
  • Hero Member
  • *
  • Posts: 5956
    • wiki
Re: How to get more info about exception?
« Reply #1 on: May 02, 2019, 10:58:59 pm »
This is a standard 64bit Lazarus install?

Try downloading an updated gdb:

In my tests, the old one gives an error (albeit an different one), but the new one works.

All you need is the gdb.exe file.
Replace the one in your lazarus dir

Or save it elsewhere, and change the debugger options: menu > Tools > Options


  • Newbie
  • Posts: 4
Re: How to get more info about exception?
« Reply #2 on: May 03, 2019, 08:33:20 am »
Yes, it is a standart 64bit install

Well, it gets less weird with the new gdb, thank you)