Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Solved - curious Catalyst/DBIx:Class bug

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


tjc at wintrmute

May 11, 2008, 10:26 PM

Post #1 of 1 (143 views)
Permalink
Solved - curious Catalyst/DBIx:Class bug

Found and solved an interesting little bug in someone else's application today.

Their unit tests ran fine, but the application itself always died instantly,
with an error from Class::C3::XS.. so they thought the bug was in DBIx::Class,
or rather their use of it, and we spent a lot of time hunting around there..
and it was really annoying me that we just couldn't reproduce the problem
in unit tests though.. just on an actual apache-based server.

Eventually, hit upon the server's startup.pl.. Turns out that inside it was
a (global) $SIG{__DIE__} handler.. Aargh!

They were using this to try and catch fatal errors in their applications..
Except of course these handlers are completely broken and get called by deaths
in eval{} blocks, thus preventing ANY eval{} code from working.. including the
ones in DBIx::Class and Catalyst. *rolls eyes*

I can't believe their major application has NOT hit this problem before!
I just thought I'd mention it, in case anyone else has to debug something where
cat/dbic is mysteriously dieing - grep for __DIE__!

Cheers,
Toby

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.