in reply to Re^11: Class::DBI::AbstractSearch and SpeedyCGI
in thread Class::DBI::AbstractSearch and SpeedyCGI

I don't see anything in this code that would explain it. I think you should try putting in some warn statements to show the value of wantarray() inside those subs, and then use the debugger to figure out exactly where that array ref changes.
  • Comment on Re^12: Class::DBI::AbstractSearch and SpeedyCGI

Replies are listed 'Best First'.
Re^13: weird Class::DBI::AbstractSearch problem
by zigdon (Deacon) on Oct 12, 2005 at 03:19 UTC
    This is still driving me crazy. That one script stopped breaking (I couldn't tell you why), and another started. It (currently) breaks consistantly when I try to run it:
    $ perl ./hist2rss.pl hist2rss.pl: Attempt to free unreferenced scalar: SV 0x87edcb4 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x87e55bc at /hom +e/user/lib/modules/Class/DBI.pm line 1127. <h1>Software error:</h1> <pre>MyApp::Sets can't SELECT id, id, setnumber, setrev, name, theme, +year, pcs, figs, picture, msrp, instructions, inventory FROM SETS WHERE ( ID = ? ) : Not an ARRAY reference at /home/user/lib/modules/Class/DBI.pm line 1 +126. at /home/user/lib/modules/Class/DBI/AbstractSearch.pm line 32
    Ok, great, I say - I'll run it under the debugger, awesome. Well, not so much - I'm running it in the debugger, and just telling it to continue:
    $ perl -d ./hist2rss.pl Loading DB routines from perl5db.pl version 1.23 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(./hist2rss.pl:15): my $db = new MyApp::DB; DB<1> c hist2rss.pl: Attempt to free unreferenced scalar: SV 0x88044c0 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c47508 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c62818 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c62174 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c629f8 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c62b00 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c650d8 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c65294 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c65c6c at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c66c24 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. hist2rss.pl: Attempt to free unreferenced scalar: SV 0x8c65ec4 at /hom +e/user/lib/modules/Class/DBI.pm line 1127. Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. DB<1> exit
    And it just completes it's run without any error. What's the deal? Why would it NOT break under the debugger, without me doing anything?

    -- zigdon

      There sometimes are bugs that don't show up when run under the debugger. These are very rare, and are a side-effect of the way the debugger instruments the code.

      However, what's all this unreferenced scalar junk? This is making me think you have something wrong at a deeper level, and should consider recompiling your perl and DBI/DBD modules.

        I just saw your reply, but as it turns out, you were right. I think the DBI was compiled again 5.8.0 (which is apparently bad news). Recompiled against 5.8.3, and everything just suddenly worked. Thanks for holding my hand with this!

        -- zigdon