-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
halscope: Add some missing "channel valid" checks #2302
Conversation
@@ -556,12 +557,12 @@ static double snap(int y) { | |||
} | |||
|
|||
static void left_drag(int dy, int y, GdkModifierType state) { | |||
if(vert->selected <= 0) return; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't build -- needs to be moved back down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird, I thought we switched to a modern standard that supported interspersing declarations & other statements. I guess that's in master only, not 2.9.
It has to be before one of the array indexes of vert->selected
, otherwise there's still undefined behavior (even though it's probably OK on all normal computers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, oops, OK. 😊
There's also some confusion about whether "selected" channel of 0 or -1 denotes "none/invalid". One of these may have been the cause of a crash cradek saw in halscope on arm64.
Is the crash reproducible? Does this fix it? |
These changes fix the crash for me. I can reproduce it reliably on the pi400 by turning on (aka leaving at the default setting) compositing in xfce, have linuxcnc running, delete autosave.halscope, unloadrt scope_rt, and then starting halscope. It flashes both windows briefly, and then crashes. (I accidentally discovered that turning off compositing worked around the problem.) I don't think it has been reproduced on any other machine. Jeff failed to reproduce on his amd64. |
Pcw had mentioned that he was seeing halscope crash. Where was that..
…On Fri, Jan 27, 2023 at 11:08 AM Chris Radek ***@***.***> wrote:
These changes fix the crash for me. I can reproduce it reliably on the
pi400 by turning on (aka leaving at the default setting) compositing in
xfce, have linuxcnc running, delete autosave.halscope, unloadrt scope_rt,
and then starting halscope. It flashes both windows briefly, and then
crashes.
(I accidentally discovered that turning off compositing worked around the
problem.)
I don't think it has been reproduced on any other machine. Jeff failed to
reproduce on his amd64.
—
Reply to this email directly, view it on GitHub
<#2302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEHRGQRSDCFPBYANANYWMELWUP6JDANCNFSM6AAAAAAUHOCUMM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
this is what I was thinking of,,
#2125 (comment)
…On Fri, Jan 27, 2023 at 11:11 AM Sam Sokolik ***@***.***> wrote:
Pcw had mentioned that he was seeing halscope crash. Where was that..
On Fri, Jan 27, 2023 at 11:08 AM Chris Radek ***@***.***>
wrote:
> These changes fix the crash for me. I can reproduce it reliably on the
> pi400 by turning on (aka leaving at the default setting) compositing in
> xfce, have linuxcnc running, delete autosave.halscope, unloadrt scope_rt,
> and then starting halscope. It flashes both windows briefly, and then
> crashes.
>
> (I accidentally discovered that turning off compositing worked around the
> problem.)
>
> I don't think it has been reproduced on any other machine. Jeff failed to
> reproduce on his amd64.
>
> —
> Reply to this email directly, view it on GitHub
> <#2302 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEHRGQRSDCFPBYANANYWMELWUP6JDANCNFSM6AAAAAAUHOCUMM>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
That sure seems like it might be the same problem. |
There's also some confusion about whether "selected" channel of 0 or -1 denotes "none/invalid".
One of these may have been the cause of a crash @cradek saw in halscope on arm64.