Subject: | $dt->set_time_zone breaks EPIC Debugger |
Date: | Mon, 30 Jul 2012 11:09:57 -0500 |
To: | bug-DateTime [...] rt.cpan.org |
From: | Luis Alejandro Castillo <alphavax [...] gmail.com> |
Hello,
I'm having problems while debugging my program using the following
configuration:
* Windows 7 64 bits
* ActivePerl v5.14.2 for MSWin32-x64-multi-thread
* Eclipse SDK Version: 4.2.0 Build id:
I20120608-1400
* EPIC - Eclipse Perl Integration Version: 0.6.44
* PadWalker Perl Module Version: 1.94
* DateTime Perl Module Version: 0.76
* DateTime-TimeZone Version: 1.46
I'm able to see and trace my variables until I use the DateTime Perl Module:
sub gensqlscript
{
use DateTime;
my $dt = DateTime->now;
$dt->set_time_zone( 'America/Chicago' );
print OUT "/****** Object: StoredProcedure
[dbo].[$sp_hash{$x}{'Nombre'}] Script Date: ".$dt->mdy('/')."
".$dt->hms." ******/\n";
.
.
.
}
After executing the $dt->set_time_zone( 'America/Chicago' ); line the
debbuger stops working and shows this message in Eclipse's Variable view:
"An error occurred while dumping array content; contents of the Variables
view may become invalid".
The log file of Eclipse shows this error:
SESSION 2012-07-30 10:29:40.675
-----------------------------------------------
eclipse.buildId=I20120608-1400
java.version=1.7.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86_64
!ENTRY org.epic.debug 4 0 2012-07-30 10:33:16.737
!MESSAGE Debug Error
!STACK 0
java.lang.NumberFormatException: For input string: "Use of uninitialized
value in sprintf at C:/Perl64/site/lib/DateTime.pm line 766, <STDIN> line 1.
at C:/Perl64/site/lib/DateTime.pm line 766, <STDIN> line 1.
DateTime::ymd('DateTime=HASH(0x49f85a0)', '-') called at
C:/Perl64/site/lib/DateTime.pm line 861
DateTime::iso8601('DateTime=HASH(0x49f85a0)') called at
C:/Perl64/site/lib/DateTime.pm line 842
DateTime::_stringify('DateTime=HASH(0x49f85a0)', undef, '') called at
C:/Users/lcastillo/workspace/.metadata/.plugins/org.epic.debug/
dumpvar_epic.pm line 177
dumpvar_epic::_dump_entity('local_start_datetime', 'REF(0x49f5fa8)') called
at C:/Users/lcastillo/workspace/.metadata/.plugins/org.epic.debug/
dumpvar_epic.pm line 208
dumpvar_epic::_dump_keys('DateTime::TimeZone::OlsonDB::Observance=HASH(0x4b4fea0)',
1) called at C:/Users/lcastillo/workspace/.metadata/.plugins/org.epic.debug/
dumpvar_epic.pm line 56
dumpvar_epic::dump_hash('DateTime::TimeZone::OlsonDB::Observance=HASH(0x4b4fea0)')
called at C:/Users/lcastillo/workspace/.metadata/.plugins/org.epic.debug/
dumpvar_epic.pm line 73
dumpvar_epic::dump_hash_expr(0, '${$h->{\'$last_observance\'}}\x{a}')
called at (eval
10695)[C:/Users/lcastillo/workspace/.metadata/.plugins/org.epic.debug/
perl5db.pl:640] line 13
eval '\';
my $subref = \\&dumpvar_epic::dump_hash_expr;
my $savout = select($DB::OUT);
my $savbuf = $"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.epic.debug.db.DumpedEntityReader.token(DumpedEntityReader.java:48)
at
org.epic.debug.db.DumpedEntityReader.nextEntity(DumpedEntityReader.java:37)
at org.epic.debug.db.HashValue.parseHashContent(HashValue.java:49)
at org.epic.debug.db.HashValue.<init>(HashValue.java:25)
at org.epic.debug.db.PerlVariable.getValue(PerlVariable.java:118)
at org.epic.debug.db.StackFrame.rememberVariables(StackFrame.java:386)
at org.epic.debug.db.StackFrame.getVariables(StackFrame.java:193)
at
org.eclipse.debug.internal.ui.model.elements.StackFrameContentProvider.getAllChildren(StackFrameContentProvider.java:51)
at
org.eclipse.debug.internal.ui.model.elements.StackFrameContentProvider.getChildCount(StackFrameContentProvider.java:28)
at
org.eclipse.debug.internal.ui.model.elements.ElementContentProvider.retrieveChildCount(ElementContentProvider.java:114)
at
org.eclipse.debug.internal.ui.model.elements.ElementContentProvider$2.run(ElementContentProvider.java:63)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
What I'm doing wrong?
Is it valid to call $dt = DateTime->now; and then $dt->set_time_zone(
'America/Chicago' ); same error happens if I use the following :
use DateTime;
my $dt = DateTime->now( time_zone => 'America/Chicago' );
I "Solved" this problem with the debugger temporarily using
use DateTime;
my $dt = DateTime->now( time_zone => 'floating' );
Show quoted text
________________________________
Luis A. Castillo Pacheco