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

Pitest 1.4.3 throws IllegalArgumentException #521

Open
andrewbwogi opened this issue Sep 30, 2018 · 3 comments
Open

Pitest 1.4.3 throws IllegalArgumentException #521

andrewbwogi opened this issue Sep 30, 2018 · 3 comments

Comments

@andrewbwogi
Copy link

Hello, I'm getting the following error when running Pitest 1.4.3 on the DSpot test project in Arch Linux 4.18.6 with Java 8:

Caused by: java.lang.IllegalArgumentException: Illegal base64 character 3c
    at java.util.Base64$Decoder.decode0 (Base64.java:714)
    at java.util.Base64$Decoder.decode (Base64.java:526)
    at java.util.Base64$Decoder.decode (Base64.java:549)
    at org.pitest.mutationtest.incremental.ObjectOutputStreamHistoryStore.deserialize (ObjectOutputStreamHistoryStore.java:126)
    at org.pitest.mutationtest.incremental.ObjectOutputStreamHistoryStore.restoreClassPath (ObjectOutputStreamHistoryStore.java:114)
    at org.pitest.mutationtest.incremental.ObjectOutputStreamHistoryStore.initialize (ObjectOutputStreamHistoryStore.java:86)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport (MutationCoverage.java:132)
    at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:120)
    at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:50)
    at org.pitest.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
    at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:455)
    at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:396)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

The same error is encountered when using Pitest 1.4.0. However, Pitest 1.3.2 runs on the same project and in the same environment without errors. I used the following command when running Pitest on the compiled test project:

mvn org.pitest:pitest-maven:1.4.3:mutationCoverage -DwithHistory -DtargetClasses=example.* 
-DreportsDirectory=target/pit-reports -DoutputFormats=CSV,HTML -DtimeoutConst=10000 
-DjvmArgs=16G -DtargetTests=example.TestSuiteExample2,example.TestSuiteExample  -X

Complete execution trace: pitest-execution-trace.txt

@hcoles
Copy link
Owner

hcoles commented Sep 30, 2018

This looks to be an issue with the history file. As noted in the release notes the format was intentionally changed in 1.3.2 and old history files needed to be deleted when upgrading.

As things are working for you in 1.3.2 it sounds like at some point between 1.3.2 and 1.4.0 we have unintentionally changed the format of the file again. Unfortunately this can happen easily as it is now based on serilialization.

Regardless of the cause deleting the history file should fix the issue.

@keetron
Copy link

keetron commented Nov 27, 2018

I just ran into this issue myself, deleting pitHistory.txt from the build folder indeed resolved the issue.

@kjetiljd
Copy link

kjetiljd commented Mar 21, 2019

I lost half an hour of my life to this ;-) Perhaps an unparsable history-file could be disregarded and deleted – perhaps with a tiny info message?

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

No branches or pull requests

4 participants