#flex-dev Logs
Mar 28 2025
#flex-dev Calendar
04:40 AM Tom_L: morning
12:25 PM JT-Cave: https://github.com/jethornton/Indicator
12:26 PM JT-Cave: getting a strange error with indicator.py now
12:27 PM JT-Cave: self.power_pb.setChecked(True)
12:27 PM JT-Cave: RuntimeError: wrapped C/C++ object of type QPushButton has been deleted
12:27 PM JT-Cave: I get the error when I press the E Stop button
12:28 PM * rdtsc-w raises one eyebrow...
01:07 PM Tom_dev: File "/home/tom/indicator/indicator.py", line 185, in indicator
01:07 PM Tom_dev: self.power_pb.setEnabled(True)
01:07 PM Tom_dev: RuntimeError: wrapped C/C++ object of type QPushButton has been deleted
01:07 PM Tom_L: don't push estop
01:07 PM Tom_L: :)
01:13 PM Tom_dev: you sure the object name is estop_pb?
01:14 PM Tom_dev: it seems to occur on 183
01:16 PM Tom_dev: change it to self. and it works
01:16 PM Tom_dev: if self.objectName() == 'estop_pb':
01:20 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/indicator-2025-03-28_13.09.18.mkv
03:01 PM JT-Mobile: Yo
03:02 PM JT-Mobile: Almost got run over by an 18 wheeler
03:05 PM xxcoder: bad luck all over today it seems
03:07 PM JT-Mobile: Ir was at a 4 way stoplight it turned left and I had to back 20 feet to keep it from running me over
03:08 PM Tom_L: between you and roy
03:08 PM Tom_L: he broke his back
03:08 PM Tom_L: i fixed your test file
03:08 PM JT-Mobile: How did that happen
03:08 PM Tom_L: step ladder onto his truck
03:08 PM Tom_L: fell offf
03:09 PM xxcoder: fell off ladder from truck back, and by being older
03:09 PM Tom_L: also line 183 change to: if self.objectName() == 'estop_pb':
03:09 PM xxcoder: in least it wasnt hips, that'd be far worse
03:09 PM JT-Mobile: Wow
03:09 PM Tom_L: still in the hospital afik
03:09 PM JT-Mobile: Thanks for looking at it
03:10 PM JT-Mobile: We are in Cape Girardeau
03:10 PM Tom_L: i figured you were off somewhere
03:10 PM Tom_L: i posed a video of the fix
03:10 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/indicator-2025-03-28_13.09.18.mkv
03:11 PM Tom_L: not sure that will view on android
03:17 PM JT-Mobile: Would not play
03:17 PM Tom_L: played on mine
03:17 PM Tom_L: just tried
03:18 PM JT-Mobile: Timed out
03:19 PM Tom_L: try the directory and click on the file
03:19 PM Tom_L: http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/
03:19 PM Tom_L: mine asks to open
03:22 PM JT-Mobile: Can't connect
03:23 PM Tom_L: imagine an led that turns green n red :)
03:25 PM JT-Mobile: Does the estop enable the power button
03:25 PM Tom_L: i dunno, i wasn't looking for that
03:25 PM Tom_L: i can try it
03:26 PM JT-Mobile: Ok
03:28 PM Tom_L: no
03:42 PM Tom_L: yeah that didn't fix much except it doesn't crash
03:42 PM Tom_L: the self. thing
04:40 PM Tom_L: i don't understand why it's being deleted but it is
04:41 PM Tom_L: tried printing self.power_pb.isEnabled() and get the same error
04:42 PM Tom_L: i don't see where it's addressed except on line 128
05:34 PM JT-Shop: self refers to the app
05:35 PM JT-Shop: so everything in the app is part of self
05:35 PM JT-Shop: self.somename refers to the object with an object name of somename
05:58 PM Tom_L: i think i tried self.button.xxxx too
05:58 PM Tom_L: i don't know what i'm doing with python
06:00 PM Tom_L: err no, self.power_pb
06:31 PM JT-Shop: neither do I, I'm just faking it :)
06:32 PM xxcoder: youre doing it better than million monkeys just bashing keyboard ;)
06:32 PM Tom_L: you fake it alot better that i do
06:36 PM Tom_L: power_pb is present on 128 so where does it disappear to?
06:36 PM Tom_L: i checked isEnabled just below that
06:38 PM JT-Shop: some of the buttons are replaced with LED buttons
06:42 PM Tom_L: now you're just scrambling the eggs
06:44 PM JT-Shop: that's how you add the LED by subclassing the QPushButton
06:44 PM JT-Shop: the top class does that
06:44 PM Tom_L: so where does power_pb disappear?
06:45 PM JT-Shop: that's the question for sure
06:45 PM Tom_L: does it get renamed?
06:45 PM Tom_L: led something
06:45 PM JT-Shop: no, I replace the original with the led one and give it the same name
06:46 PM Tom_L: what line?
06:46 PM JT-Shop: I need to make a simple example I think
06:47 PM JT-Shop: 108 starts the building of the replacement button
06:48 PM Tom_L: power_pb is still there at 128 though
06:48 PM Tom_L: must be somewhere below that
06:49 PM JT-Shop: 111 gives the button the object name power_pb
06:49 PM Tom_dev: what does 149 do?
06:50 PM Tom_dev: self.power_pb.toggled.connect(self.indicator)
06:50 PM JT-Shop: that connects the toggled event to the indicator function
06:51 PM JT-Shop: so the def indicator(self): is ran when the checkable button is toggled
06:52 PM Tom_L: it's gone before ln 180
06:54 PM Tom_L: something between 155 & 180
06:54 PM JT-Shop: pretty tired here and about to call it a day
06:54 PM Tom_dev: me too
06:54 PM Tom_dev: just trying to narrow it down
06:56 PM Tom_dev: if fails after def print_children(self)
06:57 PM Tom_dev: that's the problem def i think
06:58 PM Tom_dev: print(f'Power Button: {self.power_pb.isEnabled()}')
06:58 PM Tom_dev: works above that def but not below it