LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2014, 11:26 AM   #1
FrancisG
LQ Newbie
 
Registered: Aug 2010
Location: West Cork, Ireland
Posts: 16

Rep: Reputation: 0
[SOLVED] Eclipse with EPIC causing Segmentation fault running a simple Perl script


I am running Arch Linux using Xfce desktop.
I have tried the following script in Eclipse Keplar and Lunar with EPIC 0.5 and 0.6, but the same result.

Code:
#!/usr/bin/perl
use strict;
use warnings;
use DateTime;
DateTime->DefaultLocale("UTC");
my $dt0 = DateTime->now();
my $dateHour = $dt0->hour();
print $dateHour;
print "End\n";
If I run it in a terminal I just get a message 'Segmentation Fault'
If I comment out the DateTime lines, then it prints 'End' correctly

If I try and run it in the Debugger with DateTime lines commented out I get an error message:

An internal error occurred during: "Launching Test.pl".
java.lang.NullPointerException

and the log shows:

Code:
!SESSION 2014-08-12 16:10:14.453 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.core.jobs 4 2 2014-08-12 16:11:50.113
!MESSAGE An internal error occurred during: "child count update".
!STACK 0
java.lang.NullPointerException
	at org.epic.debug.db.StackFrame.readTopFrameVars(StackFrame.java:397)
	at org.epic.debug.db.StackFrame.getVariables(StackFrame.java:226)
	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:53)
I have updated all my Perl modules (yes the DateTime module is installed!)
I have not been able to find any useful info on the EPIC forum or by searching the web.
Any ideas?

Last edited by FrancisG; 08-13-2014 at 02:05 AM. Reason: Problem solved
 
Old 08-12-2014, 01:15 PM   #2
FrancisG
LQ Newbie
 
Registered: Aug 2010
Location: West Cork, Ireland
Posts: 16

Original Poster
Rep: Reputation: 0
Probably a Path Issue

In answer to myself I think it is probably a Path Issue of some sort.
If I try this script:

Code:
#!/usr/bin/perl
use strict;
use warnings;
print "Check PadWalker Version";
require PadWalker;
print eval { PadWalker->VERSION};
I get 'Segmentation fault', so it is not finding any of the modules.
I have tried adding these paths to the project

Code:
/usr/lib/perl5/site_perl
/usr/share/perl5/site_perl
/usr/lib/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib/perl5/core_perl
/usr/share/perl5/core_perl
and
Code:
$PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
$PERL5LIB=/usr/lib/perl5/site_perl:/usr/share/perl5/site_perl:/usr/lib/perl5/vendor_perl:/usr/share/perl5/vendor_perl:/usr/lib/perl5/core_perl:/usr/share/perl5/core_perl
I have installed perl-padwalker and perl-datetime and still no good. The PadWalker.pm is in /usr/lib/perl5/vendor_perl and /usr/lib/perl5/site_perl so they are definately in the path.
Very odd.
 
Old 08-13-2014, 02:08 AM   #3
FrancisG
LQ Newbie
 
Registered: Aug 2010
Location: West Cork, Ireland
Posts: 16

Original Poster
Rep: Reputation: 0
[SOLVED] Eclipse with EPIC causing Segmentation fault running a simple Perl script

It turned out to be a CPAN problem in the end.
I cleared the .cpan folder
reran the cpan configuration
then ran the command in the cpan environment
Code:
recompile
as suggested by Perl Monks for another Segmentation fault problem
and everything works perfectly again.
Phew!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsprintf causing segmentation fault knobby67 Programming 5 01-08-2011 11:11 AM
LXer: Installing Eclipse, the Epic Perl plugin and my first Perl GUI program LXer Syndicated Linux News 0 05-08-2009 06:41 PM
simple c code but whenever running getting segmentation fault with getch() invincible.rish Linux - General 1 01-26-2007 06:55 AM
LXer: Eclipse CruiseControl and EPIC Perl debugs LXer Syndicated Linux News 0 02-15-2006 07:01 AM
su causing segmentation fault winword10 Linux - General 10 12-24-2004 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration