Recent

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

cch

  • Newbie
  • Posts: 6
How to get more info about exception?
« on: May 02, 2019, 10:15:14 pm »
Hi!
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 (http://wiki.lazarus.freepascal.org/Logging_exceptions 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?
Thanks

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • 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:
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Alternative%20GDB/GDB%208.2/

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
p:\lazarus18\mingw\x86_64-win64\bin\gdb.exe

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

cch

  • Newbie
  • Posts: 6
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)

 

TinyPortal © 2005-2018