Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$dt->set_time_zone breaks EPIC Debugger #41

Closed
autarch opened this issue Nov 12, 2016 · 1 comment
Closed

$dt->set_time_zone breaks EPIC Debugger #41

autarch opened this issue Nov 12, 2016 · 1 comment
Labels

Comments

@autarch
Copy link
Member

autarch commented Nov 12, 2016

Migrated from rt.cpan.org #78670 (status was 'stalled')

Requestors:

From alphavax@gmail.com on 2012-07-30 16:10:13:

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, line 1.
at C:/Perl64/site/lib/DateTime.pm line 766, 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.(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' );



________________________________
Luis A. Castillo Pacheco

@autarch
Copy link
Member Author

autarch commented Nov 12, 2016

From autarch@urth.org (@autarch) on 2012-07-31 01:00:09:

On Mon, 30 Jul 2012, Luis Alejandro Castillo via RT wrote:

  • 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, line 1.
at C:/Perl64/site/lib/DateTime.pm line 766, line 1.

There's a lot going on here and I'm not sure what the problem is. It could
be in your code, it could be in DateTime, it could be something in the
environment.

I honestly have no idea what the problem is. I've never used Eclipse or
EPIC.

-dave

/============================================================
http://VegGuide.org http://blog.urth.org
Your guide to all that's veg House Absolute(ly Pointless)
============================================================
/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant