stack par has been changed (...WPRTEReport.pas, line 2857)

  • Hello!

    v5.17.4:
    When one of my reports are created (with TWPSuperMerge), the following assertion is thrown:

    stack par has been changed (...WPRTEReport.pas, line 2857)

    Then, when closing the report window, the program displays "Abnormal program termination" and hangs up.
    The report contains nothing unusual: cascaded bands, headers, footers. What could be the reason?

    Thanx in advance,
    E. Hess

    • Offizieller Beitrag

    The code which triggers the assertion is

    Code
    par := work.FCurrentParagraph.ParentPar;
    work := Pop;
    dec(level);
    if work.FCurrentParagraph <> par then
    begin
       Assert(work.FCurrentParagraph = par, 'stack par has been changed');
    end;

    the 'if' that makes it easy to place a break point on the Assert() line to use the debugger before the exception happens.

    In the code above 'pop' selects the previous level and the new current paragraph should be the same as the parent paragraph of the current working paragraph. Groups use the parent-Child relation ship.

    The assertion checks if template has been changed during the report creation, if the paragraph has been updated. Changing the text or properties should not cause any trouble.

    It would be interesting to see what your codes does in the events.

    Julian Ziersch

  • I found out, that the RTF was build with an older WPTools 4 version (4.08 - 4.20, may be).

    I saved the RTF, then after saving, the program hanged up again, but apparently the RTF was succesfully saved (in a changed format).
    After restarting, saving the RTF and running Supermerge were ok.

    BTW, MultiDemo also has problems with this RTF...

    It seems, that WPTools 5 is sometimes not downward-compatible with some RTFs created with an older WPTools 4 version. Did you hear about it? The RTF contains some images.

    But at the moment, the problem is solved for me.

    Kind regards,
    E. Hess

    • Offizieller Beitrag

    Hi,

    I just fixed a problem with tables which were combined by wptools 5. WPTiools 4 did not see tables as objects, so there was a difference.

    The reports of wptools 4 used start and stop markers, in wptools 5 a tree is built. But I didn't hear of complications when loading old templates so far, the start/stop markers are converted into the tree structure - and at save time start/stop codes are written.

    In case of a question I favourice the compatibility to Word over WPTools 4.

    Julian