Stream: brlcad

Topic: comb-editor-error


view this post on Zulip Sumagna Das (Jun 26 2020 at 07:08):

i dont know what this means( not related to python-brlcad)

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:08):

image.png

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:08):

what should i do to make this go away

view this post on Zulip Sean (Jun 26 2020 at 07:09):

what are you doing that causes that to be displayed?

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:09):

image.png

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:09):

this

view this post on Zulip Sean (Jun 26 2020 at 07:09):

it looks like an mged error

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:10):

so what to do?

view this post on Zulip Sean (Jun 26 2020 at 07:11):

well several things ... first, post your .g file so I can take a look at it

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:11):

geometry1.g

view this post on Zulip Sean (Jun 26 2020 at 07:12):

second, there are lower-level ways to inspect the .g file that you should use if you're inspecting python-generated .g files for validity.

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:12):

this was a random .g file i made while testing if the interface works

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:12):

like?

view this post on Zulip Sean (Jun 26 2020 at 07:14):

What do you click on that causes the error dialog?

view this post on Zulip Sean (Jun 26 2020 at 07:15):

the "l" command will list an object's details

view this post on Zulip Sean (Jun 26 2020 at 07:15):

mged> l comb0
comb0:  REGION id=1000 (air=0, los=100, GIFTmater=1) --
Shader 'plastic { di .9 sp .4}'
Color 255 0 0
(These material properties override all lower ones in the tree)
(empty tree)

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:16):

i just pressed the ok button as usual

view this post on Zulip Sean (Jun 26 2020 at 07:16):

I can't reproduce the error, but I do see that the comb is empty which is unusual/invalid. that may be the cause of the error.

view this post on Zulip Sean (Jun 26 2020 at 07:17):

do you still get the error if you reopen the .g file?

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:17):

lemme see

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:18):

yup

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:18):

still getting the error

view this post on Zulip Sean (Jun 26 2020 at 07:19):

did you compile brl-cad? what version are you using?

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:19):

dev-7.31.0

view this post on Zulip Sean (Jun 26 2020 at 07:19):

huh, weird

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:20):

should i pull the recent commits and build again?

view this post on Zulip Sean (Jun 26 2020 at 07:20):

no, like I said -- you don't need to use the combination editor, probably shouldn't be using it for this.

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:20):

hmm

view this post on Zulip Sean (Jun 26 2020 at 07:20):

see if one of the sample models gives you an error

view this post on Zulip Sean (Jun 26 2020 at 07:21):

try the all.g object in the moss.g sample database

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:22):

yea done

view this post on Zulip Sean (Jun 26 2020 at 07:22):

did it work without error doing the same combination editor steps?

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:26):

nope

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:26):

still the same

view this post on Zulip Sean (Jun 26 2020 at 07:27):

okay, well that's understanding progress! that means it's not anything specific to the python work. something appears to be wrong with your mged setup/compilation/install/etc.

view this post on Zulip Sean (Jun 26 2020 at 07:28):

you could try recompiling fresh, but like I said, it's not necessary for what you're doing. the 'l' command will tell you what it's parameters are

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:28):

(deleted)

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:29):

same parameters

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:35):

what should i do to fix it?

view this post on Zulip Sean (Jun 26 2020 at 07:38):

well I don't yet have an idea what's causing the error, so my first step would be to simply compile cleanly with BRLCAD_BUNDLED_LIBS=ON to see if it related to some system library issue. could be some issue with system tcl/tk/itcl/itk/iwidgets

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:38):

let me see

view this post on Zulip Sean (Jun 26 2020 at 07:39):

got to get some rest, but catch up again in a few hours

view this post on Zulip Sean (Jun 26 2020 at 07:40):

let me know how it goes!

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:40):

bye

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:40):

the build will take some time so i might leave it right now

view this post on Zulip Sean (Jun 26 2020 at 07:40):

k

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:45):

how much time does the build takes anyway on a linux machine having 4 gb ram?

view this post on Zulip Sean (Jun 26 2020 at 07:50):

totally depends on how many cores you have, how many you told it to use during make, how fast the cores are, how fast your disks are, .. but it's typically in the 5-15 min timeframe when compiling in parallel

view this post on Zulip Sumagna Das (Jun 26 2020 at 07:51):

ok

view this post on Zulip Sean (Jun 26 2020 at 07:52):

if you have few cores, slow cores, and/or a slow hard drive, it can be 5x slower

view this post on Zulip Sean (Jun 26 2020 at 07:54):

something like a power8 with 128 cores can compile from a clean checkout in about 2 minutes, mostly waiting on the hard disk and processes to run

view this post on Zulip Sumagna Das (Jun 26 2020 at 15:57):

right now, rebuilding brlcad with BRLCAD_BUNDLED_LIBS=ON as you said

view this post on Zulip Sumagna Das (Jun 26 2020 at 15:58):

couldnt rebuild it earlier because of some personal problems

view this post on Zulip Sean (Jun 26 2020 at 16:58):

rebuilt yet?

view this post on Zulip Sumagna Das (Jun 26 2020 at 17:50):

yep

view this post on Zulip Sumagna Das (Jun 26 2020 at 17:50):

sorry for the late reply

view this post on Zulip Sumagna Das (Jun 26 2020 at 17:50):

i wasnt about my laptop

view this post on Zulip Sumagna Das (Jun 26 2020 at 17:51):

still gives the same error

view this post on Zulip Sean (Jun 26 2020 at 18:28):

@Sumagna Das what is your operating system? you said linux?

view this post on Zulip Sean (Jun 26 2020 at 18:28):

can you provide the whole output from cmake?

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:28):

Sean said:

Sumagna Das what is your operating system? you said linux?

Ubuntu 20.04 LTS

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:29):

is the output of cmake supposed to be stored somewhere?

view this post on Zulip Sean (Jun 26 2020 at 18:32):

It's not stored -- you can just rm -rf CMake* and then: cmake -DBRLCAD_BUNDLED_LIBS=ON .. 2>&1 | tee cmake.log

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:35):

wait a bit

view this post on Zulip starseeker (Jun 26 2020 at 18:42):

Actually it should be (more or less) stored at CMakeFiles/CMakeOutput.log (that'll be more verbose than the screen printing though...)

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:43):

cmake.log

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:44):

CMakeOutput.log
the more verbose one

view this post on Zulip Sean (Jun 26 2020 at 18:46):

@starseeker any thoughts on sumanga's error? getting an error on the combination panel in mged. trunk build.

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:48):

if this is somehow fixed in recent revisions, then i dont have the recent ones

view this post on Zulip Sean (Jun 26 2020 at 18:48):

I find the actual output often more informative than the CMakeOutput.log file... wish it had both.

view this post on Zulip starseeker (Jun 26 2020 at 18:48):

Saw that - I can't reproduce it on Linux or Windows with a trunk build... very strange

view this post on Zulip starseeker (Jun 26 2020 at 18:50):

My only thought right now is that somehow there is interference from another/older Tcl/Tk (maybe one installed in the CMAKE_INSTALL_PREFIX location, for example)

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:51):

starseeker said:

My only thought right now is that somehow there is interference from another/older Tcl/Tk (maybe one installed in the CMAKE_INSTALL_PREFIX location, for example)

how to check if there's one?

view this post on Zulip Sean (Jun 26 2020 at 18:52):

You didn't happen to set any environment variables did you?

view this post on Zulip Sean (Jun 26 2020 at 18:52):

set | grep -i brl

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:53):

https://termbin.com/ni36d

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:53):

output

view this post on Zulip Sean (Jun 26 2020 at 18:55):

I see three or four BRL-CAD's in your path there... maybe some incompatibility was introduced

view this post on Zulip Sean (Jun 26 2020 at 18:55):

how are you running mged -- what's the exact command line?

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:55):

path?

view this post on Zulip Sean (Jun 26 2020 at 18:55):

and FYI, you don't need to use pastebin - you can just paste things in here

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:56):

i know but it has become a sort of an habit

view this post on Zulip Sean (Jun 26 2020 at 18:56):

no, I mean what exactly do you type?

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:56):

mged

view this post on Zulip Sean (Jun 26 2020 at 18:56):

which mged

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:56):

but after the build, i used from the build directory ( bin/mged)

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:57):

before that, from /usr/brlcad/dev-7.31.0/bin/mged

view this post on Zulip Sean (Jun 26 2020 at 18:58):

both give the error yes?

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:58):

yea

view this post on Zulip Sean (Jun 26 2020 at 18:58):

so yeah, that's smelling like maybe the issue

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:58):

what is the issue?

view this post on Zulip Sean (Jun 26 2020 at 18:59):

mv /usr/brlcad/dev-7.31.0 /usr/brlcad/dev-7.31.0-disabled

view this post on Zulip Sumagna Das (Jun 26 2020 at 18:59):

wait

view this post on Zulip Sean (Jun 26 2020 at 18:59):

and then retry the one you just build in bin/mged in the build dir

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:01):

should i rebuild the whole thing?

view this post on Zulip starseeker (Jun 26 2020 at 19:02):

only if you still see the error

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:03):

still the same

view this post on Zulip starseeker (Jun 26 2020 at 19:03):

What does the MGED command "bu_dir lib" report?

view this post on Zulip Sean (Jun 26 2020 at 19:04):

also, what does "bin/rt" report (outside mged)

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:05):

starseeker said:

What does the MGED command "bu_dir lib" report?

/mnt/sda2/github/brlcad/build/lib

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:06):

Sean said:

also, what does "bin/rt" report (outside mged)

BRL-CAD Release 7.31.0  The BRL-CAD Raytracer RT
    Fri, 26 Jun 2020 13:11:21 +0530, Compilation 3
    sumagnadas@hp-laptop
BRL-CAD Release 7.31.0  The BRL-CAD Ray-Tracing Library
    Fri, 26 Jun 2020 13:11:21 +0530, Compilation 3
    sumagnadas@hp-laptop
BRL-CAD Release 7.31.0  The BRL-CAD Numerical Computation Library
    Fri, 26 Jun 2020 13:11:21 +0530, Compilation 3
    sumagnadas@hp-laptop
BRL-CAD Release 7.31.0  The BRL-CAD Utility Library
    Fri, 26 Jun 2020 13:11:21 +0530, Compilation 3
    sumagnadas@hp-laptop

Compile-time debug symbols are available
Running on hp-laptop
bin/rt:  BRL-CAD geometry database not specified

Usage:  bin/rt [options] model.g objects...
Options:
  -o filename     Render to specified image file (e.g., image.png or image.pix)
  -F framebuffer  Render to a framebuffer (defaults to a window)
  -s #            Square image size (default: 512 - implies 512x512 image)
  -w # -n #       Image pixel dimensions as width and height
  -C #/#/#        Set background image color to R/G/B values (default: 0/0/1)
  -W              Set background image color to white
  -R              Disable reporting of overlaps
  -A #            Set image brightness, ambient light intensity (default: 0.4)

Type "bin/rt -?" for a complete list of options.

view this post on Zulip Sean (Jun 26 2020 at 19:07):

those both look right. Hm. What else is in /usr/brlcad (ls -la /usr/brlcad)

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:08):

total 12
drwxr-xr-x  3 root root 4096 Jun 27 00:29 .
drwxr-xr-x 15 root root 4096 May 14 16:13 ..
drwxr-xr-x  6 root root 4096 May 14 16:14 dev-7.31.0-disabled

view this post on Zulip Sean (Jun 26 2020 at 19:08):

damn, huh

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:08):

what?

view this post on Zulip Sean (Jun 26 2020 at 19:08):

okay so then lets debug the tcl and see why the error is happening...

view this post on Zulip Sean (Jun 26 2020 at 19:09):

Just this is really bizzare.

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:09):

i moved the conversation here

view this post on Zulip Sean (Jun 26 2020 at 19:10):

great, good idea!

view this post on Zulip starseeker (Jun 26 2020 at 19:10):

What does "env" report from the MGED command prompt?

view this post on Zulip Sean (Jun 26 2020 at 19:10):

so open the combination editor, then run "array names comb_control"

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:11):

i want to ask one thing

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:11):

how to copy something from the mged command window

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:11):

neither ctrl-c works nor ctrl-shift-c

view this post on Zulip Sean (Jun 26 2020 at 19:11):

depends on how your window manager handles copy-paste

view this post on Zulip starseeker (Jun 26 2020 at 19:12):

On Linux I select it and use the middle mouse button, but I don't know that that works on WIndows

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:13):

starseeker said:

What does "env" report from the MGED command prompt?

DISPLAY=:0
HOME=/home/sumagnadas
ITCL_LIBRARY=/mnt/sda2/github/brlcad/build/lib/itcl3.4
ITK_LIBRARY=/mnt/sda2/github/brlcad/build/lib/itk3.4
LANG=en_IN
PATH=/usr/brlcad/dev-7.31.0/bin:/home/sumagnadas/.cargo/bin:/home/sumagnadas/.local/bin:/home/sumagnadas/bin:/home/sumagnadas/.mozbuild/git-cinnabar:/home/sumagnadas/.cargo/bin:/usr/brlcad/dev-7.30.5/bin:/mnt/sda2/appleseed/bin:/mnt/sda2/BRL-CAD/brlcad/build/bin/:/usr/brlcad/dev-7.30.5/bin:/mnt/sda2/appleseed/bin:/mnt/sda2/BRL-CAD/brlcad/build/bin/:/home/sumagnadas/.local/bin:/home/sumagnadas/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/bin/python3.7:/home/sumagnadas/bin:/usr/bin/python3.7:/home/sumagnadas/bin:/root/.local/bin:/mnt/sda2/github/weechat-matrix/contrib:/mnt/sda2/PyCharm/bin:/mnt/sda2/python/bin:/mnt/sda2/github/downloads/todo.txt_cli-2.11.0/
PWD=/mnt/sda2/github/brlcad/build
TCL_LIBRARY=/mnt/sda2/github/brlcad/build/lib/tcl8.6
TERM=xterm-256color

view this post on Zulip starseeker (Jun 26 2020 at 19:14):

OK, that looks right (although there are a lot of extra entries in PATH, it doesn't look like they're being used to find libraries...)

view this post on Zulip Sean (Jun 26 2020 at 19:14):

screenshot of the window works

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:15):

Sean said:

so open the combination editor, then run "array names comb_control"

id_0,isRegion id_0,shader_frame id_0,name id_0,dirty_name id_0,padx id_0,bool_frame id_0,pady id_0,material id_0,color id_0,shader id_0,comb id_0,shader_gui id_0,inherit id_0,air id_0,id id_0,los

view this post on Zulip Sean (Jun 26 2020 at 19:15):

so what was the copy key?

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:15):

middle button for me

view this post on Zulip Sean (Jun 26 2020 at 19:15):

middle should be paste, no?

view this post on Zulip Sean (Jun 26 2020 at 19:15):

so ctrl-c worked, and paste was the issue?

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:16):

it does copy and paste for me atleast

view this post on Zulip starseeker (Jun 26 2020 at 19:16):

Visual select plus middle button for pasting?

view this post on Zulip Sean (Jun 26 2020 at 19:16):

yeah, that's what sounds like happened.. middle is definitely not both copy and paste :)

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:17):

starseeker said:

Visual select plus middle button for pasting?

thats what i wanted to mean

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:18):

for some reason, it works now

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:19):

the whole comb editor issue is gone

view this post on Zulip Sean (Jun 26 2020 at 19:20):

did you display a comb?

view this post on Zulip starseeker (Jun 26 2020 at 19:20):

tclscripts/mged/comb.tcl is the only place that appears to combine comb_control and attrs.

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:21):

it worked for some time and now again it doesnt work :disappointed:

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:22):

it goes away after doing a unusual thing actually

view this post on Zulip starseeker (Jun 26 2020 at 19:24):

That index appears to be associated with non-standard attributes assigned to combs - array names comb_control shows it when I edit a comb with such an attribute, but didn't show it previously?

view this post on Zulip starseeker (Jun 26 2020 at 19:24):

what unusual thing?

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:24):

and the thing is totally random

view this post on Zulip Sean (Jun 26 2020 at 19:25):

what do you mean by unusual thing?

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:25):

wait i am going to record it

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:27):

issue-and-solution.webm

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:28):

seen the video?

view this post on Zulip Sean (Jun 26 2020 at 19:33):

/me searches for something that will play webm

view this post on Zulip starseeker (Jun 26 2020 at 19:33):

vlc?

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:34):

you can change the file extension to mp4 :mischievous:

view this post on Zulip Sean (Jun 26 2020 at 19:34):

oh interesting. you're using autoname...

view this post on Zulip Sean (Jun 26 2020 at 19:34):

I got it to work, firefox was fine with it

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:35):

just for testing purposes :grinning_face_with_smiling_eyes:

view this post on Zulip Sean (Jun 26 2020 at 19:35):

let me test that -- that's a feature I don't think I've ever used.... creates a comb

view this post on Zulip Sean (Jun 26 2020 at 19:36):

okay, that's it

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:36):

what?

view this post on Zulip Sean (Jun 26 2020 at 19:36):

haha, that's funny...

view this post on Zulip Sean (Jun 26 2020 at 19:38):

@Sumagna Das you're using the combination editor in a way that I don't think anyone that has gone through the tutorials would ever even think to do or try. You're using it to create combinations, and that's where there's apparently a bug.

view this post on Zulip Sean (Jun 26 2020 at 19:38):

If you use it on an existing combination to inspect it or change it, there's no problem.

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:38):

thats a bug?

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:39):

i created a combination at the end of the video

view this post on Zulip Sean (Jun 26 2020 at 19:39):

I've never used the combination editor to create a combination. Ever.

view this post on Zulip Sean (Jun 26 2020 at 19:39):

Or at least if I ever did, it might have been 19 years ago or something ;

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:40):

ohh

view this post on Zulip Sean (Jun 26 2020 at 19:40):

Screen-Shot-2020-06-26-at-3.38.10-PM.png Bug reproduces easily.

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:41):

i dont know much and so i am exploring the whole UI and all the options available

view this post on Zulip Sean (Jun 26 2020 at 19:43):

I'll take a brief look to see if it's an easy fix, but if you want to try and fix it, the problem is in comb_apply in src/tclscripts/mged/comb.tcl

view this post on Zulip starseeker (Jun 26 2020 at 19:44):

Probably just need to do something like initialize the array entry to empty when the comb_control is set up...

view this post on Zulip Sean (Jun 26 2020 at 19:44):

almost certainly related to the fact that it's writing out a new object and then trying to read it back in, it's missing something that it's expecting in the attrs.

view this post on Zulip Sumagna Das (Jun 26 2020 at 19:44):

i might see to that

view this post on Zulip Sumagna Das (Jul 31 2020 at 04:43):

@Sean so is this the line?

set ret [catch {eval attr set $comb_control($id,name) $comb_control($id,attrs) } comb_error ]

line no - 984, file - src/tclscripts/mged/comb.tcl

view this post on Zulip Sumagna Das (Jul 31 2020 at 04:50):

there are lines like this actually

view this post on Zulip Sumagna Das (Jul 31 2020 at 04:51):

one of them is at 984 and another one at 949

view this post on Zulip Sumagna Das (Jul 31 2020 at 04:56):

probably both of them are causing errors

view this post on Zulip Sean (Jul 31 2020 at 06:17):

You're in the right vicinity. I spent some time debugging that code when we last talked, but fixed other issues and didn't get back to the attrs issue.

view this post on Zulip Sumagna Das (Jul 31 2020 at 07:33):

before i try to fix that attrs issue, i have to look up tcl syntax

view this post on Zulip Sumagna Das (Jul 31 2020 at 07:34):

if you find any sites which explain or show tcl syntax beautifully, then please tell me about it


Last updated: Oct 09 2024 at 00:44 UTC