Skip to content
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

Possible regression issue with 0.51 #848

Open
porres opened this issue Dec 24, 2019 · 8 comments
Open

Possible regression issue with 0.51 #848

porres opened this issue Dec 24, 2019 · 8 comments

Comments

@porres
Copy link
Contributor

@porres porres commented Dec 24, 2019

Hi, I'm testing an external with both current state of this repository (future 0.51) and Pd 0.50-2

it's a keyboard GUI, see in line 108 that I do this: https://github.com/porres/pd-else/blob/master/Classes/Source/keyboard.c#L108

static void keyboard_mousepress(t_keyboard* x, t_float xpix, t_float ypix, t_float id){
    if((int)x != (int)id) // Check if it's the right instance to receive this message

This is used to detect mouse clicks on the right instance. All [keyboard] objects will get this message, but only the one it's supposed to react gets called. Now, the thing is that in 0.51 sometimes this check gets messed up and the result is different where it shouldn't be. This never happens in 0.50-2

Anyway, I didn't write this code, this external was first developed by a collaborator. So, I'm thinking if there's a better way to manage this and if we shouldn't really have done this the way it is now. Nonetheless, it seems like a possible regression issue for 0.51

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 24, 2019

could you be more specific on the actual problem?

@porres

This comment has been minimized.

Copy link
Contributor Author

@porres porres commented Dec 24, 2019

In 0.51 I usually (but not always) get different numbers for "x" and "id" when they should be the same - therefore I get wrong numbers. But 0.50-2 always gets them right.

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 25, 2019

that would be a fine opportunity to learn git bisect to find the commit that introduced the problem (just do a web search for the term - its in the git book; i'm afk right now so cannot help much)

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 25, 2019

and please use a descriptivr title...

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 25, 2019

I checked the sources of [keyboard], and I see that Pd is only involved minimally here (if at all).
both the C-functions and the Tcl/Tk-procedures are defined in in the external.
Pd does the transmission between GUI and core, and transforms the string into a binbuf, but that's about it.

you might want to check the actual bytes that are transmitted, and see whether you are losing precision somewhere (there's a good reason that Pd uses symbol comparision rather than int comparision internally, to check for identity of a canvas).

i'm tempted to close this as "off topic"

@porres

This comment has been minimized.

Copy link
Contributor Author

@porres porres commented Dec 25, 2019

there's a good reason that Pd uses symbol comparison rather than int comparison internally, to check for identity of a canvas

And what about "object ID" rather than "canvas id"? Cause this is what's going on here. Well, I guess I can give it a try. It's funny how it always works on 0.50-2 anyway.

@porres

This comment has been minimized.

Copy link
Contributor Author

@porres porres commented Dec 25, 2019

and please use a descriptivr title...

I knew this was very broad, but couldn't figure out how to give a better title :/

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Dec 25, 2019

And what about "object ID" rather than "canvas id"? Cause this is what's going on here. Well, I guess I can give it a try.

no real difference here...

It's funny how it always works on 0.50-2 anyway.

that could have numerous reasons, e.g. a slightly different memory layout in the 0.51 builds that exposes a problem that was always in the external but just happened to not show up (but that's pure guesswork)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.