dbviewer crashing


    Mar 02 2009 | 11:26 pm
    I compiled dbviewer from the SDK as a starting point for learning about the dataview module, but something is wrong with the code somewhere.
    Running the provided dbviewer.maxpat, everything appears to be ok. If I create a new patcher and create dbviewer as a new object, it's fine too. When I save this patcher and reopen it, it crashes (on the call to maxsqlite_createview()). I'm guessing some things are initialized properly in dbviewer.maxpat, which aren't set correctly when you just create the object on its own.
    In my first attempt I tried to take out the database part of the code, and my external crashed on jbox_new(), which seemed odd since I didn't touch the jgraphics part of the code.
    Is there a better / different example (without the database stuff) of dataview in action?
    Thijs
    Process: MaxMSP [8331]
    Path: /Applications/Max5/MaxMSP.app/Contents/MacOS/MaxMSP
    Identifier: com.cycling74.MaxMSP
    Version: 5.0.6 (37726) (5.0.6)
    Code Type: X86 (Native)
    Parent Process: launchd [124]
    Date/Time: 2009-03-03 00:12:41.404 +0100
    OS Version: Mac OS X 10.5.6 (9G55)
    Report Version: 6
    Exception Type: EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000244
    Crashed Thread: 0
    Thread 0 Crashed:
    0 com.cycling74.sqlite 0x15f427f5 maxsqlite_createview + 117
    1 com.cycling74.MaxMSP 0x000ad0c5 object_method + 901
    2 com.cycling74.MaxAPI 0x00ebff11 object_method + 156
    3 com.cycling74.dbviewer 0x00d5d400 db_view_create + 60 (ext_database.c:150)
    4 com.cycling74.dbviewer 0x00d5e6a0 dbviewer_set_database + 184 (dbviewer.c:313)
    5 com.cycling74.MaxMSP 0x000ad4f7 object_attr_setvalueof + 199
    6 com.cycling74.MaxMSP 0x0009bae4 attr_dictionary_process_cb(_dictionary_entry*, object*) + 408
    7 com.cycling74.MaxMSP 0x00055260 linklist_funall + 68
    8 com.cycling74.MaxMSP 0x0009b8e4 attr_dictionary_process + 32
    9 com.cycling74.MaxAPI 0x00ec8265 attr_dictionary_process + 36
    10 com.cycling74.dbviewer 0x00d5dec5 dbviewer_new + 303 (dbviewer.c:139)
    11 com.cycling74.MaxMSP 0x00018ad3 typedmess_fun + 1973
    12 com.cycling74.MaxMSP 0x000ad3b5 object_new_typed_flags + 383
    13 com.cycling74.MaxMSP 0x000ad42e object_new_typed + 46
    14 com.cycling74.MaxMSP 0x0015df78 jpatcher_newobject + 358
    15 com.cycling74.MaxMSP 0x0015e40e jpatcher_pastefromdictionary + 286
    16 com.cycling74.MaxMSP 0x0016a807 jpatcher_fromdictionary + 1471
    17 com.cycling74.MaxMSP 0x0016aa6b jpatcher_new + 593
    18 com.cycling74.MaxMSP 0x00018ad3 typedmess_fun + 1973
    19 com.cycling74.MaxMSP 0x000ad3f0 object_new_typed_flags + 442
    20 com.cycling74.MaxMSP 0x000ad42e object_new_typed + 46
    21 com.cycling74.MaxMSP 0x0000da89 jpatcher_load_fromdictionary(char*, short, object*, short, atom*) + 437
    22 com.cycling74.MaxMSP 0x0000dc08 jpatcher_load_frombuffer(char*, short, char const*, long, short, atom*) + 310
    23 com.cycling74.MaxMSP 0x0000de47 jpatcher_load(char*, short, short, atom*) + 373
    24 com.cycling74.MaxMSP 0x0000e0cd lowload_type + 589
    25 com.cycling74.MaxMSP 0x0000e9b3 fileload_extended + 169
    26 com.cycling74.MaxMSP 0x0000eef7 fileload_unique + 99
    27 com.cycling74.MaxMSP 0x0000ef2a fileload_type + 40
    28 com.cycling74.MaxMSP 0x0000f07e dropload + 338
    29 com.cycling74.MaxMSP 0x00004ad8 ae_openfile(FSRef*) + 60
    30 com.cycling74.MaxMSP 0x0004cbc7 sysiac_iterate + 223
    31 com.cycling74.MaxMSP 0x00004b59 ae_docopen(AEDesc const*, AEDesc*, long) + 39
    32 com.apple.AE 0x9474d648 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned long, unsigned char*) + 144
    33 com.apple.AE 0x9474d57e dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 44
    34 com.apple.AE 0x9474d425 aeProcessAppleEvent + 177
    35 com.apple.HIToolbox 0x915349a5 AEProcessAppleEvent + 38
    36 com.cycling74.MaxMSP 0x0029a1da juce::juce_dispatchNextMessageOnSystemQueue(bool) + 558
    37 com.cycling74.MaxMSP 0x002a3be6 juce::MessageManager::dispatchNextMessage(bool, bool*) + 68
    38 com.cycling74.MaxMSP 0x002a3c90 juce::MessageManager::runDispatchLoop() + 34
    39 com.cycling74.MaxMSP 0x002a25db juce::JUCEApplication::main(juce::String&, juce::JUCEApplication*) + 605
    40 com.cycling74.MaxMSP 0x002a26b5 juce::JUCEApplication::main(int, char**, juce::JUCEApplication*) + 125
    41 com.cycling74.MaxMSP 0x001c8e2a main + 76
    42 com.cycling74.MaxMSP 0x000027a2 _start + 216
    43 com.cycling74.MaxMSP 0x000026c9 start + 41