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

NullPointerException when the target instruction is not found #80

Open
MattSkala opened this issue Apr 17, 2019 · 2 comments
Open

NullPointerException when the target instruction is not found #80

MattSkala opened this issue Apr 17, 2019 · 2 comments
Assignees
Labels
botsing This issue is related to botsing core components bug Something isn't working duplicate This issue or pull request already exists

Comments

@MattSkala
Copy link

Characteristics

  • Issue Type: bug
  • Reproducibility: always
  • Severity: crash
  • Tool/Service/Component: botsing-reproduction-1.0.4
  • Execution Environment: macOS 10.14.2
  • Reporter: [email protected]

Description

When the frame in the input stack trace does not correspond to any instruction in the source code (which can happen e.g. when trying to reproduce the stack trace with an incorrect version of the program), Botsing crashes with NullPointerException:

Exception in thread "main" java.lang.NullPointerException
	at eu.stamp.botsing.ga.strategy.operators.GuidedSearchUtility.getPublicCalls(GuidedSearchUtility.java:79)
	at eu.stamp.botsing.ga.strategy.operators.GuidedSearchUtility.getPublicCalls(GuidedSearchUtility.java:116)
	at eu.stamp.botsing.fitnessfunction.testcase.factories.RootMethodTestChromosomeFactory.fillPublicCalls(RootMethodTestChromosomeFactory.java:197)
	at eu.stamp.botsing.fitnessfunction.testcase.factories.RootMethodTestChromosomeFactory.reset(RootMethodTestChromosomeFactory.java:191)
	at eu.stamp.botsing.fitnessfunction.testcase.factories.RootMethodTestChromosomeFactory.<init>(RootMethodTestChromosomeFactory.java:60)
	at eu.stamp.botsing.testgeneration.strategy.BotsingIndividualStrategy.getChromosomeFactory(BotsingIndividualStrategy.java:124)
	at eu.stamp.botsing.testgeneration.strategy.BotsingIndividualStrategy.getGA(BotsingIndividualStrategy.java:117)
	at eu.stamp.botsing.testgeneration.strategy.BotsingIndividualStrategy.generateTests(BotsingIndividualStrategy.java:69)
	at eu.stamp.botsing.reproduction.CrashReproduction.generateCrashReproductionTests(CrashReproduction.java:131)
	at eu.stamp.botsing.reproduction.CrashReproduction.execute(CrashReproduction.java:80)
	at eu.stamp.botsing.Botsing.parseCommandLine(Botsing.java:78)
	at eu.stamp.botsing.Botsing.main(Botsing.java:163)

Steps to reproduce

  1. Download and compile the source code provided at LOG-47957
  2. Save the provided stack trace as LOG-47957.txt, replace log4jb with log4j
  3. Run java -jar botsing-reproduction-1.0.4.jar -crash_log LOG-47957.txt -target_frame 1 -project_cp logging-log4j-1.2.14/dist/lib
@MaelAudren
Copy link
Member

MaelAudren commented May 3, 2019

@xdevroey xdevroey added botsing This issue is related to botsing core components bug Something isn't working labels May 14, 2019
@pderakhshanfar
Copy link
Collaborator

When the frame in the input stack trace does not correspond to any instruction in the source code (which can happen e.g. when trying to reproduce the stack trace with an incorrect version of the program), Botsing crashes with NullPointerException:

The given software under test bytecode should be the same as the version on which the given stack trace has been thrown. Otherwise, it does not make sense to apply Botsing on them because the achieved stack trace by the generated test cases of Botsing will never be the same as the given one.

@pderakhshanfar pderakhshanfar added the duplicate This issue or pull request already exists label Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
botsing This issue is related to botsing core components bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants