Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get "Duplicate method name&signature" on recompile only #5938

Closed
scabug opened this issue Jun 17, 2012 · 14 comments
Closed

Get "Duplicate method name&signature" on recompile only #5938

scabug opened this issue Jun 17, 2012 · 14 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Jun 17, 2012

The attached program (bug.scala) compiles and runs correctly when initially built. However, if I trivially modify the source file via the editor or 'touch' and then recompile, the JVM fails with a "Duplicate method name&signature" exception.

Specifically:

$ fsc -shutdown; fsc -max-idle 0
[Compile server exited]
[...elided...]
Disabling idle timeout on compile server.
$ scala ca.blit.bug.W
$ touch bug.scala
$ fsc bug.scala
$ scala ca.blit.bug.W
Exception in thread "main" java.lang.ClassFormatError: Duplicate method name&signature in class file ca/blit/bug/W
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
[...]

Restarting the compile server between builds seems to be sufficient to produce correct output; you don't need to delete the existing class files.

Downgrading to Scala 2.9.1-1 fixed the problem.

@scabug
Copy link
Author

scabug commented Jun 17, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5938?orig=1
Reporter: Chris Reuter (suetanvil)
Affected Versions: 2.9.2
Attachments:

  • bug.scala (created on Jun 17, 2012 5:37:33 PM UTC, 278 bytes)

@scabug
Copy link
Author

scabug commented Jun 18, 2012

@jsuereth said:
This needs to go through triage.

@scabug
Copy link
Author

scabug commented Jul 3, 2012

@adriaanm said:
reproduced on 2.10.0-M4

@scabug
Copy link
Author

scabug commented Jul 3, 2012

@adriaanm said:
Greg, could you please have a look what might have happened between 2.9.1-1 and 2.9.2 that caused this regression?

@scabug
Copy link
Author

scabug commented Jul 3, 2012

@gkossakowski said:
I'm not an expert on fsc but I'll have a look tomorrow.

@scabug
Copy link
Author

scabug commented Sep 28, 2012

Dustin Carlino (dabreegster) said:
I'm still observing this in 2.10.0-20120924-042318-ffaa3cb89e, one of the nightly builds. Any news on this?

@scabug
Copy link
Author

scabug commented Nov 7, 2012

hkoehler said:
I experienced the same problem (different code but also a swing app) with fsc on scala 2.9.2. Downgrading to 2.9.1 or 2.9.0 didn't fix it, but it compiled fine under 2.8.2.

@scabug
Copy link
Author

scabug commented May 7, 2013

Ryan Hendrickson (ryan.hendrickson_bwater) said:
Appears to still be unfixed in nightly 2.11.0-20130503-022659-6eb33d4ad1. Any news?

@scabug
Copy link
Author

scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

@scabug
Copy link
Author

scabug commented Feb 10, 2014

@adriaanm said:
Since 2.11.0-RC1 is one week away, pushing all non-blockers without PR to 2.11.1-RC1. Please undo the change if I missed work in progress.

@scabug
Copy link
Author

scabug commented Aug 5, 2014

@gkossakowski said:
The 2.11.2 is out so I'm rescheduling the issue for 2.11.3.

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@retronym said:
Updating fix-by version to 2.11.5.

@scabug
Copy link
Author

scabug commented Nov 6, 2014

@retronym said (edited on Nov 6, 2014 8:31:12 AM UTC):
This is fixed already in 2.11.5-SNAPSHOT, presumably by scala/scala#4040. I'll submit a test case before closing this ticket.

@scabug
Copy link
Author

scabug commented Nov 7, 2014

@retronym said:
scala/scala#4103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants