MySQL connection in Quartz Composer

jamesbrown's picture

I have a video playback system I implemented with max/msp/jitter that can uses either MySQLJDBC http://www.mdhosale.com/mysqljdbc/or Nick Rothwells net.loadbang-SQL http://www.loadbang.net/space/Software/net.loadbang-SQL to submit queries from max/msp

I would like to rebuild this system with Quartz Composer andI have made some initial attempts using OSC to pass data between max/msp and QC but would prefer to only use QC if possible.

I have searched various forums and google and have not found anything, so I am assuming that it is not possible, but wanted to ask here as I have limited knowledge of Javascript and MySQL.

To summarise are there any documented patches that can query a MySQL database from QC using Javascript or is there an inherent limitation/restriction in Javascript or QC that makes this not possible?

Thank you for reading.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cwright's picture
Re: MySQL connection in Quartz Composer

Javascript in QC doesn't have any way to access MySQL (or ODBC/JDBC bindings), so that's out.

However, a custom patch could perform SQL queries. It hasn't been requested much (there's been some talk, but it's usually quickly abandoned in favor of something simpler), so that's probably why you haven't seen anything from it.

dwskau's picture
Re: MySQL connection in Quartz Composer

I would also be interested in a MySQL patch.

jamesbrown's picture
Re: MySQL connection in Quartz Composer

thank you for the information, I think I understand how this can be achieved.

the main part of this project was built around MySQL and the part I want to rebuild is a simple client, which is only required to query the database and playback the returned video file (filename).

I only need to need the custom patch to perform two functions; make a connection, and perform the query.

I am not a programmer but I will read through 'Introduction to Quartz Composer Custom Patch Programming Guide' when I next have time and try to work it out from there.

Thank you

williamcotton's picture
Re: MySQL connection in Quartz Composer

A few years ago I worked with the MySQL C library. It is actually pretty straightforward. I don't think it would take very long to get a working QC patch, although I don't know if I have time in the immediate future.

Just curious, what kind of interface are you envisioning? The first one that popped in to my head was just a String input to the QC patch where you could put an SQL statement and an outlet that maps the rows returned to a Structure/array.

Update:

Here's a basic outline of it:

#include <mysql.h>
#include <stdio.h>
 
main() {
  MYSQL *conn;
  MYSQL_RES *res;
  MYSQL_ROW row;
 
  char *server = "localhost";
  char *user = "some_user";
  char *password = "some_passwd";
  char *database = "some_db";
 
  conn = mysql_init(NULL);
 
  /* Connect to database */
  if (!mysql_real_connect(conn, server,
        user, password, database, 0, NULL, 0)) {
     fprintf(stderr, "%s\n", mysql_error(conn));
     exit(0);
  }
 
  /* send SQL query */
  if (mysql_query(conn, "SELECT * FROM some_table WHERE some_column = 'some_data'")) {
     fprintf(stderr, "%s\n", mysql_error(conn));
     exit(0);
  }
 
  res = mysql_use_result(conn);
 
  /* output fields 1 and 2 of each row */
  while ((row = mysql_fetch_row(res)) != NULL)
     printf("%s %s\n", row[1], row[2]);
 
  /* Release memory used to store results and close connection */
  mysql_free_result(res);
  mysql_close(conn);
 
}

I might see if I can bang out a really quick version of it... I'll keep you posted.

williamcotton's picture
Re: MySQL connection in Quartz Composer

Yikes, well upon further inspection I'm realizing all my MySQL C knowledge is based around Makefiles, so it's probably going to take me some tinkering to get it working with Xcode...

jamesbrown's picture
Re: MySQL connection in Quartz Composer

Hello William/

The interface I had in max/msp/jitter used a scheme tracked two badge colours (using the cv.jit externals from Jean-Marc Pelletier), when a badge colour is detected the patch would format a specific query associated with that badge.

The query would return .mov filename from the database (from a list of files associated with the profile for that badge), because the database is programmed using a weighting system based on profiles for each badge type, I cannot replicate the database with folders or xml, which is why I would like to find a QC based solution for connecting to MySQL

I have not looked in to handling the colour tracking in QC in detail but what I have seen suggests it is possible; the MySQL component would only need to be able to format and make a simple query when necessary.

mattgolsen's picture
Re: MySQL connection in Quartz Composer

I am also interested in a MySQL plugin, I would also pay for it, or if any develop is interested in a bounty system, I would be interested in supporting that as well.

mattgolsen's picture
Re: MySQL connection in Quartz Composer

Have you had any luck with this?

williamcotton's picture
Re: MySQL connection in Quartz Composer

So, here's my first crack at it. It should be self-explanatory. BTW, I think it is compiled with a static library and should just work, but there's a chance that it might look for a dynamic library, which wouldn't work properly. Give it a shot, and let me know!

I'm gonna continue to work on it... there are quite possibly some memory leaks and other bugs, as with any first iteration.

Respond or email me at my_kineme_username@gmail.com with any bugs, suggestions, etc.

PreviewAttachmentSize
MySQLPatch.plugin.zip202.29 KB

williamcotton's picture
Re: MySQL connection in Quartz Composer

I think so, check out the post in below!

mattgolsen's picture
Re: MySQL connection in Quartz Composer

Is this for Snow Leopard or regular Leopard? I'm getting the following error in Console.app

9/24/09 4:56:19 PM Quartz Composer[2397] *** QCPlugIn: Cannot preflight plug-in at path "/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin" (Error Domain=NSCocoaErrorDomain Code=3585 UserInfo=0x11611c5f0 "The bundle “MySQLPatch” couldn’t be loaded because it doesn’t contain a version for the current architecture." (dlopen_preflight(/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch): no suitable image found. Did find: /Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch: mach-o, but wrong architecture))

cwright's picture
Re: MySQL connection in Quartz Composer

that post can also mean it's PPC or intel only -- filing it real quick, it looks like it's i386 only (32bit, intel).

that'll make Snow Leopard grumpy unless you start QC in 32bit mode

williamcotton's picture
Re: MySQL connection in Quartz Composer

Hah, yeah, I'm still on Leopard. (I can't risk things not working right now :)

I didn't notice that it was a 32-bit only compile, try this one instead...

PreviewAttachmentSize
MySQLPatch.plugin.zip202.28 KB

williamcotton's picture
Re: MySQL connection in Quartz Composer

I just tried to do an x86_64 only compile and got a bunch of linker errors... I don't think my version of libmysqlclient is 64bit, which could be the issue...

Sorry, I'll see if I can figure something out!

mattgolsen's picture
Re: MySQL connection in Quartz Composer

That crossed my mind, but I totally forgot to try it until now :D

It does appear to be looking for that library:

9/24/09 6:06:07 PM Quartz Composer[6483] *** QCPlugIn: Cannot preflight plug-in at path "/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin" (Error Domain=NSCocoaErrorDomain Code=3587 UserInfo=0x19b6f4a0 "The bundle “MySQLPatch” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch): Library not loaded: /usr/local/mysql/lib/libmysqlclient.15.dylib Referenced from: /Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch Reason: image not found))

williamcotton's picture
Re: MySQL connection in Quartz Composer

christopher, did you try running it in a 32bit environment? I'd like to make sure that it will indeed work on platforms without libmysqlclient available.

williamcotton's picture
Re: MySQL connection in Quartz Composer

Ah nuts, ok, let me see if I can figure this out... UNLESS you want to just go and compile libmysqlclient... and I guess either make sure it ends up in the directory or at least create a link to it...

run "mysql_config" from the command line and look at the "--libs" option.

BTW, if anyone has any suggestions as to the better way to be doing this, let me know!

I might look in to a Cocoa MySQL framework...

williamcotton's picture
Re: MySQL connection in Quartz Composer

If you want, you can grab the source and compile it yourself, once you've made sure you've got libmysqlclient...

http://github.com/williamcotton/MySQLPatch

Some tips:

Run mysql_config from the shell. Go in to the Project's build settings, and make sure that the output from mysql_config matches up with the following, as an example:

        --cflags         [-I/usr/local/mysql/include -Os -arch i386 -fno-common]
      It shows that the lib has been compiled for i386.
 
        --include        [-I/usr/local/mysql/include]
      This is the "Header Search Paths": /usr/local/mysql/include
 
        --libs           [-L/usr/local/mysql/lib -lmysqlclient -lz -lm]
      This is the "Library Search Paths": /usr/local/mysql/lib
      as well as the "Other Linker Flags": -lmysqlclient -lz -lm

Typically, if you're using a Makefile, autoconf will run mysql_config and set up everything for you... honestly, I'm pretty new to Xcode, so there may very well be a better solution, for compiling with C libraries, I have no clue though.

I'm going to look in to getting a pre-compiled version working... any tips would be great!

cwright's picture
Re: MySQL connection in Quartz Composer

I didn't try -- it's referencing a .dylib (DYnamic LIBrary), so I'm almost certain it's not staticly linked. In general, static linking is phenomenally rare on OS X

mattgolsen's picture
Re: MySQL connection in Quartz Composer

Darn GitHub is down right now, I'll try it in a bit.

williamcotton's picture
Re: MySQL connection in Quartz Composer

Alright, I really don't know if this did it, but I think it is compiled with the static library and it's in the plugin... it jumped in size by 2 MB, so that's a promising sign. :)

Give it a shot, let me know.

PreviewAttachmentSize
MySQLPatch.plugin.zip1.17 MB

cybero's picture
Re: MySQL connection in Quartz Composer

25/09/2009 01:05:28   Quartz Composer[271]   *** QCPlugIn: Cannot preflight plug-in at path "/Users/cybero/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin" (Error Domain=NSCocoaErrorDomain Code=3585 UserInfo=0x1174ee4d0 "The bundle “MySQLPatch” couldn’t be loaded because it doesn’t contain a version for the current architecture." (dlopen_preflight(/Users/cybero/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch): no suitable image found.  Did find:
   /Users/cybero/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch: mach-o, but wrong architecture))

also couldn't preflight from the Patches folder.

all in 64 - bit mode QC on a 32 bit boot

then

25/09/2009 01:09:54   Quartz Composer[286]   *** QCPlugIn: Cannot preflight plug-in at path "/Users/cybero/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin" (Error Domain=NSCocoaErrorDomain Code=3587 UserInfo=0x166929a0 "The bundle “MySQLPatch” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/Users/cybero/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch): Library not loaded: /usr/local/mysql/lib/libmysqlclient.15.dylib
  Referenced from: /Users/cybero/Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch
  Reason: image not found))

and

25/09/2009 01:10:16   Quartz Composer[286]   *** -[NSCFArray insertObject:atIndex:]: attempt to insert nil

plus

25/09/2009 01:10:16   25/09/2009 01:10:31   Quartz Composer[292]   *** <QCNodeManager | namespace = "com.apple.QuartzComposer" | 562 nodes>: Bundle at path "/Users/cybero/Library/Graphics/Quartz Composer Patches/MySQLPatch.plugin" is not a valid Graph Foundation plug-in

all in 32 bit mode on a 32 bit boot.

The MySQLpatch just fails to be loaded in the Library, which I guess is to be expected from a plugin, as the Console does state, lacking the requiste file at declared path point.

What about loading libtclsqlite3.dylib instead of seeking support for SQL via libmysqlclient.dylib ?

Oh, and I do not have an installed libmysqlclient.la or la_ra but does that really matter much at all when you are looking for /usr/local/mysql/lib/libmysqlclient.15.dylib?

Couldn't you use -single_module linking at compile time ?

williamcotton's picture
Re: MySQL connection in Quartz Composer

I'm not sure that you can create a MySQL client connection using libtclsqlite... I could be wrong.

That's weird that the latest I posted is looking for "/usr/local/mysql/lib/libmysqlclient.15.dylib".

For that last compile, I removed the reference to that directory from Library Search Paths and removed the -lmysqlclient linker flag and instead copied libmysqlclient.a in to the project and added to the Build Phases matching Copy Bundle Resource and Link Binary With Libraries.

Who knows if that'll work. I think the safest bet is to get the source, make sure you've got libmysqlclient.a/.dylib and the required headers and just compile it yourself.

If you're feeling extra perky, I created a "static_library" branch on the GitHub repo (http://github.com/williamcotton/MySQLPatch). Fork the project and do what you will with it! Note, the master branch is for the basic dynamically compiled patch. If you want, I can add your github account to the project, or you could just request an upstream pull.

On a somewhat related note, how about a kineme GitHub account and some of the projects moved over there? :)

cwright's picture
Re: MySQL connection in Quartz Composer

williamcotton wrote:
I'm not sure that you can create a MySQL client connection using libtclsqlite... I could be wrong.

Nope, you're right -- SQLite3 can only access on-disk files in the SQLite3 file format. MySQL can connect to MySQL servers. The end result is the same, but the way they go about accomplishing it is radically different. They're not drop-in replacements.

williamcotton wrote:
That's weird that the latest I posted is looking for "/usr/local/mysql/lib/libmysqlclient.15.dylib".

Make sure you make clean, delete the build directory, and recompile it. There shouldn't be any references to the .dylib anywhere (not in the Frameworks folder, nor in the library paths, which you've checked -- also check all the build settings, not just Development or Release).

williamcotton's picture
Re: MySQL connection in Quartz Composer

Alright, let's try this one!

BTW, it's still 32-bit.

PreviewAttachmentSize
MySQLPatch.plugin.zip1.95 MB

vade's picture
Re: MySQL connection in Quartz Composer

I would highly highly recommend using a framework like : http://code.google.com/p/mysql-cocoa-framework/, you will be able to get it 10.6, x86_64 compat for QC 4.0 out of the box.

Would be nice. Im happy to help, but I dont use git/github, nor do I have a huge project currently that would use this, but, I live random projects.

williamcotton's picture
Re: MySQL connection in Quartz Composer

Yeah, I looked at that, but it is really really old, like, back from the Project Builder/pre-Xcode days...

I found some other MySQL cocoa application that just included libmysqlclient.a and then used the C API. I'm pretty sure that's the standard way to do it.

I'll spend a little more time on it, mainly because I'm interested, but with the source code (and mysql_devel) in hand, it should be relatively painless to compile a copy for your own machine.

Of course, that last compile that I posted might work... I have no way to tell! It's been working fine on my machine all day long ;)

williamcotton's picture
Re: MySQL connection in Quartz Composer

BTW, here's what it looks like in action. :)

PreviewAttachmentSize
Quartz ComposerScreenSnapz001.mov643.2 KB

mattgolsen's picture
Re: MySQL connection in Quartz Composer

So I got the plugin working in Snow Leopard pulling from my Dreamhost account, it works perfectly well on launch (it runs any query if you save, close QC and reopen), but when I stop and restart the composition I will get the following error:

mattgolsen wrote:
Process: Quartz Composer [7919] Path: /Developer/Applications/Quartz Composer.app/Contents/MacOS/Quartz Composer Identifier: com.apple.QuartzComposer.editor Version: 4.0 (103.1) Build Info: QuartzComposerEditor-1030100~1 Code Type: X86 (Native) Parent Process: launchd [255]

PlugIn Path: /Library/Graphics/Quartz Composer Plug-Ins/MySQLPatch.plugin/Contents/MacOS/MySQLPatch PlugIn Identifier: com.redblueyellow.MySQLPatch PlugIn Version: 0.1 (0.1)

Date/Time: 2009-09-24 22:19:12.906 -0400 OS Version: Mac OS X 10.6.1 (10B504) Report Version: 6

Interval Since Last Report: 53506 sec Crashes Since Last Report: 7 Per-App Interval Since Last Report: 11599 sec Per-App Crashes Since Last Report: 7 Anonymous UUID: 37FF2A57-5D8B-4B0F-8048-D913789C3AD5

Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information: objc_msgSend() selector name: isKindOfClass:

Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x941b891b objc_msgSend + 27 1 com.apple.QuartzComposer 0x982ed5be _SetStructurePortValue + 75 2 com.redblueyellow.MySQLPatch 0x1cdbd5d5 -[MySQLPatchPlugIn(Execution) execute:atTime:withArguments:] + 967 3 com.apple.QuartzComposer 0x982ecf95 -[QCPlugInPatch execute:time:arguments:] + 121 4 com.apple.QuartzComposer 0x981a755e -[QCPatch(Private) _renderAtTime:arguments:] + 111 5 com.apple.QuartzComposer 0x981a74ca -[QCRenderingManager addPatch:context:time:arguments:nextExecutionTime:] + 2200 6 com.apple.QuartzComposer 0x981a63e7 -[QCPatch(Private) __execute:arguments:] + 754 7 com.apple.QuartzComposer 0x981a6082 -[QCPatch(Private) _execute:arguments:] + 1728 8 com.apple.QuartzComposer 0x981a6b59 -[QCPort _execute:arguments:] + 268 9 com.apple.QuartzComposer 0x981a5f36 -[QCPatch(Private) _execute:arguments:] + 1396 10 com.apple.QuartzComposer 0x981a6b59 -[QCPort _execute:arguments:] + 268 11 com.apple.QuartzComposer 0x981a5f36 -[QCPatch(Private) _execute:arguments:] + 1396 12 com.apple.QuartzComposer 0x981a6b59 -[QCPort _execute:arguments:] + 268 13 com.apple.QuartzComposer 0x981a5f36 -[QCPatch(Private) _execute:arguments:] + 1396 14 com.apple.QuartzComposer 0x981a6b59 -[QCPort _execute:arguments:] + 268 15 com.apple.QuartzComposer 0x981a5f36 -[QCPatch(Private) _execute:arguments:] + 1396 16 com.apple.QuartzComposer 0x981a6974 -[QCPatch(Private) _executeSubpatches:arguments:] + 243 17 com.apple.QuartzComposer 0x981a67a9 -[QCPatch(Customization) nextExecutionTimeForSubpatches:time:arguments:] + 192 18 com.apple.QuartzComposer 0x981a66b1 -[QCPatch(Customization) nextExecutionTime:time:arguments:] + 81 19 com.apple.QuartzComposer 0x981a660b -[QCPatch(Private) _nextExecutionTime:arguments:] + 461 20 com.apple.QuartzComposer 0x981a639f -[QCPatch(Private) __execute:arguments:] + 682 21 com.apple.QuartzComposer 0x981a6082 -[QCPatch(Private) _execute:arguments:] + 1728 22 com.apple.QuartzComposer 0x981a4682 -[QCContext nextExecutionTimeForPatch:time:arguments:] + 643 23 com.apple.QuartzComposer 0x981a43f9 -[QCGraphicsContext nextExecutionTimeForPatch:time:arguments:] + 73 24 com.apple.QuartzComposer 0x981a41d3 -[QCOpenGLContext nextExecutionTimeForPatch:time:arguments:] + 528 25 com.apple.QuartzComposer 0x981a3fb0 -[QCPatch(Runtime) nextExecutionTime:arguments:] + 92 26 ...apple.QuartzComposer.editor 0x0000f246 0x1000 + 57926 27 com.apple.QuartzComposer 0x981eff08 -[QCView render:arguments:] + 412 28 com.apple.QuartzComposer 0x981ef5bc -[QCView startRendering:] + 846 29 ...apple.QuartzComposer.editor 0x0000eabb 0x1000 + 55995 30 com.apple.QuartzComposer 0x981eee3d -[QCView startRendering] + 42 31 com.apple.AppKit 0x968d1a40 -[NSToolbarButton sendAction:to:] + 100 32 com.apple.AppKit 0x968d19d1 -[NSToolbarButton sendAction] + 88 33 com.apple.AppKit 0x968ba5af -[NSToolbarItemViewer mouseDown:] + 4976 34 com.apple.AppKit 0x967b40c4 -[NSWindow sendEvent:] + 5549 35 com.apple.AppKit 0x966ccceb -[NSApplication sendEvent:] + 6431 36 ...apple.QuartzComposer.editor 0x0000c513 0x1000 + 46355 37 com.apple.AppKit 0x966606fb -[NSApplication run] + 917 38 ...apple.QuartzComposer.editor 0x000035d7 0x1000 + 9687 39 com.apple.AppKit 0x96658735 NSApplicationMain + 574 40 ...apple.QuartzComposer.editor 0x0000284d 0x1000 + 6221

Thread 1: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x927af03a kevent + 10 1 libSystem.B.dylib 0x927af768 _dispatch_mgr_invoke + 215 2 libSystem.B.dylib 0x927aebf9 _dispatch_queue_invoke + 183 3 libSystem.B.dylib 0x927ae98a _dispatch_worker_thread2 + 234 4 libSystem.B.dylib 0x927ae401 _pthread_wqthread + 390 5 libSystem.B.dylib 0x927ae246 start_wqthread + 30

Thread 2: 0 libSystem.B.dylib 0x927b6782 __semwait_signal + 10 1 libSystem.B.dylib 0x927b643e _pthread_cond_wait + 1191 2 libSystem.B.dylib 0x927b80d8 pthread_cond_wait$UNIX2003 + 73 3 GLEngine 0x13fde3fb gleCmdProcessor + 162 4 libSystem.B.dylib 0x927b5f39 _pthread_start + 345 5 libSystem.B.dylib 0x927b5dbe thread_start + 34

Thread 3: 0 libSystem.B.dylib 0x927ae092 __workq_kernreturn + 10 1 libSystem.B.dylib 0x927ae628 _pthread_wqthread + 941 2 libSystem.B.dylib 0x927ae246 start_wqthread + 30

Thread 0 crashed with X86 Thread State (32-bit): eax: 0x15f936f0 ebx: 0x982f128a ecx: 0x96e743c4 edx: 0x15faef46 edi: 0x00000000 esi: 0x96e743c4 ebp: 0xbfffe668 esp: 0xbfffe604 ss: 0x0000001f efl: 0x00010206 eip: 0x941b891b cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x00000000

I think this could open up a lot of doors for QC, and I'm really glad you're taking an interest in it.

Would it be possible to add an "update" function, like the XML or RSS patches have? Just to refresh the query.

Thanks again for your work!

vade's picture
Re: MySQL connection in Quartz Composer

nice!

williamcotton's picture
Re: MySQL connection in Quartz Composer

I'm glad you got it to compile!

Yup, I'm getting the same error. Yikes, I didn't test start and stopping, hehe.

I'll add update functionality as well... should be pretty easy.

williamcotton's picture
Re: MySQL connection in Quartz Composer

Bug fixed and Update Signal added.

BTW, there are still probably some nasties hidden in there... keep me updated on any more bugs!

I'm guessing you compiled it, right? I'm getting off the computer for the night, so email me and I'll compile one for you tomorrow.

cybero's picture
Re: MySQL connection in Quartz Composer

Loads in Library, but really crashes if it's not pointed absolutely right at start time, even entering a key whilst rendering makes it bolt :-)

However the main thing for me with this plugin is to get the details entered as per the sql server account before starting the render.

In a 32 bit boot, it works and looks pretty interesting indeed.

Console output -

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib                  0x974b191b objc_msgSend + 27
1   com.apple.QuartzComposer         0x969d34ba -[QCPatch(Private) _cleanup] + 183
2   com.apple.QuartzComposer         0x9699d389 -[GFList makeObjectsPerformSelector:] + 100
3   com.apple.QuartzComposer         0x969d3475 -[QCPatch(Private) _cleanup] + 114
4   com.apple.QuartzComposer         0x969d331f -[QCContext stopRenderingPatch:] + 137
5   com.apple.QuartzComposer         0x969d328b -[QCGraphicsContext stopRenderingPatch:] + 106
6   com.apple.QuartzComposer         0x969d3216 -[QCOpenGLContext stopRenderingPatch:] + 127
7   com.apple.QuartzComposer         0x969d318f -[QCPatch(Runtime) stopRendering] + 64
8   com.apple.QuartzComposer         0x969e803a -[QCView stopRendering] + 191
9   ...apple.QuartzComposer.editor   0x000098bb 0x1000 + 35003
10  com.apple.AppKit                 0x93bf4a40 -[NSToolbarButton sendAction:to:] + 100
11  com.apple.AppKit                 0x93bf49d1 -[NSToolbarButton sendAction] + 88
12  com.apple.AppKit                 0x93bdd5af -[NSToolbarItemViewer mouseDown:] + 4976
13  com.apple.AppKit                 0x93ad70c4 -[NSWindow sendEvent:] + 5549
14  com.apple.AppKit                 0x939efceb -[NSApplication sendEvent:] + 6431
15  ...apple.QuartzComposer.editor   0x0000c513 0x1000 + 46355
16  com.apple.AppKit                 0x939836fb -[NSApplication run] + 917
17  ...apple.QuartzComposer.editor   0x000035d7 0x1000 + 9687
18  com.apple.AppKit                 0x9397b735 NSApplicationMain + 574
19  ...apple.QuartzComposer.editor   0x0000284d 0x1000 + 6221
 
Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib                0x90f9603a kevent + 10
1   libSystem.B.dylib                0x90f96768 _dispatch_mgr_invoke + 215
2   libSystem.B.dylib                0x90f95bf9 _dispatch_queue_invoke + 183
3   libSystem.B.dylib                0x90f9598a _dispatch_worker_thread2 + 234
4   libSystem.B.dylib                0x90f95401 _pthread_wqthread + 390
5   libSystem.B.dylib                0x90f95246 start_wqthread + 30
 
Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x169ce270  ebx: 0x96aeead3  ecx: 0x9414d260  edx: 0x15677913
  edi: 0x00000000  esi: 0x1563dd80  ebp: 0xbffff018  esp: 0xbfffeff4
   ss: 0x0000001f  efl: 0x00010202  eip: 0x974b191b   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x00000000

.lov.'s picture
Re: MySQL connection in Quartz Composer

very nice!

toneburst's picture
Re: MySQL connection in Quartz Composer

Very cool!

a|x

mattgolsen's picture
Re: MySQL connection in Quartz Composer

I'm having trouble getting the latest version to compile, it's complaining about the arch. for MySQL. I'm going to muck about with it some more and see what I can get.

dust's picture
Re: MySQL connection in Quartz Composer

this just proves how great a qc website could be... well for the apple community.

cybero's picture
Re: MySQL connection in Quartz Composer

I can get that kind of reaction as screen captured from QC and my test set up using your patch, but it is quite unsteady and given to crashing QC in 32 bit mode , [no 64 bit mode as pointed out previously], if I'm changing things with the render on whilst editing and also upon a successful connect, albeit sometimes with MySQL error messages, as and when I choose to switch the render off.

Going to back burner this patch into the temporary (Disabled) items folder for the time being.

williamcotton's picture
Re: MySQL connection in Quartz Composer

If you grab the latest version of the source code and compile it locally it seems to be pretty stable.

I'm still going to work on a more stable precompiled version, but it's gonna take some fiddling. It is hard to test because I've got a feeling that the types of errors you're experience have to do with the version of libmysqlclient I compiled it with, which could have traces of links to dynamic libraries from my computer...

smkaur's picture
Re: MySQL connection in Quartz Composer

Is this plugin not compatible with the Snow Leopard Quartz Composer? Any more developement on this?

monobrau's picture
Re: MySQL connection in Quartz Composer

I'm also looking...

I tried compiling it myself, but got stuck in the mysql_config, does anyone have a latest build available, or some clues how a total noob on x-code can get this compiled himself? Or are there any alternatives for QC/sql communication?

Thanks!