[Swift-devel] Re: [Swift-user] Error using programs in swift
Michael Wilde
wilde at mcs.anl.gov
Mon Feb 15 22:32:27 CST 2010
The Ex098 error followed by an NPE can be reproduced with this simple program:
app f(int j)
{
echo @j;
}
f(99);
- Mike
----- wilde at mcs.anl.gov wrote:
> Mark, the problem looks to me like Swift is not handing the following
> programming error correctly.
>
> In the line:
>
> subpeaks @file1 @file2 @max_dist stdout=@output;
>
> you dont want to put the @ on the int max_dist.
>
> Remember, @ is shorthand for the @filename(), and you can't apply that
> to an int.
>
> I *think* Swift should generate a compile-time type violation, but
> thats perhaps not do-able at the moment for @func() primitives, which
> have some type flexibility.
>
> So the short answer is: take off the @ on max_dist. When you list a
> scalar variable in an app() command-line prototype, the scalar's value
> is placed on the command line.
>
> - Mike
>
>
>
> ----- "Mark Maienschein-Cline" <mmaiensc at uchicago.edu> wrote:
>
> > Hi,
> > Here is the log file and the Swift script for the java
> > NullPointerError I have been getting. Le me know if you also need
> the
> >
> > code for the application. I am running swift locally on the cluster
>
> > sisboombah.uchicago.edu.
> > Thanks,
> > Mark
> >
> >
> >
> >
> >
> > On Feb 12, 2010, at 5:47 PM, Michael Wilde wrote:
> >
> > > Mark, a null ptr exception is always an internal Swift error
> > > triggered by some problem in Java.
> > >
> > > Please send to swift-devel#ci.uchicago.edu the Swift script and
> the
> >
> > > Swift log file from the run (the one called some-long-name.log) -
>
> > > or tell us where we can find it on the CI network.
> > >
> > > Thanks,
> > >
> > > Mike
> > >
> > >
> > > ----- "Mark Maienschein-Cline" <mmaiensc at uchicago.edu> wrote:
> > >
> > >> Hi,
> > >>
> > >> I'm getting a "java.lang.NullPointerException" error when I call
> > some
> > >> of my programs (written in C) in Swift (in the local mode). The
> > >> programs work correctly when I run them from the command line,
> and
> > I
> > >> don't think there is any error in the parameters swift is
> passing
> > to
> > >> the program. Does anyone know what problems can cause this kind
> of
> > >> error?
> > >>
> > >> Thanks,
> > >> Mark_______________________________________________
> > >> Swift-user mailing list
> > >> Swift-user at ci.uchicago.edu
> > >> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
More information about the Swift-devel
mailing list