Menu

#62 Application error (no such variable "Cbg") when trying to display change bars

V4.3.5
closed-fixed
None
7
2020-06-16
2019-01-02
Marky Mark
No

Trying to enable "Show Change Bars" I get 3 Application Errors: 1 saying that "Cbg" doesn't exist and 2 further "0.0.1.0" ones. Also note the resulting missing line numbers on the LHS.

1 Attachments

Discussion

  • michael-m

    michael-m - 2019-01-03
    • status: open --> accepted
    • assigned_to: michael-m
    • Priority: 5 --> 7
     
  • michael-m

    michael-m - 2019-01-03

    My, my, isn't that ugly!
    A quick look suggests there is some kind of "sneak path" in the logic, as it at first appears that Cbg should have been created immediately before its first usage. I'm less concerned with the missing line-numbering as I suspect it is an artifact of TCL error recovery (it likely STOPPED the current procedure and bailed out back to the caller). The other symptom (the 0.0. 1.0 error) may be something similar as scroll-syncing would have been performed after the number rendering; anyway, I'll figure it out.
    Am I correct that to expose this problem you either used the View->Show ChangeBars menu item, or perhaps a Preferences "edit" to toggle the setting? And was that after the conditions shown in your other error report (#61)? They may actually be related....

     
  • Marky Mark

    Marky Mark - 2019-01-03

    Yes, this problem arose when I started with both the "Ignore blanks when diffing" and "Suppress diffs of empty lines" Preference settings on and then toggled View->ShowChangeBars from off to on. The same thing happens if I toggle it in Preferences.

    Yes, it was after #61. That describes what I see immediately on startup.

    I forgot to supply the error details before, although Cbg occurs only in the one place I think; still, here it is:

    can't read "Cbg": no such variable
    can't read "Cbg": no such variable
    while executing
    "$w(${side}Info) create rect $Dims -fill $Cbg -outline $Cbg"
    (procedure "plot-line-info" line 119)
    invoked from within
    "plot-line-info Left"
    (command bound to event)

    I agree about the missing line-numbers probably being an artifact.

    While checking this I came across another problem, perhaps again related. This time I start with "Ignore blanks when diffing" off but "Suppress diffs of empty lines" on as before. If I toggle View->ShowChangeBars from off to on, I get the same Cbg error as before, but if I toggle it in Preferences, I get this instead:

    can't set "opts(syncscroll)":
    while executing
    "$w(LeftText) yview moveto $y0"
    (procedure "vscroll-sync" line 46)
    invoked from within
    "vscroll-sync 2 [lindex $yview 0] [lindex $yview 1]"
    (procedure "toggleSyncScroll" line 6)
    invoked from within
    "toggleSyncScroll opts syncscroll w"
    (write trace on "opts(syncscroll)")
    invoked from within
    "set opts($key) $tmpopts($key)"
    (procedure "applypref" line 224)
    invoked from within
    "applypref"
    invoked from within
    ".pref.buttons.apply invoke"
    ("uplevel" body line 1)
    invoked from within
    "uplevel #0 [list $w invoke]"
    (procedure "tk::ButtonUp" line 22)
    invoked from within
    "tk::ButtonUp .pref.buttons.apply"

    Should I open a separate ticket for this?

     

    Last edit: Marky Mark 2019-01-03
  • michael-m

    michael-m - 2019-01-05

    Nah... I'm pretty certain its another artifact from the original problem of the missing Cbg variable; in this case its because the action path was triggered by a trace on syncscroll so when the Cbg blew up, it just reported the problem on its way out of unwinding the call stack. FYI - I have located the reason, now I'm just trying to figure out the best way to repair it and I expect it will fix ALL the issues you've cited (including Bug #61). Thanks for reporting the problems.

     
  • michael-m

    michael-m - 2020-06-16
    • status: accepted --> closed-fixed
     
  • michael-m

    michael-m - 2020-06-16

    Problem has been handled for new release V5.0

     

Log in to post a comment.