Forums > MaxMSP

consistent crash with pattrstorage

March 17, 2007 | 5:32 pm

hi,

Max 4.6; OSX 10.4.9 MacBook Pro

I have a modified version of a patch which contains an autopattr and
a pattrstorage at the top level. Everytime I send the write message
to pattrstorage, the file dialogue opens and then either max crashes
or the whole computer locks up.

Here’s the patch, and the crash log is below.

max v2;
#N vpatcher 47 45 785 535;
#P origin 354 -119;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 68 135 100 196617 0 1 1 0;
#X add one;
#X add two;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P objectname ubumenu[1];
#P number 123 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number[2];
#P flonum 118 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname flonum[1];
#P flonum 79 207 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname flonum;
#P number 75 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number[1];
#P number 77 159 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P hidden newex 585 315 66 196618 prepend set;
#P hidden newex 393 345 74 196618 append prst1;
#P window setfont "Sans Serif" 9.;
#P hidden message 596 344 62 196617 savemode 2;
#P hidden message 522 345 71 196617 autorestore 1;
#P hidden newex 371 390 260 196617 pattrstorage ctrl_routingD
@autorestore 1 savemode 2;
#X client_rect 0 0 640 240;
#X storage_rect 10 59 650 299;
#P objectname ctrl_routingD;
#P bpatcher 197 98 64 19 0 0 ububutton2 1 view 185 252 255 102 237 255;
#P bpatcher 197 168 64 19 0 0 ububutton2 1 read 24 254 39 153 255 160;
#P bpatcher 197 191 64 19 0 0 ububutton2 1 write 254 40 18 255 150 139;
#P bpatcher 197 143 64 19 0 0 ububutton2 1 store 254 40 18 255 150 139;
#P hidden message 300 312 75 196617 storagewindow;
#P hidden message 516 317 29 196617 read;
#P hidden message 479 317 34 196617 write;
#P hidden newex 362 283 30 196617 int 0;
#P hidden newex 393 283 30 196617 int 0;
#P hidden newex 393 317 71 196617 prepend store;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 197 71 61 196620 0 1 1 0;
#X add temp;
#X add prst1;
#X add prst2;
#X add prst3;
#X add prst4;
#X add prst5;
#X add prst6;
#X add prst7;
#X add prst8;
#X add prst9;
#X add prst10;
#X add prst11;
#X add prst12;
#X add prst13;
#X add prst14;
#X add prst15;
#X add prst16;
#X add prst17;
#X add prst18;
#X add prst19;
#X add prst20;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname ubumenu;
#P bpatcher 197 121 64 19 0 0 ububutton2 1 recall 24 254 39 153 255 160;
#P window setfont "Sans Serif" 9.;
#P hidden newex 39 76 142 196617 autopattr ctrllr @autoname 1;
#X prestore flonum 1 0 -0.25;
#X prestore flonum[1] 1 0 0.06;
#X prestore number 1 0 14;
#X prestore number[1] 1 0 -24;
#X prestore number[2] 1 0 8;
#X prestore ubumenu 1 0 prst1;
#X prestore ubumenu[1] 1 0 two;
#P objectname ctrllr;
#P hidden fasten 12 0 8 0 202 116 293 116 293 303 305 303;
#P hidden fasten 1 0 5 0 202 139 293 139 293 277 367 277;
#P hidden fasten 15 0 13 0 601 369 376 369;
#P hidden fasten 14 0 13 0 527 367 376 367;
#P hidden fasten 7 0 13 0 521 367 376 367;
#P hidden fasten 6 0 13 0 484 367 376 367;
#P hidden fasten 5 0 13 0 367 351 376 351;
#P hidden fasten 8 0 13 0 305 368 376 368;
#P hidden fasten 16 0 13 0 398 375 376 375;
#P hidden fasten 2 0 5 1 202 95 293 95 293 277 387 277;
#P hidden fasten 9 0 4 0 202 162 293 162 293 277 398 277;
#P hidden connect 4 0 3 0;
#P hidden connect 3 0 16 0;
#P hidden fasten 17 0 16 0 590 337 398 337;
#P hidden fasten 2 0 4 1 202 95 293 95 293 277 418 277;
#P hidden fasten 10 0 6 0 202 211 293 211 293 307 484 307;
#P hidden fasten 11 0 7 0 202 185 293 185 293 307 521 307;
#P hidden fasten 2 1 17 0 227 95 293 95 293 307 590 307;
#P pop;

=======

crash log: truncated so as to get throught to the list – if the rest
is needed let me know and I can send it direct to C74.

Host Name: TiPB-2
Date/Time: 2007-03-17 17:23:10.810 +0000
OS Version: 10.4.9 (Build 8P2137)
Report Version: 4

Command: MaxMSP
Path: /Applications/MaxMSP 4.6/MaxMSP.app/Contents/MacOS/MaxMSP
Parent: WindowServer [68]

Version: ??? (4.6.2)

PID: 20510
Thread: 3

Exception: EXC_BAD_ACCESS (0×0001)
Codes: KERN_INVALID_ADDRESS (0×0001) at 0x16cf3444

Thread 0:
0 libSystem.B.dylib 0x90009bf7 mach_msg_trap + 7
1 com.apple.CoreFoundation 0x9082e2b3 CFRunLoopRunSpecific +
2014
2 com.apple.CoreFoundation 0x9082dace CFRunLoopRunInMode + 61
3 com.apple.HIToolbox 0x92de98d8
RunCurrentEventLoopInMode + 285
4 com.apple.HIToolbox 0x92ededff
GetNextEventMatchingMask + 419
5 com.apple.HIToolbox 0x92edeac0 WNEInternal + 160
6 com.apple.HIToolbox 0x92edea00 WaitNextEvent + 58
7 com.apple.NavigationServices 0x92d76c73
TBrowseDialog::EventLoop() + 79
8 com.apple.NavigationServices 0x92d6e6c7
TBrowseDialog::StartDialog() + 397
9 com.apple.NavigationServices 0x92d5ce2c NavDialogRun + 36
10 com.cycling74.MaxMSP46 0x000037f9 navserv_save + 353
(navserv.c:739)
11 com.cycling74.MaxMSP46 0x0001935a saveasdialog_extended
+ 270 (fileutils.c:634)
12 com.cycling74.MaxAPI 0x0180f3c9 saveasdialog_extended
+ 66
13 com.cycling74.pattrstorage 0x16ac7e51
pattrstorage_file_write + 872
14 com.cycling74.MaxMSP46 0x0002fd6e typedmess_fun + 1486
(message.c:631)
15 com.cycling74.MaxMSP46 0x000e7627 outlet_anything + 343
(inletoutlet.c:960)
16 com.cycling74.MaxMSP46 0x0002fd6e typedmess_fun + 1486
(message.c:631)
17 com.cycling74.MaxMSP46 0x000302ae typedmess + 80
(message.c:399)
18 com.cycling74.MaxMSP46 0x00030d0c aeval + 1242
(message.c:1061)
19 com.cycling74.MaxMSP46 0×00009007 atombuf_eval + 203
(atombuf.c:234)
20 com.cycling74.MaxMSP46 0x000b5dea vmessage_int
(_vmessage*, long) + 92 (vmessage.c:66)
21 com.cycling74.MaxMSP46 0x000e6de3 outlet_int + 361
(inletoutlet.c:753)
22 com.cycling74.MaxMSP46 0x000e58c0 inlet_int + 172
(inletoutlet.c:183)
23 com.cycling74.MaxMSP46 0x000e6de3 outlet_int + 361
(inletoutlet.c:753)
24 com.cycling74.MaxMSP46 0x0009bc86 route_anything(route*,
symbol*, short, atom*) + 274 (route.c:217)
25 com.cycling74.MaxMSP46 0x0002f89f typedmess_fun + 255
(message.c:492)
26 com.cycling74.MaxMSP46 0x000e7627 outlet_anything + 343
(inletoutlet.c:960)
27 com.cycling74.MaxAPI 0x0180a5bc outlet_anything + 59
28 com.cycling74.ubumenu 0x00fb247e ubumenu_click + 1124
29 com.cycling74.MaxMSP46 0x0000f482 box_click + 148 (box.c:
123)
30 com.cycling74.MaxMSP46 0x000359bd patcher_boxclick + 437
(patcher.c:2175)
31 com.cycling74.MaxMSP46 0x0003788a patcher_click + 1192
(patcher.c:2424)
32 com.cycling74.MaxMSP46 0x0007292c bpatcher_handleclick
(bpatcher*, Point, short, short) + 136 (bpatcher.c:351)
33 com.cycling74.MaxMSP46 0x000729c7 bpatcher_click
(bpatcher*, Point, short) + 99 (bpatcher.c:371)
34 com.cycling74.MaxMSP46 0x0000f482 box_click + 148 (box.c:
123)
35 com.cycling74.MaxMSP46 0x000359bd patcher_boxclick + 437
(patcher.c:2175)
36 com.cycling74.MaxMSP46 0x0003788a patcher_click + 1192
(patcher.c:2424)
37 com.cycling74.MaxMSP46 0x00069c0b wind_click + 143
(window.c:1118)
38 com.cycling74.MaxMSP46 0x0006ec58 wind_event + 394
(window.c:818)
39 com.cycling74.MaxMSP46 0x000276b1 app_eventhandler
(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1271 (main.c:
1597)
40 com.apple.HIToolbox 0x92de8537 DispatchEventToHandlers
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
41 com.apple.HIToolbox 0x92de7bdc
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 304
42 com.apple.HIToolbox 0x92deefbc SendEventToEventTarget
+ 56
43 com.apple.HIToolbox 0x92def44f
ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 1169
44 com.apple.HIToolbox 0x92de88ee DispatchEventToHandlers
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2044
45 com.apple.HIToolbox 0x92de7bdc
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 304
46 com.apple.HIToolbox 0x92deefbc SendEventToEventTarget
+ 56
47 com.apple.HIToolbox 0x92e32eb3 ToolboxEventDispatcher
+ 81
48 com.apple.HIToolbox 0x92e318cb
RunApplicationEventLoop + 165
49 com.cycling74.MaxMSP46 0x00026e8a app_run + 52 (main.c:
1458)
50 com.cycling74.MaxMSP46 0×00027134 main + 680 (main.c:415)
51 com.cycling74.MaxMSP46 0×00002436 _start + 228 (crt.c:272)
52 com.cycling74.MaxMSP46 0×00002351 start + 41

Thread 1:
0 libSystem.B.dylib 0x90009bf7 mach_msg_trap + 7
1 com.unsanity.ape 0xc0001cac __ape_agent + 307
2 libSystem.B.dylib 0×90024147 _pthread_body + 84

Thread 2:
0 libSystem.B.dylib 0x90009bf7 mach_msg_trap + 7
1 …lagutin.audio_hijack.server 0x00da40c2 ah_serv_loop + 106
2 libSystem.B.dylib 0×90024147 _pthread_body + 84

Thread 3 Crashed:
0 com.apple.CoreGraphics 0x903afba4 aa_render + 4804
1 libRIP.A.dylib 0x942e76e4 ripr_Coverage + 1893
2 libRIP.A.dylib 0x942e6cc6 ripc_Render + 146
3 libRIP.A.dylib 0x942e639c ripc_DrawRects + 302
4 com.apple.CoreGraphics 0x90341dd0 __CGContextDrawRects +
596
5 com.apple.CoreGraphics 0x90341b4d CGContextFillRects + 117
6 com.apple.CoreGraphics 0x90341ad4 CGContextFillRect + 32
7 com.apple.HIToolbox 0x92efb9a3
TTableView::DrawBackgroundSelf(Rect const&, TDeviceRenderer::Context
const&, DBDrawFlags) const + 121
8 com.apple.HIToolbox 0x92efb31f TTableLayout::Draw
(Rect const&, UPoint32 const&, TDeviceRenderer::Context const&,
DBDrawFlags) const + 111
9 com.apple.HIToolbox 0x92efb28e TTableView::DrawView
(unsigned short, TDeviceRenderer::Context const&) const + 158
10 com.apple.HIToolbox 0x92f4a18d TColumnView::DrawCell
(TTableCell const&, unsigned long, TDeviceRenderer::Context const&)
const + 199
11 com.apple.HIToolbox 0x92efbffa
TTableView::DrawCellSelf(Cell32 const&, Rect const&,
TDeviceRenderer::Context const&, DBDrawFlags) const + 110
12 com.apple.HIToolbox 0x92efb3ac TTableLayout::Draw
(Rect const&, UPoint32 const&, TDeviceRenderer::Context const&,
DBDrawFlags) const + 252
13 com.apple.HIToolbox 0x92efb28e TTableView::DrawView
(unsigned short, TDeviceRenderer::Context const&) const + 158
14 com.apple.HIToolbox 0x92ef90d3 TBrowserView::Draw
(CGContext*, unsigned short, OpaqueRgnHandle*) const + 439
15 com.apple.HIToolbox 0x92ef8e94 TBrowser::Draw
(CGContext*, OpaqueRgnHandle*) const + 458
16 com.apple.HIToolbox 0x92eea7b9
TBrowser::EventHandlerProc(OpaqueEventHandlerCallRef*,
OpaqueEventRef*, void*) + 2705
17 com.apple.HIToolbox 0x92de8537 DispatchEventToHandlers
(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093
18 com.apple.HIToolbox 0x92de7bdc
SendEventToEventTargetInternal(OpaqueEventRef*,
OpaqueEventTargetRef*, HandlerCallRec*) + 304
19 com.apple.HIToolbox 0x92de7aa1
SendEventToEventTargetWithOptions + 55
20 com.apple.HIToolbox 0x92e14ff8 HIView::SendDraw
(short, OpaqueGrafPtr*, __HIShape const*, CGContext*) + 466
21 com.apple.HIToolbox 0x92f8bb68
HIView::RecursiveDrawComposited(__HIShape const*, unsigned long,
HIView*, CGContext*, unsigned char) + 874
22 com.apple.HIToolbox 0x92f8bcfa
HIView::RecursiveDrawComposited(__HIShape const*, unsigned long,
HIView*, CGContext*, unsigned char) + 1276
23 com.apple.HIToolbox 0x92f8bcfa
HIView::RecursiveDrawComposited(__HIShape const*, unsigned long,
HIView*, CGContext*, unsigned char) + 1276
24 com.apple.HIToolbox 0x92f8bcfa
HIView::RecursiveDrawComposited(__HIShape const*, unsigned long,
HIView*, CGContext*, unsigned char) + 1276
25 com.apple.HIToolbox 0x92f8c4ed HIView::DrawComposited
(short, OpaqueGrafPtr*, __HIShape const*, unsigned long, HIView*,
CGContext*) + 601
26 com.apple.HIToolbox 0x92e14a61 HIView::Draw(short,
OpaqueGrafPtr*, unsigned long) + 75
27 com.apple.HIToolbox 0x92e1499d HIView::Render
(unsigned long, CGContext*) + 45
28 com.apple.HIToolbox 0x92e0452a _ShowHideWindows + 504
29 com.apple.HIToolbox 0x92e2ef58 ShowWindow + 72
30 com.apple.NavigationServices 0x92d6e6bf
TBrowseDialog::StartDialog() + 389
31 com.apple.NavigationServices 0x92d5ce2c NavDialogRun + 36
32 com.cycling74.MaxMSP46 0x000037f9 navserv_save + 353
(navserv.c:739)
33 com.cycling74.MaxMSP46 0x0001935a saveasdialog_extended
+ 270 (fileutils.c:634)
34 com.cycling74.MaxAPI 0x0180f3c9 saveasdialog_extended
+ 66
35 com.cycling74.pattrstorage 0x16ac7e51
pattrstorage_file_write + 872
36 com.cycling74.MaxMSP46 0x0002fd6e typedmess_fun + 1486
(message.c:631)
37 com.cycling74.MaxMSP46 0x000e7627 outlet_anything + 343
(inletoutlet.c:960)
38 com.cycling74.MaxMSP46 0x0002fd6e typedmess_fun + 1486
(message.c:631)
39 com.cycling74.MaxMSP46 0x000302ae typedmess + 80
(message.c:399)
40 com.cycling74.MaxMSP46 0x00030d0c aeval + 1242
(message.c:1061)
41 com.cycling74.MaxMSP46 0×00009007 atombuf_eval + 203
(atombuf.c:234)
42 com.cycling74.MaxMSP46 0x000b5dea vmessage_int
(_vmessage*, long) + 92 (vmessage.c:66)
43 com.cycling74.MaxMSP46 0x000e6de3 outlet_int + 361
(inletoutlet.c:753)
44 com.cycling74.MaxMSP46 0x000e58c0 inlet_int + 172
(inletoutlet.c:183)
45 com.cycling74.MaxMSP46 0x000e6de3 outlet_int + 361
(inletoutlet.c:753)
46 com.cycling74.MaxMSP46 0x0009bc86 route_anything(route*,
symbol*, short, atom*) + 274 (route.c:217)
47 com.cycling74.MaxMSP46 0x0002f89f typedmess_fun + 255
(message.c:492)
48 com.cycling74.MaxMSP46 0x000e7627 outlet_anything + 343
(inletoutlet.c:960)
49 com.cycling74.MaxAPI 0x0180a5bc outlet_anything + 59
50 com.cycling74.ubumenu 0x00faf1a1 ubumenu_toggle + 170
51 com.cycling74.MaxMSP46 0x0002f89f typedmess_fun + 255
(message.c:492)
52 com.cycling74.MaxMSP46 0x000e7627 outlet_anything + 343
(inletoutlet.c:960)
53 com.cycling74.MaxMSP46 0x0002f89f typedmess_fun + 255
(message.c:492)
54 com.cycling74.MaxMSP46 0x000302ae typedmess + 80
(message.c:399)
55 com.cycling74.MaxMSP46 0x00030d0c aeval + 1242
(message.c:1061)
56 com.cycling74.MaxMSP46 0×00009007 atombuf_eval + 203
(atombuf.c:234)
57 com.cycling74.MaxMSP46 0x000b5d87 vmessage_bang
(_vmessage*) + 57 (vmessage.c:58)
58 com.cycling74.MaxMSP46 0x000e6bc5 outlet_bang + 271
(inletoutlet.c:654)
59 com.cycling74.MaxMSP46 0x00076db4 delay_tick(delay*) +
20 (delay.c:68)
60 com.cycling74.MaxMSP46 0×00012145 clock_execute + 87
(clock.c:173)
61 com.cycling74.MaxMSP46 0x000593fb sched_takepoll + 603
(sched.c:596)
62 com.cycling74.MaxMSP46 0×00059498 sched_poll + 52
(sched.c:515)
63 com.cycling74.MaxMSP46 0x000ea3f3 systimer_pollaction +
53 (systimer.c:84)
64 com.cycling74.MaxMSP46 0x000ea9d0 mactimer_isr() + 146
(mactimer.c:385)
65 …ple.CoreServices.CarbonCore 0x90ce913a TimerThread + 244
66 libSystem.B.dylib 0×90024147 _pthread_body + 84

Thread 4:

< <<<<>>>>>

Thread 3 crashed with X86 Thread State (32-bit):
eax: 0x000000ff ebx: 0x903ae8f1 ecx: 0x16cf3444 edx: 0x000000a2
edi: 0×00000178 esi: 0xb0199f40 ebp: 0xb019aef8 esp: 0xb0199f00
ss: 0x0000001f efl: 0×00010216 eip: 0x903afba4 cs: 0×00000017
ds: 0x0000001f es: 0x0000001f fs: 0×00000000 gs: 0×00000037


March 17, 2007 | 6:00 pm

This isn’t crashing for me, but I’m on a PPC. And I’m missing the
bpatcher subpatch, which may or may not be relevant.

jb

Am 17.03.2007 um 18:32 schrieb David Stevens:

> Max 4.6; OSX 10.4.9 MacBook Pro
>
> I have a modified version of a patch which contains an autopattr
> and a pattrstorage at the top level. Everytime I send the write
> message to pattrstorage, the file dialogue opens and then either
> max crashes or the whole computer locks up.


March 17, 2007 | 6:02 pm

Solved the problem, though ther may still be an issue with pattrstorage.

In the original version of the patch I used [psw.3d] buttons, which
I’ve been replacing with ubumenus in normal mode containing a single
item.

[psw.3d] replaced with [ubumenu] (with only one item in it)
1 2 3
|
[write]
|
[pattrstorage xxx]

As I use Paste Replace to replace the original objects, the
connection was still to the first outlet. This meant that clicking
once on the ubumenu caused two zeros to be sent to the the write
message to pattrstorage, causing it to be banged twice in quick
succession.
I moved the connection to the 2nd outlet of ubumenu (bang on button
down), which fixed the crashing.

Is this still a bug though? I can imagine that it’s still possible to
do a double click on a button and send 2 (or more ) bangs to the
write message box, potentially causing a crash.

David


March 17, 2007 | 6:10 pm

Interesting. As you will have seen, I found the problem. But why
doesn’t it crash on PPC?!
Does ubumenu behave differently? I’m pretty sure that I’d noticed in
the past that a single click on an ubumenu containing 1 item sent out
a single "0" from the first outlet. It now sends out 2 (though I
think that that is what I originally expected)

David

On 17 Mar 2007, at 18:00, Jeremy Bernstein wrote:

> This isn’t crashing for me, but I’m on a PPC. And I’m missing the
> bpatcher subpatch, which may or may not be relevant.
>
> jb
>
> Am 17.03.2007 um 18:32 schrieb David Stevens:
>
>> Max 4.6; OSX 10.4.9 MacBook Pro
>>
>> I have a modified version of a patch which contains an autopattr
>> and a pattrstorage at the top level. Everytime I send the write
>> message to pattrstorage, the file dialogue opens and then either
>> max crashes or the whole computer locks up.
>


March 17, 2007 | 7:11 pm

Interesting, thanks for taking the time to narrow it down. I still
can’t reproduce on PPC (I attached an Uzi 2 to the write message, for
instance). I’ll check it out on Monday on my Intel machine. Please
send the subpatch, though.

jb

Am 17.03.2007 um 19:02 schrieb David Stevens:

> Is this still a bug though? I can imagine that it’s still possible
> to do a double click on a button and send 2 (or more ) bangs to the
> write message box, potentially causing a crash.


March 17, 2007 | 8:34 pm

hi Jeremy

I’m looking and I’m looking – but I see no subpatch! Just some number
& float boxes; several ubumenus; an autopattr; and a pattrstorage &
it’s attendant commands.

I just tried again with the basic patch, and connecting the leftmost
outlet of the [write] ubumenu to the [write] message box going into
pattrstorage still causes a crash.

Here’s the patch again…

max v2;
#N vpatcher 47 45 785 535;
#P origin 354 -119;
#P window setfont "Sans Serif" 9.;
#P user ubumenu 68 135 100 196617 0 1 1 0;
#X add one;
#X add two;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P objectname ubumenu[1];
#P number 123 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number[2];
#P flonum 118 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname flonum[1];
#P flonum 79 207 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname flonum;
#P number 75 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number[1];
#P number 77 159 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname number;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P hidden newex 585 315 66 196618 prepend set;
#P hidden newex 393 345 74 196618 append prst1;
#P window setfont "Sans Serif" 9.;
#P hidden message 596 344 62 196617 savemode 2;
#P hidden message 522 345 71 196617 autorestore 1;
#P hidden newex 371 390 260 196617 pattrstorage ctrl_routingD
@autorestore 1 savemode 2;
#X client_rect 0 0 640 240;
#X storage_rect 10 59 650 299;
#P objectname ctrl_routingD;
#P bpatcher 197 98 64 19 0 0 ububutton2 1 view 185 252 255 102 237 255;
#P bpatcher 197 168 64 19 0 0 ububutton2 1 read 24 254 39 153 255 160;
#P bpatcher 197 191 64 19 0 0 ububutton2 1 write 254 40 18 255 150 139;
#P bpatcher 197 143 64 19 0 0 ububutton2 1 store 254 40 18 255 150 139;
#P hidden message 300 312 75 196617 storagewindow;
#P hidden message 516 317 29 196617 read;
#P hidden message 479 317 34 196617 write;
#P hidden newex 362 283 30 196617 int 0;
#P hidden newex 393 283 30 196617 int 0;
#P hidden newex 393 317 71 196617 prepend store;
#P window setfont "Sans Serif" 12.;
#P user ubumenu 197 71 61 196620 0 1 1 0;
#X add temp;
#X add prst1;
#X add prst2;
#X add prst3;
#X add prst4;
#X add prst5;
#X add prst6;
#X add prst7;
#X add prst8;
#X add prst9;
#X add prst10;
#X add prst11;
#X add prst12;
#X add prst13;
#X add prst14;
#X add prst15;
#X add prst16;
#X add prst17;
#X add prst18;
#X add prst19;
#X add prst20;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P objectname ubumenu;
#P bpatcher 197 121 64 19 0 0 ububutton2 1 recall 24 254 39 153 255 160;
#P window setfont "Sans Serif" 9.;
#P hidden newex 39 76 142 196617 autopattr ctrllr @autoname 1;
#X prestore flonum 1 0 -0.25;
#X prestore flonum[1] 1 0 0.06;
#X prestore number 1 0 14;
#X prestore number[1] 1 0 -24;
#X prestore number[2] 1 0 8;
#X prestore ubumenu 1 0 prst1;
#X prestore ubumenu[1] 1 0 two;
#P objectname ctrllr;
#P hidden fasten 12 0 8 0 202 116 293 116 293 303 305 303;
#P hidden fasten 1 0 5 0 202 139 293 139 293 277 367 277;
#P hidden fasten 15 0 13 0 601 369 376 369;
#P hidden fasten 14 0 13 0 527 367 376 367;
#P hidden fasten 7 0 13 0 521 367 376 367;
#P hidden fasten 6 0 13 0 484 367 376 367;
#P hidden fasten 5 0 13 0 367 351 376 351;
#P hidden fasten 8 0 13 0 305 368 376 368;
#P hidden fasten 16 0 13 0 398 375 376 375;
#P hidden fasten 2 0 5 1 202 95 293 95 293 277 387 277;
#P hidden fasten 9 0 4 0 202 162 293 162 293 277 398 277;
#P hidden connect 4 0 3 0;
#P hidden connect 3 0 16 0;
#P hidden fasten 17 0 16 0 590 337 398 337;
#P hidden fasten 2 0 4 1 202 95 293 95 293 277 418 277;
#P hidden fasten 10 0 6 0 202 211 293 211 293 307 484 307;
#P hidden fasten 11 0 7 0 202 185 293 185 293 307 521 307;
#P hidden fasten 2 1 17 0 227 95 293 95 293 307 590 307;
#P pop;

On 17 Mar 2007, at 19:11, Jeremy Bernstein wrote:

> Interesting, thanks for taking the time to narrow it down. I still
> can’t reproduce on PPC (I attached an Uzi 2 to the write message,
> for instance). I’ll check it out on Monday on my Intel machine.
> Please send the subpatch, though.
>
> jb
>
> Am 17.03.2007 um 19:02 schrieb David Stevens:
>
>> Is this still a bug though? I can imagine that it’s still possible
>> to do a double click on a button and send 2 (or more ) bangs to
>> the write message box, potentially causing a crash.
>


March 17, 2007 | 9:00 pm

Dude, you have something there in a bpatcher called ububutton2 or
something like that. It’s your patch!

#P bpatcher 197 98 64 19 0 0 ububutton2 1 view 185 252 255 102 237 255;

jb

Am 17.03.2007 um 21:34 schrieb David Stevens:

> hi Jeremy
>
> I’m looking and I’m looking – but I see no subpatch! Just some
> number & float boxes; several ubumenus; an autopattr; and a
> pattrstorage & it’s attendant commands.
>
> I just tried again with the basic patch, and connecting the
> leftmost outlet of the [write] ubumenu to the [write] message box
> going into pattrstorage still causes a crash.
>
> Here’s the patch again…
>
> max v2;
> #N vpatcher 47 45 785 535;
> #P origin 354 -119;
> #P window setfont "Sans Serif" 9.;
> #P user ubumenu 68 135 100 196617 0 1 1 0;
> #X add one;
> #X add two;
> #X prefix_set 0 0 0;
> #X pattrmode 1;
> #P objectname ubumenu[1];
> #P number 123 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[2];
> #P flonum 118 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname flonum[1];
> #P flonum 79 207 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname flonum;
> #P number 75 182 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number[1];
> #P number 77 159 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P objectname number;
> #P window setfont "Sans Serif" 10.;
> #P window linecount 1;
> #P hidden newex 585 315 66 196618 prepend set;
> #P hidden newex 393 345 74 196618 append prst1;
> #P window setfont "Sans Serif" 9.;
> #P hidden message 596 344 62 196617 savemode 2;
> #P hidden message 522 345 71 196617 autorestore 1;
> #P hidden newex 371 390 260 196617 pattrstorage ctrl_routingD
> @autorestore 1 savemode 2;
> #X client_rect 0 0 640 240;
> #X storage_rect 10 59 650 299;
> #P objectname ctrl_routingD;
> #P bpatcher 197 98 64 19 0 0 ububutton2 1 view 185 252 255 102 237
> 255;
> #P bpatcher 197 168 64 19 0 0 ububutton2 1 read 24 254 39 153 255 160;
> #P bpatcher 197 191 64 19 0 0 ububutton2 1 write 254 40 18 255 150
> 139;
> #P bpatcher 197 143 64 19 0 0 ububutton2 1 store 254 40 18 255 150
> 139;
> #P hidden message 300 312 75 196617 storagewindow;
> #P hidden message 516 317 29 196617 read;
> #P hidden message 479 317 34 196617 write;
> #P hidden newex 362 283 30 196617 int 0;
> #P hidden newex 393 283 30 196617 int 0;
> #P hidden newex 393 317 71 196617 prepend store;
> #P window setfont "Sans Serif" 12.;
> #P user ubumenu 197 71 61 196620 0 1 1 0;
> #X add temp;
> #X add prst1;
> #X add prst2;
> #X add prst3;
> #X add prst4;
> #X add prst5;
> #X add prst6;
> #X add prst7;
> #X add prst8;
> #X add prst9;
> #X add prst10;
> #X add prst11;
> #X add prst12;
> #X add prst13;
> #X add prst14;
> #X add prst15;
> #X add prst16;
> #X add prst17;
> #X add prst18;
> #X add prst19;
> #X add prst20;
> #X prefix_set 0 0
0;
> #X pattrmode 1;
> #P objectname ubumenu;
> #P bpatcher 197 121 64 19 0 0 ububutton2 1 recall 24 254 39 153 255
> 160;
> #P window setfont "Sans Serif" 9.;
> #P hidden newex 39 76 142 196617 autopattr ctrllr @autoname 1;
> #X prestore flonum 1 0 -0.25;
> #X prestore flonum[1] 1 0 0.06;
> #X prestore number 1 0 14;
> #X prestore number[1] 1 0 -24;
> #X prestore number[2] 1 0 8;
> #X prestore ubumenu 1 0 prst1;
> #X prestore ubumenu[1] 1 0 two;
> #P objectname ctrllr;
> #P hidden fasten 12 0 8 0 202 116 293 116 293 303 305 303;
> #P hidden fasten 1 0 5 0 202 139 293 139 293 277 367 277;
> #P hidden fasten 15 0 13 0 601 369 376 369;
> #P hidden fasten 14 0 13 0 527 367 376 367;
> #P hidden fasten 7 0 13 0 521 367 376 367;
> #P hidden fasten 6 0 13 0 484 367 376 367;
> #P hidden fasten 5 0 13 0 367 351 376 351;
> #P hidden fasten 8 0 13 0 305 368 376 368;
> #P hidden fasten 16 0 13 0 398 375 376 375;
> #P hidden fasten 2 0 5 1 202 95 293 95 293 277 387 277;
> #P hidden fasten 9 0 4 0 202 162 293 162 293 277 398 277;
> #P hidden connect 4 0 3 0;
> #P hidden connect 3 0 16 0;
> #P hidden fasten 17 0 16 0 590 337 398 337;
> #P hidden fasten 2 0 4 1 202 95 293 95 293 277 418 277;
> #P hidden fasten 10 0 6 0 202 211 293 211 293 307 484 307;
> #P hidden fasten 11 0 7 0 202 185 293 185 293 307 521 307;
> #P hidden fasten 2 1 17 0 227 95 293 95 293 307 590 307;
> #P pop;
>
> On 17 Mar 2007, at 19:11, Jeremy Bernstein wrote:
>
>> Interesting, thanks for taking the time to narrow it down. I still
>> can’t reproduce on PPC (I attached an Uzi 2 to the write message,
>> for instance). I’ll check it out on Monday on my Intel machine.
>> Please send the subpatch, though.
>>
>> jb
>>
>> Am 17.03.2007 um 19:02 schrieb David Stevens:
>>
>>> Is this still a bug though? I can imagine that it’s still
>>> possible to do a double click on a button and send 2 (or more )
>>> bangs to the write message box, potentially causing a crash.
>>
>


March 17, 2007 | 9:24 pm

On 17 Mar 2007, at 21:00, Jeremy Bernstein wrote:

> Dude, you have something there in a bpatcher called ububutton2 or
> something like that. It’s your patch!
>

(cringes with embarrasment)

It looks like an ubumenu, but you’re right, it’s an ububutton. Mea
maxima cupla. Here you go …

Save as ububutton2 (but you knew that)

max v2;
#N vpatcher 11 58 139 186;
#P origin 0 -243;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P hidden newex 272 -52 110 196618 loadmess $5 $6 $7;
#P hidden message 272 -29 85 196618 rgb3 $1 $2 $3;
#P hidden message 148 -28 84 196618 brgb $1 $2 $3;
#P hidden newex 148 -49 110 196618 loadmess $2 $3 $4;
#N comlet messages to ubu;
#P hidden inlet 102 -27 15 0;
#N comlet bang on off (delayed 250ms);
#P hidden outlet 201 122 15 0;
#P hidden message 0 -32 48 196618 toggle 0;
#P hidden newex 1 -61 59 196618 delay 250;
#N comlet bang on mouse down;
#P hidden outlet 164 121 15 0;
#P hidden newex 164 90 48 196618 select 1;
#N comlet 0/1 out;
#P hidden outlet 54 86 15 0;
#P hidden newex 54 50 67 196618 route toggle;
#P window setfont "Sans Serif" 12.;
#P user ubumenu -1 -1 66 196620 1 0 1 1;
#X setrgb 31 31 31 169 226 209 255 244 158 248 41 0 255 41 25 112 112
112;
#X add $1;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P hidden connect 11 0 0 0;
#P hidden connect 10 0 0 0;
#P hidden connect 8 0 0 0;
#P hidden connect 6 0 0 0;
#P hidden connect 5 0 6 0;
#P hidden fasten 3 0 5 0 169 114 233 114 233 -84 6 -84;
#P hidden connect 0 2 1 0;
#P hidden connect 1 0 2 0;
#P hidden connect 9 0 10 0;
#P hidden fasten 1 0 3 0 59 77 169 77;
#P hidden connect 3 0 4 0;
#P hidden connect 3 1 7 0;
#P hidden connect 12 0 11 0;
#P pop;


March 17, 2007 | 11:24 pm

On 17 mars 07, at 20:11, Jeremy Bernstein wrote:

> Interesting, thanks for taking the time to narrow it down. I still
> can’t reproduce on PPC (I attached an Uzi 2 to the write message,
> for instance). I’ll check it out on Monday on my Intel machine.

I just checked on my MacBook Pro, and I can’t make it crash either.
Which version of Max do you use? Can you explain the steps to go to
the crash.

Thanks.
ej


March 17, 2007 | 11:37 pm


March 18, 2007 | 11:10 am


March 18, 2007 | 3:17 pm

Theoretically, it should. That it doesn’t, and instead causes a
crash, is probably a consequence of thread safety issues on multiple
processor machines. Will look into it (once I’m on a multiproc
machine to test!). Thanks for the reports!

jb

Am 18.03.2007 um 12:10 schrieb David Stevens:

> Perhaps pattrstorage should ignore double messages like that? (It
> reminds of the switch bounce mod on the SP25 record deck, which
> avoided the (DJ) embarrassment of records starting then immediately
> stopping!)


March 20, 2007 | 7:17 am

David Stevens schrieb:
> I just tried again with the basic patch, and connecting the leftmost
> outlet of the [write] ubumenu to the [write] message box going into
> pattrstorage still causes a crash.

Just an observation, you include the ubumenu which selects the progarm
into your pattrstorage, which doesn’t make sense for me.

Does it also crash if you exclude that ubumenu with the second outlet of
autopattr?

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


March 20, 2007 | 9:29 am

hi Stefan,

On 20 Mar 2007, at 7:17, Stefan Tiedje wrote:

> David Stevens schrieb:
>> I just tried again with the basic patch, and connecting the
>> leftmost outlet of the [write] ubumenu to the [write] message box
>> going into pattrstorage still causes a crash.
>
> Just an observation, you include the ubumenu which selects the
> progarm into your pattrstorage, which doesn’t make sense for me.

Oh, I see. I think the only reason I didn’t specifically exclude it
is that it’s not a UI object that _mustn’t be reset. For example, a
floatnum box which sets buffer~ size is something that I don’t want
to recall, as I might just want to have different performance
parameters using the sound that’s already in the buffer. So I always
exclude such things from pattrstorage.

But you’re right – there’s _almost a loop there. But messages from
that [view] menu are only stored (in [int]) – you have to click a
button to pass them to pattrstorage. (The ububutton abstractions
don’t have autopattrs inside, so _their state isn’t being recalled.
If these were ubumenus (rather than abstractions) then you’re right,
there _would be a problem if they weren’t excluded).

So it wasn’t that that was causing the crash.

With a little memory nudge from Jeremy I actually sorted this out.
I’ve been using ubumenu as a button for a while now, (quicker and
easier than making button graphics in Photoshop), so I made an
abstraction to allow mw to quickly set it up the way I wanted. I’d
been working on other things than max for a while, so when I came
back to the patch I’d forgotten that I’d done this (this kind of
thing seems to happen as I get older!)
The crash was because pattrstorage was getting the write message
twice in very quick succession. I’d replaced some [psw.3d] buttons
with my abstraction, but I needed to use a different outlet. Mind
you, the double output from outlet 1 was wrong, so I fixed that and
added a few more modifications to the abstraction to make it work
correctly and betterly

David.


March 20, 2007 | 2:10 pm

I’ve reproduced and fixed the problem.

jb

Am 20.03.2007 um 08:17 schrieb Stefan Tiedje:

> David Stevens schrieb:
>> I just tried again with the basic patch, and connecting the
>> leftmost outlet of the [write] ubumenu to the [write] message box
>> going into pattrstorage still causes a crash.
>
> Just an observation, you include the ubumenu which selects the
> progarm into your pattrstorage, which doesn’t make sense for me.
>
> Does it also crash if you exclude that ubumenu with the second
> outlet of autopattr?


Viewing 15 posts - 1 through 15 (of 15 total)