Stream: brlcad

Topic: mged -c corruption


view this post on Zulip starseeker (Dec 19 2020 at 16:10):

@Sean Is this similar to what you're seeing?

BRL-CAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019

attach (nu ogl X)[nu]?
mged> search /
/all.g
/all.g/box.r
/all.g/box.r/box.s
/all.g/cone.r
/all.g/cone.r/cone.s
/all.g/ellipse.r
/all.g/ellipse.r/ellipse.s
/all.g/light.r
/all.g/light.r/LIGHT
/all.g/platform.r
/all.g/platform.r/platform.s
/all.g/tor.r
/all.g/tor.r/tor
mged> l en "BRL-CAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l elAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-CllAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-ClliAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-CllipAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-CllipsAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-CllipseAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.AD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.reAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.relAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.relliAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellipAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellipsAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellipseAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellipse.AD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellipse.rAD Release 7.32.1  Geometry Editor (MGED)
    Sat, 19 Dec 2020 14:52:53 UTC, Compilation 0
    cyapp@ubuntu2019
mged> l en "BRL-Cllipse.rellipse.r

view this post on Zulip starseeker (Dec 19 2020 at 16:11):

I had mged -c up in valgrind and it didn't squawk about anything when that happened...

view this post on Zulip starseeker (Dec 19 2020 at 16:15):

Could libtermio be out of sync with modern terminals somehow?

view this post on Zulip Sean (Dec 22 2020 at 21:21):

Yep, that looks like the corruption. It wasn't libtermio the last time this happened (last winter), but it could be. It could be lots of things. The thing to do is attach a debugger when it happens, see what's messed up. It usually prints the version info, which is held in global static vars, so that's a strong indication its memory corruption.

view this post on Zulip starseeker (Jul 24 2023 at 20:22):

A quick debugging session suggests that brlcad_ident isn't being called when the version string is appearing in the output.

view this post on Zulip starseeker (Jul 24 2023 at 20:26):

There's an interesting note in src/mged/cmd.c around line 1029 warning that the input string needs to be saved because f_mouse is "notorious for adding things to the input string" and indicating the non-copied input shouldn't be fed to Tcl_Eval... are we perhaps Tcl_Evaling something we shouldn't either here or elsewhere in MGED and getting corrupted input that way?

view this post on Zulip Sean (Jul 24 2023 at 20:31):

What happens if you put “global version” and “set version something” in your .mgedrc? That’ll indicate whether it’s the tcl bar or not.

view this post on Zulip starseeker (Jul 24 2023 at 22:37):

Grr. Now it doesn't want to repeat - the instance of corruption I'm getting now pulled part of a previous command's text in as I middle click pasted, but not the version string specifically:

mged> 1;2A1;2A1;2A1;2A
result: invalid command name "1"
invalid command name "1"
mged> ls
result: LIGHT               cone.r/R            light.r/R           tor.r/R
all.g/              cone.s              platform.r/R
box.r/R             ellipse.r/R         platform.s
box.s               ellipse.s           tor

LIGHT               cone.r/R            light.r/R           tor.r/R
all.g/              cone.s              platform.r/R
box.r/R             ellipse.r/R         platform.s
box.s               ellipse.s           tor
mged>  ve1;rsion2A1;2A1;2A
result: invalid command name "ve1"
invalid command name "ve1"

(The corrupted 'version' command was generated from a middle-mouse-buttion paste selection that had both a clean 'version' text command and additional lines of text from the history selected, btw) Looks like the previous history text apparently started to get inserted after just two characters of the paste had landed...

view this post on Zulip Sean (Jul 25 2023 at 22:45):

I've seen it be things other than the version string too, which is also why I think version is probably just one of the last commands to get run. (there is a "set version [brlcad_ident "..."]" in the initialization.)

view this post on Zulip Mo Aman (Aug 04 2023 at 15:25):

bro-cad


Last updated: Oct 09 2024 at 00:44 UTC