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

bug in [jmmmp/matrixctrl] - only one object per pd session allowed #850

Closed
jmmmp opened this issue Dec 27, 2019 · 7 comments · Fixed by #722 · May be fixed by #870
Closed

bug in [jmmmp/matrixctrl] - only one object per pd session allowed #850

jmmmp opened this issue Dec 27, 2019 · 7 comments · Fixed by #722 · May be fixed by #870
Labels
bug/fix either a bug (for issues) or a bugfix (for pull-requests) pending this issue is resolved, but not released/merged into master yet

Comments

@jmmmp
Copy link

jmmmp commented Dec 27, 2019

This is the first time I see something like this: the object [jmmmp/matrixctrl] can only be created once in a pd session. After the first time, any other instance will appear as text (no gui); if something is sent to it, it behaves as [zexy/lister] - including opening its help patch when requested. (Btw, lister isn't used in this abstraction)

I installed many pd versions, and found out that the last version where this works is pd-0.46-7 - in windows 7.

Is it possible to track down what changed? This object uses zexy, iemmatrix and list-abs.

(matrixctrl is a pd abstraction emulating the same object in max/msp, to control mtx_*~)

@umlaeute
Copy link
Contributor

this sounds like some memory corruption.
which libraries are loaded? what happens if you don't load any libraries? ...

@jmmmp
Copy link
Author

jmmmp commented Dec 27, 2019 via email

@umlaeute
Copy link
Contributor

please do not add "other small bugs" to this bug-report (unless you are very confident that they are indeed the same bug)

@umlaeute
Copy link
Contributor

note to myself: it seems that the problem is, that class_loadsym ought to be pushed to a stack rather instead of a single global variable:

pure-data/src/m_class.c

Lines 898 to 907 in 628a8d3

class_loadsym = s;
pd_globallock();
if (sys_load_lib(canvas_getcurrent(), s->s_name))
{
tryingalready++;
typedmess(dummy, s, argc, argv);
tryingalready--;
return;
}
class_loadsym = 0;

and then:

pure-data/src/m_class.c

Lines 458 to 469 in 628a8d3

if (class_loadsym)
{
/* if we're loading an extern it might have been invoked by a
longer file name; in this case, make this an admissible name
too. */
const char *loadstring = class_loadsym->s_name;
size_t l1 = strlen(s->s_name), l2 = strlen(loadstring);
if (l2 > l1 && !strcmp(s->s_name, loadstring + (l2 - l1)))
class_addmethod(pd_objectmaker, (t_method)newmethod,
class_loadsym,
vec[0], vec[1], vec[2], vec[3], vec[4], vec[5]);
}

@jmmmp
Copy link
Author

jmmmp commented Jan 10, 2020

Any prediction on when that zexy issue will be solved? I might release a new version of jmmmp soonish, if it's worth waiting I can do it.

umlaeute added a commit that referenced this issue Jan 16, 2020
… when loading a library)

Closes: #850
this is an improved fix, that actually tries to solve the underlying
problem (using the wrong name for registering a long-alias)
@umlaeute umlaeute added bug/fix either a bug (for issues) or a bugfix (for pull-requests) pending this issue is resolved, but not released/merged into master yet labels Mar 5, 2020
@jmmmp
Copy link
Author

jmmmp commented Apr 26, 2020

This issue is marked as solved, but I just updated zexy, and [matrixctrl] doesn't work. Tested on windows 32b+64b.

@umlaeute
Copy link
Contributor

that's because the issue is really an issue in Pd and not in zexy.
and Pd-0.51 (which has the fix) is not yet released.

the ticket was closed automatically when the fix was merged into the master branch of the repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix either a bug (for issues) or a bugfix (for pull-requests) pending this issue is resolved, but not released/merged into master yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants