java + jitter example patch crashes Live


    Oct 17 2012 | 4:32 am
    Hi,
    I'm experimenting with openGL and MXJ, rendered in a maxforlive device.
    I've slightly modified a Jitter example patch (jitter-examples/java/javagltest-example.maxpat ), pasted it into a new max midi device in Live, and I consistently get Live to crash, here's how :
    - in live, have a couple of tracks created in session view
    - load the created device, let's say on the first MIDI track
    - let the device do its display job by turning on the qmetro
    - select a different track
    - select the first MIDI track. OK no problem at this point.
    - select a different track
    - select the first MIDI track again
    - the whole device doesn't display (white rectangle instead), and Live crashes.
    The only modification I made from the original example is to render on a jit.pwindow instead of a floating jit.window. I'm attaching the modified patcher and M4L device.
    Does that sound like a familiar problem? The patcher runs just fine in max alone.
    Thank you for any hint!
    Julien
    More details :
    Live 8.2.5
    Max 5.1.9
    java 1.6.0_35
    Here are a few lines from the crash log :
    Process: Live [2578]
    Path: /Applications/Live 8.2.5/Live.app/Contents/MacOS/Live
    Identifier: com.ableton.live
    Version: 8.2.5 (2011-08-15_f0669f3480) (8.2.5 (2011-08-15_f0669f3480))
    Code Type: X86 (Native)
    Parent Process: launchd [121]
    Date/Time: 2012-10-16 23:21:44.634 -0500
    OS Version: Mac OS X 10.6.8 (10K549)
    Report Version: 6
    Interval Since Last Report: 2231226 sec
    Crashes Since Last Report: 242
    Per-App Interval Since Last Report: 495276 sec
    Per-App Crashes Since Last Report: 50
    Anonymous UUID: F1871E5E-67DB-4A00-B9D3-F2AB60A4D82A
    Exception Type: EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
    Crashed Thread: 0 Java: AWT-AppKit Dispatch queue: com.apple.main-thread
    Application Specific Information:
    Java information:
    Exception type: Bus Error (0xa) at pc=000000002d170a1c
    Java VM: Java HotSpot(TM) Client VM (20.10-b01-428 mixed mode macosx-x86)
    Current thread (0000000031000800): JavaThread "AWT-AppKit" [_thread_in_native, id=-1607817920, stack(00000000bf800000,00000000c0000000)]
    Stack: [00000000bf800000,00000000c0000000]
    Java Threads: ( => current thread )
    0000000031107400 JavaThread "AWT-Shutdown" [_thread_blocked, id=-1317597184, stack(00000000b1671000,00000000b1771000)]
    00000000310a2400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=-1321308160, stack(00000000b12e7000,00000000b13e7000)]
    00000000310a1400 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=-1322831872, stack(00000000b1173000,00000000b1273000)]
    00000000310a0400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=-1323888640, stack(00000000b1071000,00000000b1171000)]
    000000003109f400 JavaThread "Surrogate Locker Thread (Concurrent GC)" daemon [_thread_blocked, id=-1324945408, stack(00000000b0f6f000,00000000b106f000)]
    0000000030816c00 JavaThread "Finalizer" daemon [_thread_blocked, id=-1326002176, stack(00000000b0e6d000,00000000b0f6d000)]
    0000000030815c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=-1327058944, stack(00000000b0d6b000,00000000b0e6b000)]
    =>0000000031000800 JavaThread "AWT-AppKit" [_thread_in_native, id=-1607817920, stack(00000000bf800000,00000000c0000000)]
    Other Threads:
    0000000030813400 VMThread [stack: 00000000b0c69000,00000000b0d69000] [id=-1328115712]
    00000000310a3c00 WatcherThread [stack: 00000000b13e9000,00000000b14e9000] [id=-1320251392]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    par new generation total 14784K, used 2669K [0000000033810000, 0000000034810000, 0000000035810000)
    eden space 13184K, 20% used [0000000033810000, 0000000033aab698, 00000000344f0000)
    from space 1600K, 0% used [00000000344f0000, 00000000344f0000, 0000000034680000)
    to space 1600K, 0% used [0000000034680000, 0000000034680000, 0000000034810000)
    concurrent mark-sweep generation total 49152K, used 0K [0000000035810000, 0000000038810000, 0000000043810000)
    concurrent-mark-sweep perm gen total 12288K, used 4276K [0000000043810000, 0000000044410000, 0000000047810000)
    Code Cache [0000000031801000, 000000003188a000, 0000000033801000)
    total_blobs=191 nmethods=56 adapters=79 free_code_cache=32996864 largest_free_block=0
    Virtual Machine Arguments:
    JVM Args: -Xincgc -Xms64m -Xmx256m
    Java Command:
    Launcher Type: generic
    Physical Memory: Page Size = 4k, Total = 3840M, Free = 632M
    Thread 0 Crashed: Java: AWT-AppKit Dispatch queue: com.apple.main-thread
    0 com.cycling74.MaxPlugLib 0x2d170a1c jgraphics_rectangle + 114
    1 com.cycling74.MaxAPI 0x28e994de jgraphics_rectangle + 121
    2 com.cycling74.jit.pwindow 0x2ecdc668 jglcontext_paint + 330
    3 com.cycling74.MaxPlugLib 0x2d110beb object_method + 907
    4 com.cycling74.MaxAPI 0x28e8a078 object_method + 156
    5 com.cycling74.jit.pwindow 0x2ecd99fd max_jit_pwindow_paint_opengl_if_enabled + 384
    6 com.cycling74.MaxPlugLib 0x2d127860 MyComponentMovementWatcher::componentVisibilityChanged(juce::Component&) + 194
    7 com.cycling74.MaxPlugLib 0x2d2a04dc juce::Component::sendVisibilityChangeMessage() + 88
    8 com.cycling74.MaxPlugLib 0x2d2a209f juce::Component::setVisible(bool) + 243
    9 com.cycling74.MaxPlugLib 0x2d26ba0f LiveDeviceComponent::makeVisible(void*) + 653
    10 com.cycling74.MaxPlugLib 0x2d26b259 livewind_vis + 35
    11 com.cycling74.MaxPlugLib 0x2d110beb object_method + 907
    12 com.cycling74.MaxPlugLib 0x2d22fc0f patcherview_dovisible(_patcherview*, long) + 79
    13 com.cycling74.MaxPlugLib 0x2d22fdcb patcherview_makefrontmost(_patcherview*) + 25
    14 com.cycling74.MaxPlugLib 0x2d110beb object_method + 907
    15 com.cycling74.MaxAPI 0x28e8a078 object_method + 156
    16 com.cycling74.patcher 0x1fc02648 Wires::SetVisible(plug_DeviceRef*, int) + 196
    17 com.ableton.live 0x00dd3013 std::invalid_argument::~invalid_argument() + 1759859
    18 com.ableton.live 0x00dffdc5 std::invalid_argument::~invalid_argument() + 1943589
    19 com.ableton.live 0x00e002ab std::invalid_argument::~invalid_argument() + 1944843
    20 com.ableton.live 0x00e00308 std::invalid_argument::~invalid_argument() + 1944936
    21 com.ableton.live 0x014d0d2b std::out_of_range::~out_of_range() + 4739689
    22 com.ableton.live 0x014d0e52 std::out_of_range::~out_of_range() + 4739984
    23 com.ableton.live 0x014d0eee std::out_of_range::~out_of_range() + 4740140
    24 com.ableton.live 0x014dfe4c std::out_of_range::~out_of_range() + 4801418
    25 com.ableton.live 0x014dfee5 std::out_of_range::~out_of_range() + 4801571
    26 com.ableton.live 0x014d8b1e std::out_of_range::~out_of_range() + 4771932
    27 com.apple.AppKit 0x931d6a58 -[NSWindow sendEvent:] + 5549
    28 com.apple.AppKit 0x930ef60b -[NSApplication sendEvent:] + 6431
    29 com.ableton.live 0x014d6e34 std::out_of_range::~out_of_range() + 4764530
    30 com.apple.AppKit 0x93083253 -[NSApplication run] + 917
    31 com.ableton.live 0x014dcb4a std::out_of_range::~out_of_range() + 4788360
    32 com.ableton.live 0x014cec50 std::out_of_range::~out_of_range() + 4731278
    33 com.ableton.live 0x00003072 0x1000 + 8306
    34 com.ableton.live 0x00002f99 0x1000 + 8089