![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Bug in delta.inc Topic Summary: Created On: 7-Feb-2007 18:30 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
The delta.inc function has a bug in it where sometimes when the old text is not empty and the new text is empty, the result returned is incorrect. For example. In one instance in one of our modules the old value of the attribute in a baseline was "NO GO" and the current value of the attribute was "". The result returned by the delta.inc function deltaText() was "NONONO GO" with the "NONO" portion being marked up as new text and the "NO GO" portion being marked up as unchanged except the space which was marked as deleted. (The deltaText() function returns RTF formated text with new text being bolded and underlined and deleted text from the old text being bolded and strike-through). I don't take credit for Telelogic's code I'm just posting the whole thing with my few changes. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 7-Feb-2007 at 18:32 by David Pechacek |
|
![]() |
|
![]() |
|
Yes. deltaText.inc worked fine for Layout DXL since only one calculation was made. But it failed when called regularly. Comparing it to delteBuf.inc revealed the bug: one of the token lists was preserved between runs resulting in strange results. I 'fixed' it by deleting and creating one of the skips in the interface function (at the bottom), the 'mapping' Skip IIRC. The other globabl data structures could reasonably be preserved since they just map words to tokens; and in fact keeping them made it run faster; but I found for massive runs of deltaText (e.g. comparing source text to Proposed Text for all active CPs in the project) I had to delete and recreate them every now and then since they got out of hand.
Anyway the new 'diff' function works pretty well although it has a memory leak issue. - Louie |
|
![]() |
|
![]() |
|
Yes. deltaText.inc worked fine for Layout DXL since only one calculation was made. But it failed when called regularly. Comparing it to delteBuf.inc revealed the bug: one of the token lists was preserved between runs resulting in strange results. I 'fixed' it by deleting and creating one of the skips in the interface function (at the bottom), the 'mapping' Skip IIRC. The other globabl data structures could reasonably be preserved since they just map words to tokens; and in fact keeping them made it run faster; but I found for massive runs of deltaText (e.g. comparing source text to Proposed Text for all active CPs in the project) I had to delete and recreate them every now and then since they got out of hand.
Anyway the new 'diff' function works pretty well although it has a memory leak issue. - Louie |
|
![]() |
Telelogic DOORS
» Defect/Issue Tracking
»
Bug in delta.inc
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.