zero9178 / C-Cpp-Coverage-for-CLion

Get coverage data in CLion using gcov or llvm-cov
MIT License
38 stars 2 forks source link

java.lang.NumberFormatException: For input string: "" #2

Closed stanislaw closed 5 years ago

stanislaw commented 5 years ago

Upgraded to CLion 2018.3.2 and using the latest 1.1.2 release of GCoverage4CLion:

java.lang.NumberFormatException: For input string: ""
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:592)
    at java.lang.Integer.parseInt(Integer.java:615)
    at gcov.state.GCovSettings.setVersion(GCovSettings.kt:94)
    at gcov.state.GCovSettings.setGcovPath(GCovSettings.kt:18)
    at gcov.state.GCovSettings.handleEmptyPath(GCovSettings.kt:61)
    at gcov.state.GCovSettings.<init>(GCovSettings.kt:23)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:85)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:62)
    at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:45)
    at com.intellij.openapi.components.impl.ServiceManagerImpl$MyComponentAdapter.getComponentInstance(ServiceManagerImpl.java:210)
    at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:246)
    at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:213)
    at com.intellij.openapi.components.ServiceManager.doGetService(ServiceManager.java:52)
    at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:30)
    at gcov.state.GCovSettings$Companion.getInstance(GCovSettings.kt:99)
    at gcov.data.CoverageThread.generateGCDA(CoverageThread.kt:34)
    at gcov.data.CoverageThread.run(CoverageThread.kt:152)
zero9178 commented 5 years ago

Seems like something went wrong at fetching the version number of gcov. Will investigate

aheadlead commented 5 years ago

same problem here macOS 10.13.6, Apple LLVM version 9.1.0 (clang-902.0.39.2)

$ gcov -version Apple LLVM version 9.1.0 (clang-902.0.39.2) Optimized build. Default target: x86_64-apple-darwin17.7.0 Host CPU: skylake


It works well on my Linux box with Ubuntu 16.04. $ gcov --version gcov (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

zero9178 commented 5 years ago

Just pushed a new release that should fix this issue