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

Panic when run bad small scan for AOSP framework #29

Open
xpw-osr opened this issue Dec 8, 2022 · 0 comments
Open

Panic when run bad small scan for AOSP framework #29

xpw-osr opened this issue Dec 8, 2022 · 0 comments

Comments

@xpw-osr
Copy link

xpw-osr commented Dec 8, 2022

Coca Version: 2.3.0
OS: Ubuntu 18.04.3 and 22.04

Run following command under frameworks folder of aosp repo

coca bs -s type

will get following panic

panic: interface conversion: interface is nil, not antlr.ParseTree

coca outpuit

2022/12/08 14:53:35 profile: cpu profiling enabled, /tmp/profile2012546155/cpu.pprof
open ./.gitignore: no such file or directory
parse java call: AutoFitTextureView.java
parse java call: MainActivity.java
parse java call: MediaCodecBase.java
parse java call: MediaCodecSurfaceEncoder.java
parse java call: NalUnitUtil.java
parse java call: ParsableBitArray.java
parse java call: CodecUtils.java
parse java call: Decoder.java
parse java call: Encoder.java
parse java call: Extractor.java
parse java call: Muxer.java
parse java call: Native.java
parse java call: Stats.java
parse java call: MainActivity.java
parse java call: ResourcePolicyTestActivity.java
parse java call: AbstractAutofillPerfTestCase.java
parse java call: AutofillTestHelper.java
parse java call: AutofillTestWatcher.java
parse java call: MyAutofillCallback.java
parse java call: MyAutofillService.java
parse java call: AtraceUtils.java
parse java call: AbstractContentCapturePerfTestCase.java
parse java call: CustomTestActivity.java
parse java call: MyContentCaptureService.java
parse java call: PackageManagerBenchmark.java
parse java call: TableHelper.java
parse java call: R.java
parse java call: SomeProvider.java
parse java call: SomeService.java
parse java call: NonEditableTextGenerator.java
parse java call: TextPerfUtils.java
parse java call: CutoutSpecificationBenchmark.java
parse java call: InputStageBenchmark.java
parse java call: ImePerfRunPrecondition.java
parse java call: ImePerfTestBase.java
parse java call: DummyForegroundActivity.java
parse java call: BenchmarkResults.java
parse java call: BenchmarkResultsReporter.java
parse java call: BenchmarkRunner.java
parse java call: BroadcastWaiter.java
parse java call: PackageInstallerBenchmark.java
parse java call: BenchmarkState.java
parse java call: BitmapUtils.java
parse java call: LayoutUtils.java
parse java call: ManualBenchmarkState.java
parse java call: OneTimeSettingsListener.java
parse java call: PerfManualStatusReporter.java
parse java call: PerfStatusReporter.java
parse java call: PerfTestActivity.java
parse java call: SettingsHelper.java
parse java call: SettingsStateKeeperRule.java
parse java call: SettingsStateManager.java
parse java call: ShellHelper.java
parse java call: StateKeeperRule.java
parse java call: StateManager.java
parse java call: Stats.java
parse java call: TestPackageInstaller.java
parse java call: TestUtils.java
parse java call: TraceMarkParser.java
parse java call: WindowPerfRunPreconditionBase.java
parse java call: WindowPerfTestBase.java
parse java call: WindowManagerPerfTestBase.java
parse java call: WmPerfRunListener.java
parse java call: FrameworksTestsFilter.java
parse java call: BlobHandle.java
parse java call: BlobInfo.java
parse java call: BlobStoreManager.java
parse java call: BlobStoreManagerFrameworkInitializer.java
parse java call: LeaseInfo.java
parse java call: XmlTags.java
parse java call: BlobAccessMode.java
parse java call: BlobMetadata.java
parse java call: BlobStoreConfig.java
parse java call: BlobStoreIdleJobService.java
parse java call: BlobStoreManagerInternal.java
parse java call: BlobStoreManagerService.java
parse java call: BlobStoreManagerShellCommand.java
parse java call: BlobStoreSession.java
parse java call: BlobStoreUtils.java
parse java call: AlarmManager.java
parse java call: JobSchedulerImpl.java
parse java call: JobInfo.java
parse java call: JobParameters.java
parse java call: JobScheduler.java
parse java call: JobSchedulerFrameworkInitializer.java
parse java call: JobService.java
parse java call: JobServiceEngine.java
parse java call: JobSnapshot.java
parse java call: JobWorkItem.java
parse java call: EconomyManager.java
parse java call: DeviceIdleManager.java
parse java call: PowerExemptionManager.java
parse java call: PowerWhitelistManager.java
parse java call: AppStateTracker.java
parse java call: DeviceIdleInternal.java
parse java call: PowerAllowlistInternal.java
parse java call: ConstraintController.java
parse java call: IDeviceIdleConstraint.java
parse java call: JobSchedulerInternal.java
parse java call: AppStandbyInternal.java
parse java call: AnyMotionDetector.java
parse java call: AppStateTrackerImpl.java
parse java call: DeviceIdleController.java
parse java call: JobSchedulerBackgroundThread.java
parse java call: Alarm.java
parse java call: AlarmManagerService.java
parse java call: AlarmStore.java
parse java call: BatchingAlarmStore.java
parse java call: LazyAlarmStore.java
parse java call: MetricsHelper.java
parse java call: TareBill.java
parse java call: BluetoothConstraint.java
parse java call: DeviceIdleConstraintTracker.java
parse java call: TvConstraintController.java
parse java call: GrantedUriPermissions.java
parse java call: JobCompletedListener.java
parse java call: JobConcurrencyManager.java
2022/12/08 14:53:43 profile: cpu profiling disabled, /tmp/profile2012546155/cpu.pprof
panic: interface conversion: interface is nil, not antlr.ParseTree

goroutine 1 [running]:
github.com/modernizing/coca/pkg/infrastructure/ast/bs_java.(*BadSmellListener).EnterLocalVariableDeclaration(0x40a62d?, 0xc00bbaeaf8)
	/home/runner/work/coca/coca/pkg/infrastructure/ast/bs_java/bad_smell_listener.go:173 +0xcc
github.com/modernizing/coca/languages/java.(*LocalVariableDeclarationContext).EnterRule(0xc008fe5460?, {0xb68288?, 0x1067898?})
	/home/runner/work/coca/coca/languages/java/java_parser.go:11227 +0x45
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).EnterRule(0xc00bbaeab0?, {0xb68288, 0x1067898}, {0x7f115a5b24d0?, 0xc00bbaeaf8?})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:244 +0x86
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc00bbae468?, {0xb68288, 0x1067898}, {0xb6a558?, 0xc00bbaeaf8})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:228 +0xba
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc00bbae450?, {0xb68288, 0x1067898}, {0xb69598?, 0xc00bbaeab0})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc00baa5b00?, {0xb68288, 0x1067898}, {0xb69550?, 0xc00bbae468})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc00baa5ae8?, {0xb68288, 0x1067898}, {0xb6a5e8?, 0xc00bbae450})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc00b9b5b30?, {0xb68288, 0x1067898}, {0xb6a678?, 0xc00baa5b00})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc0016ebb60?, {0xb68288, 0x1067898}, {0xb6a5a0?, 0xc00baa5ae8})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc0016ebb48?, {0xb68288, 0x1067898}, {0xb696b8?, 0xc00b9b5b30})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc0016ebb30?, {0xb68288, 0x1067898}, {0xb69670?, 0xc0016ebb60})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc0016eb098?, {0xb68288, 0x1067898}, {0xb69748?, 0xc0016ebb48})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc0016eb098?, {0xb68288, 0x1067898}, {0xb6ac60?, 0xc0016ebb30})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/antlr/antlr4/runtime/Go/antlr.(*ParseTreeWalker).Walk(0xc00aeedb08?, {0xb68288, 0x1067898}, {0xb69868?, 0xc0016eb098})
	/home/runner/go/pkg/mod/github.com/antlr/antlr4/runtime/!go/[email protected]/tree.go:231 +0x108
github.com/modernizing/coca/pkg/application/bs.(*BadSmellApp).AnalysisPath(0x0?, {0xa918a1?, 0xa9189f?})
	/home/runner/work/coca/coca/pkg/application/bs/bad_smell_app.go:37 +0x2a5
github.com/modernizing/coca/cmd.glob..func4(0x1015200?, {0xa9206e?, 0x2?, 0x2?})
	/home/runner/work/coca/coca/cmd/bs.go:33 +0xfa
github.com/spf13/cobra.(*Command).execute(0x1015200, {0xc00032f700, 0x2, 0x2})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x1014580)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2ee
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
main.main()
	/home/runner/work/coca/coca/coca.go:16 +0xff
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