Skip Menu |

This queue is for tickets about the DBM-Deep CPAN distribution.

Report information
The Basics
Id: 42129
Status: resolved
Priority: 0/
Queue: DBM-Deep

People
Owner: Nobody in particular
Requestors: dusty [...] hey.nu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.0014
Fixed in: (no value)



Subject: Can't locate object method "staleness" (used with IPC::PubSub in Win32 via ActivePerl/ActiveState PDK)
I get this error at some random time after I have been using IPC::PubSub with DBM::Deep: Can't locate object method "staleness" via package "DBM::Deep::Engine::Sector::Scalar" at DBM/Deep/Engine.pm Line 130 This link shows the same error in their testing: http://ppm4.activestate.com/MSWin32-x86/5.8/818/R/RK/RKINYON/Presto-0.01.d/log-20081103T073721.txt I'm using ActiveState PDK to create a distributable EXE file for Windows. This error occurred on Windows XP Professional. I'm not doing anything fancy with the code or using "not recommended to be used" API functions as listed in the IPC::PubSub POD. This error happens in both files, but not at the same time. There are no other files using this DBM::Deep db file. Here is a snippet of the code: ***** In FILE1.pl: (distributed as a tooltray app using PDK PerlTray) use IPC::PubSub; use IPC::PubSub::Cache::DBM_Deep; # necessary for PDK use Data::Dumper; my $bus = IPC::PubSub->new(DBM_Deep => $ENV{TEMP}.'/mytest-ipc.db'); my $bussub = $bus->new_subscriber('user-client'); my $buspub = $bus->new_publisher('service-client'); .. snip .. my @msg = $bussub->get; foreach my $message (@msg) { print Dumper($message); $buspub->msg("clienttray: received action: ".$message->{action}); } ***** In FILE2.pl: (distributed as a console app using PDK PerlApp) use IPC::PubSub; use IPC::PubSub::Cache::DBM_Deep; # necessary for PDK my $bus = IPC::PubSub->new(DBM_Deep => $ENV{TEMP}.'/mytest-ipc.db'); my $bussub = $bus->new_subscriber('service-client'); my $buspub = $bus->new_publisher('user-client'); while (1) { print ".\n"; my @msg = $bussub->get; foreach my $message (@msg) { print ">> $message\n" if $message; } if (int(rand() * 10) == 5) { $buspub->msg({ action => 'notify', title => 'Notification: '.localtime, message => 'This is just a test.', icon => 'info', timeout => 5, }); print "*\n"; } sleep(1); }
On Sun Jan 04 06:27:08 2009, WILSOND wrote: Show quoted text
> I get this error at some random time after I have been using > IPC::PubSub > with DBM::Deep: > > Can't locate object method "staleness" via package > "DBM::Deep::Engine::Sector::Scalar" at DBM/Deep/Engine.pm Line 130
This is a case where multiple database accesses need to be atomic, and there is no way DBM::Deep can know this. I’ve added a caveat to the docs (see <http://github.com/robkinyon/dbm-deep/commit/065e75f>), and submitted a patch for IPC::PubSub (see <https://rt.cpan.org/Ticket/Display.html?id=54168>).