From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103229 invoked by alias); 23 May 2017 19:35:23 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 103206 invoked by uid 89); 23 May 2017 19:35:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=adapter, java, sk:android, yours X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 May 2017 19:35:20 +0000 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1dDFaS-0004y5-OC; Tue, 23 May 2017 21:35:20 +0200 Received: from 70-36-239-209.dsl.dynamic.fusionbroadband.com ([70.36.239.209] helo=localhost.localdomain) by mailfront12.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1dDFa5-0004Yn-E2; Tue, 23 May 2017 21:34:57 +0200 Subject: Re: Android problems To: Peter , kawa@sourceware.org References: <8760gy4ikw.fsf@nexoid.at> From: Per Bothner Message-ID: Date: Tue, 23 May 2017 19:35:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <8760gy4ikw.fsf@nexoid.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00082.txt.bz2 I checked in a fix for the following. (Only into the master branch; I can cherry-pick it into the kawa-2.4 branch if requested.) I also checked in a testcase dericed from yours, but not Android-dependent. It 'stestsuite/nesting-1.scm. On 05/18/2017 02:31 AM, Peter wrote: > 2) In the following code, I get a kawa segfault. It seems to be related > to the anonymous inner class, if I factor that out, things work fine. > > (define-simple-class test () > ((onCreate (savedInstanceState :: )):: void > (invoke-special (this) 'onCreate savedInstanceState) > (let* ((self (this))) > (let* ((adpt (object () > ((*init*) > (invoke-special (this) '*init* self (static-field android.R$layout 'simple_list_item_1))) > ((getView (position :: int) (convert-view :: android.view.View) (parent :: android.view.ViewGroup)) :: android.view.View > #!null))) > (lv ( self adapter: adpt))) > (setContentView lv))))) > >> make -k > CLASSPATH=kawa.jar:/opt/android-sdk/platforms/android-14/android.jar java kawa.repl -d bin/classes -P test. --module-static-run --warn-undefined-variable --warn-unknown-member --warn-invoke-unknown-method -C foo.scm > (compiling foo.scm to test.foo) > foo.scm:6: internal error while compiling foo.scm > java.lang.NullPointerException > at gnu.bytecode.Scope.getVariable(Scope.java:105) -- --Per Bothner per@bothner.com http://per.bothner.com/