Sequel + SQLite Crash SIGABRT
Hey guys, I filed a bug report, dealing with Sequel and SQLite, with a minimal example reproducing the problem. The jist of it, is when I create a new instance of my class that is subclassed from Sequel::Model, and attempt to assign data to it, it crashes with a SIGABRT. Looking through the backtrace (which is also attached), it seems to crash in Sequel's model class, when inspecting the object. Mind you, I'm not actually doing any inspection of the new instance, I'm only creating an instance of the class, and attempting to assign data to it. It simply fails, and crashes on MacIRB. I have no problems with Ruby itself, as it runs just perfect, and as expected. I dunno what is causing the issues, but I figured I would bring it up, as I filed the ticket here: https://www.macruby.org/trac/ticket/930 Also, as a Side question, I'm building my code right now, using macrubyc, and a snippet from macruby_deploy to compile all my Ruby files into .rbo files, which is all fine and dandy, as everything works the way I intended (EG: not all of my .rbo files are in the root directory, and is structured in the .app bundle), I was wondering, if there was a way to compile all my .rbo files into a .dynlib and have my main program, link to the dynlib, so I can avoid having to have a bunch of .rbo files in the root of my Resources directory, or if I should continue to compile them into .rbo's, and using my structured layout instead. Thanks, Mario -- Mario Steele Lieutenant Commander 3 XO - Geo 99 XO - STO IFT Fleet http://www.trekfederation.com http://geo99.ruby-im.net
Hi Mario, On Oct 6, 2010, at 12:56 AM, Mario Steele wrote:
Hey guys,
I filed a bug report, dealing with Sequel and SQLite, with a minimal example reproducing the problem. The jist of it, is when I create a new instance of my class that is subclassed from Sequel::Model, and attempt to assign data to it, it crashes with a SIGABRT. Looking through the backtrace (which is also attached), it seems to crash in Sequel's model class, when inspecting the object. Mind you, I'm not actually doing any inspection of the new instance, I'm only creating an instance of the class, and attempting to assign data to it. It simply fails, and crashes on MacIRB. I have no problems with Ruby itself, as it runs just perfect, and as expected. I dunno what is causing the issues, but I figured I would bring it up, as I filed the ticket here: https://www.macruby.org/trac/ticket/930
Thanks for filing the problem, I will have a look soon.
Also, as a Side question, I'm building my code right now, using macrubyc, and a snippet from macruby_deploy to compile all my Ruby files into .rbo files, which is all fine and dandy, as everything works the way I intended (EG: not all of my .rbo files are in the root directory, and is structured in the .app bundle), I was wondering, if there was a way to compile all my .rbo files into a .dynlib and have my main program, link to the dynlib, so I can avoid having to have a bunch of .rbo files in the root of my Resources directory, or if I should continue to compile them into .rbo's, and using my structured layout instead.
Generating .rbo files is the recommended way, but macrubyc also allows you to generate a .dylib based on multiple .rb files. It's however a bit more complicated to get right, as relative paths must be used instead of absolute ones during compilation. It's also relatively experimental. It's documented in the man-page, and if you want to give it a try, feel free, and do not hesitate to report problems here. Laurent
On Wed, Oct 6, 2010 at 4:21 AM, Laurent Sansonetti <lsansonetti@apple.com>wrote:
Hi Mario,
Thanks for filing the problem, I will have a look soon.
Thanks, this is a show stopper right now for my Program, as I need a database in which I can store MP3 tag info into, and keep references to where files are for playing. I can't really progress further till I can get this problem out of the way. I would use plist or XML, but there may be hundreds of thousands of songs in the database, and I feel it'd be easier to go through the SQLite route, as it won't have to pre-load every single instance of a song in the database, to find one, there by saving memory, and processor time.
Generating .rbo files is the recommended way, but macrubyc also allows you to generate a .dylib based on multiple .rb files. It's however a bit more complicated to get right, as relative paths must be used instead of absolute ones during compilation. It's also relatively experimental. It's documented in the man-page, and if you want to give it a try, feel free, and do not hesitate to report problems here.
It was just a thought, that I could compile all my .rb files into a single dylib file, and have the executable that XCode generates, link against it, instead of going the .rbo route. I'm still quite new to the whole XCode compiling, and setup, so I'm not exactly sure how to get the Target to link against the dylib I generate, as shown in the man page, where you do the 'macrubyc test.rb code.dylib -o test' Laurent
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-- Mario Steele Lieutenant Commander 3 XO - Geo 99 XO - STO IFT Fleet http://www.trekfederation.com http://geo99.ruby-im.net
On 06.10.2010, at 10:36, Mario Steele wrote:
On Wed, Oct 6, 2010 at 4:21 AM, Laurent Sansonetti <lsansonetti@apple.com>wrote:
Hi Mario,
Thanks for filing the problem, I will have a look soon.
Thanks, this is a show stopper right now for my Program, as I need a database in which I can store MP3 tag info into, and keep references to where files are for playing. I can't really progress further till I can get this problem out of the way. I would use plist or XML, but there may be hundreds of thousands of songs in the database, and I feel it'd be easier to go through the SQLite route, as it won't have to pre-load every single instance of a song in the database, to find one, there by saving memory, and processor time.
Have you thought about using Core Data? It works well in MacRuby and can be used with an SQLite store - although Core Data is more an Object Database then a Relational Database. Alternatively you could use Cocoa Wrappers for SQLite, the most popular ones being PLDatabase (http://pldatabase.googlecode.com/) and fmdb (http://github.com/ccgus/fmdb). None of these options is as slick as Sequel, but they will work. Cheers, toto -- "In ancient times cats were worshipped as gods; they have not forgotten this." – Terry Pratchett
participants (3)
-
Laurent Sansonetti
-
Mario Steele
-
Thomas Kollbach