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

Java exception when loading CLion #107

Open
jurnix opened this issue Aug 29, 2023 · 0 comments
Open

Java exception when loading CLion #107

jurnix opened this issue Aug 29, 2023 · 0 comments

Comments

@jurnix
Copy link

jurnix commented Aug 29, 2023

Error raised when CLion was loaded. Run on Ubuntu 22.04.

About info:

CLion 2023.2.1
Build #CL-232.9559.58, built on August 22, 2023
Licensed to albert jornet puig
You have a perpetual fallback license for this version.
Subscription is active until December 8, 2024.
Runtime version: 17.0.8+7-b1000.8 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.19.0-32-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 3984M
Cores: 16
Registry:
    run.processes.with.pty=TRUE
    ide.experimental.ui=true
    debugger.attach.dialog.enabled=true

Non-Bundled Plugins:
    com.nasller.CodeGlancePro (1.7.4)
    com.compilerexplorer.compilerexplorer (2.7)
    org.jetbrains.fortran (2023.2.2)
    net.seesharpsoft.intellij.plugins.csv (3.2.1-232)
    mobi.hsz.idea.gitignore (4.5.1)

Current Desktop: ubuntu:GNOME

Stacktrace:

Outdated stub in index: .../mo_dfire_sf_emissions_class.f90 indexing timestamp = 1693237389584, binary = false, byte size = 5184, char size = 5198, doc=DocumentImpl[.../mo_dfire_sf_emissions_class.f90], docSaved=true, wasIndexedAlready=true, queried at 1693237389584
doc length=5184
file length=5184
cached PSI class org.jetbrains.fortran.lang.psi.FortranFile
projects with file: 1
physical file exists; length = 5184
   
   java.lang.Exception
	at com.intellij.psi.stubs.StubTreeLoaderImpl.diagnoseLengthMismatch(StubTreeLoaderImpl.java:189)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.checkLengthMatch(StubTreeLoaderImpl.java:155)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readFromVFile(StubTreeLoaderImpl.java:122)
	at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:48)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:624)
	at com.intellij.psi.impl.source.PsiFileImpl.getStub(PsiFileImpl.java:589)
	at org.jetbrains.fortran.lang.psi.FortranFile$programUnits$1.invoke(FortranFile.kt:16)
	at org.jetbrains.fortran.lang.psi.FortranFile$programUnits$1.invoke(FortranFile.kt:15)
	at com.intellij.openapi.application.ActionsKt.runReadAction$lambda$3(actions.kt:31)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
	at com.intellij.openapi.application.ActionsKt.runReadAction(actions.kt:31)
	at org.jetbrains.fortran.lang.psi.FortranFile.getProgramUnits(FortranFile.kt:15)
	at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.programUnitsFromFile(FortranPathReferenceImpl.kt:314)
	at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveInProjectFiles(FortranPathReferenceImpl.kt:218)
	at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveName(FortranPathReferenceImpl.kt:164)
	at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveWithoutFiltering(FortranPathReferenceImpl.kt:59)
	at org.jetbrains.fortran.lang.resolve.FortranPathReferenceImpl.resolveInner(FortranPathReferenceImpl.kt:23)
	at org.jetbrains.fortran.lang.resolve.FortranReferenceBase.multiResolve$lambda$0(FortranReferenceBase.kt:24)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$1(ResolveCache.java:159)
	at com.intellij.openapi.util.Computable.get(Computable.java:16)
	at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:234)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:110)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:212)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:158)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:145)
	at org.jetbrains.fortran.lang.resolve.FortranReferenceBase.multiResolve(FortranReferenceBase.kt:23)
	at com.intellij.psi.PsiPolyVariantReferenceBase.resolve(PsiPolyVariantReferenceBase.java:47)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:176)
	at com.intellij.codeInsight.TargetElementUtilBase.doGetReferenceOrReferencedElement(TargetElementUtilBase.java:164)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferenceOrReferencedElement(TargetElementUtilBase.java:209)
	at com.intellij.codeInsight.TargetElementUtilBase.getReferencedElement(TargetElementUtilBase.java:253)
	at com.intellij.codeInsight.TargetElementUtilBase.doFindTargetElement(TargetElementUtilBase.java:232)
	at com.intellij.codeInsight.TargetElementUtilBase.findTargetElement(TargetElementUtilBase.java:297)
	at com.intellij.codeInsight.TargetElementUtil.findTargetElement(TargetElementUtil.java:147)
	at com.jetbrains.cidr.lang.psi.impl.OCTargetElementUtil.findTargetElement(OCTargetElementUtil.java:47)
	at com.intellij.model.psi.impl.TargetsKt.fromTargetEvaluator(targets.kt:175)
	at com.intellij.model.psi.impl.TargetsKt.declarationsOrReferences(targets.kt:136)
	at com.intellij.model.psi.impl.TargetsKt.declaredReferencedData(targets.kt:42)
	at com.intellij.model.psi.impl.TargetsKt.targetSymbols(targets.kt:24)
	at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.getTargetSymbols(IdentifierHighlighterPass.java:216)
	at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:208)
	at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:97)
	at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$5(BackgroundHighlighter.java:219)
	at com.intellij.codeInsight.daemon.impl.HighlightingSessionImpl.runInsideHighlightingSession(HighlightingSessionImpl.java:157)
	at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$6(BackgroundHighlighter.java:217)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
	at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$7(BackgroundHighlighter.java:214)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:832)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:864)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:602)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:565)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:565)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

File:

!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!>
!> 
!>
!>
!>
!>
!>
MODULE mo_dfire_sf_emissions_class
#ifndef __NO_JSBACH__

#include "dsl_jsbach.inc"

  USE mo_kind,                ONLY: wp
  USE mo_jsb_control,         ONLY: debug_on
  USE mo_exception,           ONLY: message

  USE mo_dfire_sf_fconsump_dead_class, ONLY: t_sf_fc_dead
  USE mo_dfire_sf_fconsump_live_class, ONLY: t_sf_fc_live
  USE mo_dfire_sf_adaptor,             ONLY: t_sf_adaptor

  IMPLICIT NONE

  PRIVATE
  PUBLIC :: t_sf_emissions

  CHARACTER(len=*), PARAMETER :: modname = 'mo_dfire_sf_emissions_class'

  TYPE :: t_sf_emissions
    INTEGER :: nc
    INTEGER :: nspecs  !< total number of emission factors [-]
    INTEGER :: nfclass !< total number of fuel classes [-]

    REAL(wp), allocatable           :: emission_factors(:) !< emission factors
    REAL(wp), allocatable           :: emissions(:,:) !< emissions [g X m-2]

    CLASS(t_sf_fc_dead), allocatable :: fc_dead
    CLASS(t_sf_fc_live), allocatable :: fc_live
  CONTAINS
    PROCEDURE :: calc
    PROCEDURE :: get
  END TYPE t_sf_emissions


  INTERFACE  t_sf_emissions
    MODULE PROCEDURE :: create_t_sf_emissions
  END INTERFACE

CONTAINS

  !>
  !> Constructor
  !>
  FUNCTION create_t_sf_emissions(nc, nspecs, nfclass, em, fc_dead, fc_live) RESULT (sf_emissions)
    INTEGER, INTENT(in)            :: nc
    INTEGER, INTENT(in)            :: nfclass    !< 
    INTEGER, INTENT(in)            :: nspecs     !< 
    REAL(wp), INTENT(in)           :: em(nspecs) !< 
    CLASS(t_sf_fc_dead), INTENT(in) :: fc_dead
    CLASS(t_sf_fc_live), INTENT(in) :: fc_live
    TYPE(t_sf_emissions) :: sf_emissions !< output
    sf_emissions % nc = nc
    sf_emissions % nfclass = nfclass
    allocate(sf_emissions % fc_dead, source=fc_dead)
    allocate(sf_emissions % fc_live, source=fc_live)

    sf_emissions % nspecs = nspecs
    allocate(sf_emissions % emission_factors, source = em)

    allocate(sf_emissions % emissions(nc, nspecs))
    sf_emissions % emissions(:,:) = 0._wp
  END FUNCTION create_t_sf_emissions


  ! ======================================================================================================= !
  !>
  !> 
  !>
  !> 
  !>
  SUBROUTINE calc(this)
    CLASS(t_sf_emissions), INTENT(inout) :: this
    INTEGER :: ispec, ifuel, ilvpool

    INTEGER, PARAMETER :: DEAD_FUELCLASS_IDX = 2
    REAL(wp) :: fc_dead(this % nc, this % nfclass) !< 
    REAL(wp), ALLOCATABLE :: fc_live(:,:,:) !< 
    REAL(wp) :: fc_dead_total(this % nc) !< 
    REAL(wp) :: fc_live_total(this % nc) !< 
    REAL(wp) :: bb_tot(this % nc)        !< 
    REAL(wp) :: bb_tot_kg(this % nc)     !< 
    INTEGER :: inc, ispecs
    TYPE(t_sf_adaptor) :: sf_adaptor

    sf_adaptor = t_sf_adaptor(this % nc)

    ! 
    fc_dead = this % fc_dead % get() !< [gDM/m2]
    fc_live = this % fc_live % get() !< [gDM/m2]

    ! sum all
    fc_dead_total = SUM(fc_dead, dim=DEAD_FUELCLASS_IDX)

    DO inc = 1, this % nc
      fc_live_total(inc) = sum(fc_live(inc,:,:))
    END DO

    ! 
    bb_tot(:) = fc_dead_total(:) + fc_live_total(:)

    bb_tot_kg(:) = sf_adaptor % convert_units("g", "kg", bb_tot)

    ! 
    DO ispecs=1, this % nspecs
      this % emissions(:,ispecs) = this % emission_factors(ispecs) * bb_tot_kg(:)
    END DO

  END SUBROUTINE calc


  ! ======================================================================================================= !
  !>
  !> 
  !>
  FUNCTION get(this) RESULT (emissions)
    CLASS(t_sf_emissions), INTENT(in) :: this
    REAL(wp) :: emissions(this % nc, this % nspecs)
    emissions(:,:) = this % emissions(:,:)
  END FUNCTION get

#endif
END MODULE mo_dfire_sf_emissions_class
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

1 participant