Germandrummer92 / TalkingRobot

PSE
0 stars 0 forks source link

another nullpointerexception + illegalargumentexception #28

Closed narigaoka closed 10 years ago

narigaoka commented 10 years ago

when i want to enter recipe assistance with an unknown recipe, a nullpointerexception gets thrown because of adding social components.

Your next Input:can you tell me something about cheeseburger Exception in thread "main" java.lang.NullPointerException at nlg.OutputCreator.addSocialComponent(OutputCreator.java:218) at nlg.OutputCreator.createOutput(OutputCreator.java:62) at nlg.NLGPhase.setPhaseResult(NLGPhase.java:21) at generalControl.Main.main(Main.java:288)

narigaoka commented 10 years ago

there's another exception in the nlg:

Your next Input:i want to cook The robot says: What are we cooking? Your next Input:i do not know Exception in thread "main" java.lang.IllegalArgumentException: n must be positive at java.util.Random.nextInt(Random.java:300) at nlg.OutputCreator.addSocialComponent(OutputCreator.java:223) at nlg.OutputCreator.createOutput(OutputCreator.java:62) at nlg.NLGPhase.setPhaseResult(NLGPhase.java:21) at generalControl.Main.main(Main.java:288)

it seems like it always throw this exception if the system is in the RA-dialog and receives an unexpected answer to the question of RA_ENTRY: Your next Input:recipe working with: recipe The robot says: Hey. What's the name of the recipe you want to cook? Your next Input:wo xiang zuo shaomai Exception in thread "main" java.lang.IllegalArgumentException: n must be positive at java.util.Random.nextInt(Random.java:300) at nlg.OutputCreator.addSocialComponent(OutputCreator.java:223) at nlg.OutputCreator.createOutput(OutputCreator.java:62) at nlg.NLGPhase.setPhaseResult(NLGPhase.java:21) at generalControl.Main.main(Main.java:288)

Germandrummer92 commented 10 years ago

I think I fixed this, problem comes up when any state in the SocialBefore.json doesn't have a "" but only an empty array listed.

narigaoka commented 10 years ago

when i use the choice strategy a nullpointerexception gets thrown again, allthough there are "" in the SocialBefore.json and also in SocialAfter.json