Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F01CD200CED for ; Fri, 18 Aug 2017 09:30:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EE90F16C6BD; Fri, 18 Aug 2017 07:30:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3FFAB16C6BA for ; Fri, 18 Aug 2017 09:30:06 +0200 (CEST) Received: (qmail 91827 invoked by uid 500); 18 Aug 2017 07:30:05 -0000 Mailing-List: contact notifications-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list notifications@groovy.apache.org Received: (qmail 91818 invoked by uid 99); 18 Aug 2017 07:30:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Aug 2017 07:30:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1E434C05D5 for ; Fri, 18 Aug 2017 07:30:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id d_hwOr6KTgGK for ; Fri, 18 Aug 2017 07:30:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A1DC55FDA1 for ; Fri, 18 Aug 2017 07:30:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E1840E0288 for ; Fri, 18 Aug 2017 07:30:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1CE0F2538B for ; Fri, 18 Aug 2017 07:30:01 +0000 (UTC) Date: Fri, 18 Aug 2017 07:30:01 +0000 (UTC) From: "Jochen Theodorou (JIRA)" To: notifications@groovy.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GROOVY-8289) STC and default value in ctor is causing debugging error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 18 Aug 2017 07:30:07 -0000 [ https://issues.apache.org/jira/browse/GROOVY-8289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16131851#comment-16131851 ] Jochen Theodorou commented on GROOVY-8289: ------------------------------------------ If that is satisfying the debugger then job well done. pullrequest? > STC and default value in ctor is causing debugging error > -------------------------------------------------------- > > Key: GROOVY-8289 > URL: https://issues.apache.org/jira/browse/GROOVY-8289 > Project: Groovy > Issue Type: Bug > Components: bytecode > Affects Versions: 2.4.12 > Reporter: Eric Milles > Attachments: C1.txt, C2.txt, C3.txt > > > When debugging in the IDE, there is a curious behavior where it looks like step requests are not being respected. One thing I have found is that JDWP requests to the JVM process are failing to resolve the variable "this" in certain cases. I need some help from someone who knows the bytecode better than myself to figure out where the problem lies. > Original issue: https://github.com/groovy/groovy-eclipse/issues/312 > I have narrowed it down to a small bit of code with static compilation enabled. > {code} > @groovy.transform.CompileStatic > class C { > String string > C(String s = null) { string = s } > static void main(args) { > def c = new C('') // put breakpoint on this line, run as Java app, and step > println c > } > } > {code} > Debug stepping fails when executing the constructor for C. If I use {{new C(string:'')}}, the generated default constructor is used instead and debugging works fine. So I think it has something to do with the one-arg constructor's bytecode. > I dumped the class file using javap and have attached them. {{C1.txt}} is for the code above. {{C2.txt}} is the above with the named args constructor used instead. I'm not sure if the local args table for the single-argument constructor is bad and that is why "this" cannot be resolved. > There are several similar bugs reported for other tools and whatnots when looking for "JDWP error code 35". Hopefully, these help point to something in the bytecode that can be corrected. > http://bugs.java.com/bugdatabase/view_bug.do?bug_id=5005668 > https://bugs.openjdk.java.net/browse/JDK-4992932 -- This message was sent by Atlassian JIRA (v6.4.14#64029)