This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: NullPointerException on android when calling load
- From: Ben Simon <benjisimon at gmail dot com>
- To: Per Bothner <per at bothner dot com>
- Cc: kawa <kawa at sourceware dot org>
- Date: Tue, 18 Nov 2014 00:01:42 -0500
- Subject: Re: NullPointerException on android when calling load
- Authentication-results: sourceware.org; auth=none
- References: <CAEE0d3Ci7bMv5g7-+xKcX-mRRmOvfDAJH2SyC8pG+2dz79s58A at mail dot gmail dot com> <546A48C4 dot 2090303 at bothner dot com>
On Mon, Nov 17, 2014 at 2:13 PM, Per Bothner <per@bothner.com> wrote:
>> ... Basically, it's a REPL, but using
>> a static file instead of being interactive.
>
> Just be aware that we can't create bytecode on-the-fly in Android, so
> load (or eval) has to use the Kawa interpreter, which doesn't have the
> same or full functionality (compare to the compiler), and which gets less
> testing.
Are the limitations outlined somewhere, or is it more trial-and-error?
>> The first step is figuring out why either inherited or inherited[i] is null
> even though numInherited>0.
I dropped in a few System.err.println's and here's what I've learned:
a) numInherited = 0, and inherited[i] == null - just like you suggested
b) I added a println to the InheritingEnvironment constructor and
found that it was getting invoked once:
name = main, parent = null
c) I also confirmed that InheritingEnvironment.addParent is being
called once, and it's being passed null. No great surprise here, as
the constructor for InheritingEnvironment calls addParent.
Where should I look next?
...
> As a matter of fact (require 'android-defs) define a parameter
> current-activity so that (current-activity) returns the current Activity (if
> any).
> At least in the body of on-create and on-create-view.
Ahh yes, I saw that. That's perfect.
-Ben
--
Have an idea for software? I can make it happen -
http://www.ideas2executables.com
My Blog: http://www.BlogByBen.com