View Issue Details

IDProjectCategoryView StatusLast Update
0020715LazarusIDEpublic2011-11-20 21:23
ReporterLudo BrandsAssigned ToMartin Friebe 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSwindowsOS VersionXP
Product Version0.9.31 (SVN)Product Build33539 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0020715: Codetools [TCodeCache.LoadFile] Inconsistency found when loading debugger source file
DescriptionBreaking a program in the IDE with an assembler window active brings up an exception window complaining about diskfile inconsistency. See backtrace in additional information. Clicking ignore will continue the debugger correctly but the exception is raised again for every step in the source or when hovering over a variable.
The debugger passes the filename with / as dir separator and in TCTDirectoryCachePool.GetCache AppendPathDelim(TrimFilename(Directory)) adds a \ to the directory resulting in a dir terminated with /\
Additional InformationBacktrace.

ERROR: Exception occured in TGDBMIDebuggerCommandDisassembe.DoExecute Exception
Msg="[TCodeCache.LoadFile] Inconsistency found: AFilename="C:/lazarus/fpc/svn/rt
l/inc/variants.pp" FindDiskFilename="C:/lazarus/fpc/svn/rtl/inc/\variants.pp" Co
mpareFilenames=1" Addr=0072C29D Dbg.State=Pause
  $0072C29D FINDDISKFILENAMEINCONSISTENT, line 583 of codecache.pas
  $0072C00C TCODECACHE__LOADFILE, line 598 of codecache.pas
  $0071F54A TCODETOOLMANAGER__LOADFILE, line 1120 of codetoolmanager.pas
  $00BDBA32 TASSEMBLERDLG__GETSOURCECODELINE, line 935 of C:/lazarus/debugger/
assemblerdlg.pp
  $00BDC258 TASSEMBLERDLG__UPDATELINEDATAEX, line 1121 of C:/lazarus/debugger/
assemblerdlg.pp
  $00BDBB32 TASSEMBLERDLG__UPDATELINEDATA, line 948 of C:/lazarus/debugger/ass
emblerdlg.pp
  $00BDA940 TASSEMBLERDLG__UPDATEVIEW, line 673 of C:/lazarus/debugger/assembl
erdlg.pp
  $00BD955A TASSEMBLERDLG__DISASSEMBLERCHANGED, line 488 of C:/lazarus/debugge
r/assemblerdlg.pp
  $00839FF5 TIDEDISASSEMBLER__DOCHANGED, line 10279 of C:/lazarus/debugger/deb
ugger.pp
  $00839A85 TBASEDISASSEMBLER__CHANGED, line 10150 of C:/lazarus/debugger/debu
gger.pp
  $00839C09 TBASEDISASSEMBLER__SETBASEADDR, line 10212 of C:/lazarus/debugger/
debugger.pp
  $00839F6F TIDEDISASSEMBLER__DOCHANGED, line 10271 of C:/lazarus/debugger/deb
ugger.pp
  $00839A85 TBASEDISASSEMBLER__CHANGED, line 10150 of C:/lazarus/debugger/debu
gger.pp
  $00839BCC TBASEDISASSEMBLER__SETCOUNTAFTER, line 10204 of C:/lazarus/debugge
r/debugger.pp
  $00839F5B TIDEDISASSEMBLER__DOCHANGED, line 10270 of C:/lazarus/debugger/deb
ugger.pp
  $00839A85 TBASEDISASSEMBLER__CHANGED, line 10150 of C:/lazarus/debugger/debu
gger.pp
  $00839B9C TBASEDISASSEMBLER__SETCOUNTBEFORE, line 10196 of C:/lazarus/debugg
er/debugger.pp
TagsNo tags attached.
Fixed in Revision33649
LazTarget0.99.0
WidgetsetWin32/Win64
Attached Files

Activities

Martin Friebe

2011-11-20 19:09

manager   ~0054314

I can not reproduce this.

Can you attach a sample app?
How to you break? By reaching a breakpoint or pressing pause?

Martin Friebe

2011-11-20 19:26

manager   ~0054315

Please also try with r 33649

Ludo Brands

2011-11-20 19:55

developer   ~0054317

I have the rtl compiled with -gl -gs and put a breakpoint in variant.pp. It is important to have an dissasemble window open to reproduce the problem.
There were some recent changes (0020606: Codetool failure on "Find procedure") that I suspect to be linked to this. I just reverted to r33218 because r33219 introduced the FindDiskFilenameInconsistent exception. TCTDirectoryCachePool.GetCache received also a filename with / and added a \ to the dir but that didn't matter. r33219 introduced a
DiskFilename:=FindDiskFilename(AFilename);
if FindFile(DiskFilename)<>nil then <- fails
  FindDiskFilenameInconsistent;
Result.Filename:=DiskFilename;
while before it was
Result.Filename:=GetFilenameOnDisk(AFilename);
which just copied AFilename to Result.Filename.
I'll try r33649 now.

Ludo Brands

2011-11-20 20:17

developer   ~0054318

r33649 solves the problem. Filename is now passed to the codetools with \ dir separator. I guess FindDiskFilenameInconsistent just revealed an old existing problem. Thanks for the quick solution.

Issue History

Date Modified Username Field Change
2011-11-20 18:52 Ludo Brands New Issue
2011-11-20 18:52 Ludo Brands Widgetset => Win32/Win64
2011-11-20 19:09 Martin Friebe LazTarget => -
2011-11-20 19:09 Martin Friebe Note Added: 0054314
2011-11-20 19:09 Martin Friebe Status new => feedback
2011-11-20 19:10 Martin Friebe Assigned To => Martin Friebe
2011-11-20 19:26 Martin Friebe Note Added: 0054315
2011-11-20 19:55 Ludo Brands Note Added: 0054317
2011-11-20 20:17 Ludo Brands Note Added: 0054318
2011-11-20 20:45 Martin Friebe Fixed in Revision => 33649
2011-11-20 20:45 Martin Friebe LazTarget - => 0.99.0
2011-11-20 20:45 Martin Friebe Status feedback => resolved
2011-11-20 20:45 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2011-11-20 20:45 Martin Friebe Resolution open => fixed
2011-11-20 20:45 Martin Friebe Target Version => 0.99.0
2011-11-20 21:23 Ludo Brands Status resolved => closed