Jump to content


Photo
- - - - -

Pat Wilson Campaign Generator support


  • Please log in to reply
1367 replies to this topic

#1361 J2_Bidu

J2_Bidu
  • Posts: 352

Posted 15 August 2017 - 20:40

It's an error that I have to fix.


I see you're using the Factory Pattern. ;)
  • 0

#1362 PatAWilson

PatAWilson
  • Posts: 3337

Posted 17 August 2017 - 17:31

A lot of PWCG dates back to when I only knew Java 4.  I have refactored it many times in the past eight years.  

 

Factory pattern is great for unit testing because it is the key to dependency injection, which in turn is the key to effective mocking.  In this case it is also the key to switching between WWI and WWII.  A plane factory factory (abstract factory pattern) creates the correct plane factory (factory pattern), which in turn creates the correct plane.

 

Right now I am in the integration test phase of a rewrite of the AAR/History component (about 20K lines of code).  Embarrassed to admit that my unit test coverage was pretty close to zero.  Some functional level test automation but nothing more.  With the rewritten component I have about 300 or so tests in place and I am getting about 70% coverage.  


  • 1

#1363 J2_Bidu

J2_Bidu
  • Posts: 352

Posted 17 August 2017 - 17:46

That's looking good. Dependency injection is really a great thing. I successfully used massive unit testing together with Castle Windsor dependency injection in a relatively large project (.net).the level of confidence that this provides is really great. No fear of refactoring to the last minute.
  • 0

#1364 J2_Bidu

J2_Bidu
  • Posts: 352

Posted 17 August 2017 - 17:47

70% is really good. We also had lots of generated code. And generated tests. :-)
  • 0

#1365 The_Pain_Sherrif

The_Pain_Sherrif
  • Posts: 61
  • LocationCentral Florida

Posted 01 December 2017 - 17:04

Hello, I'm a big fan of this campaign generator. But in 3.0.2 I have one problem. 

Whenever I try to accept a two-seater mission, I get an error.

 

Here is the error log file when I try to accept an RE8 mission:

 

PWCG Error
Thu Nov 30 16:14:10 EST 2017
java.lang.IllegalArgumentException: Unsupported control type: Master Gain
at com.sun.media.sound.AbstractLine.getControl(Unknown Source)
at pwcg.gui.sound.SoundPlayer.changeVolume(SoundPlayer.java:97)
at pwcg.gui.sound.SoundManager.playNewSong(SoundManager.java:128)
at pwcg.gui.sound.SoundManager.transitionToNewSong(SoundManager.java:110)
at pwcg.gui.sound.SoundManager.run(SoundManager.java:79)
 
 
PWCG Error
Thu Nov 30 16:14:18 EST 2017
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at pwcg.campaign.ww1.airfield.RoFHotSpotTranslator.getHotSpots(RoFHotSpotTranslator.java:30)
at pwcg.campaign.group.airfield.AirfieldObjectPlacer.createAirfieldObjects(AirfieldObjectPlacer.java:33)
at pwcg.campaign.ww1.airfield.RoFAirfield.addAirfieldObjects(RoFAirfield.java:115)
at pwcg.mission.MissionAirfieldBuilder.selectAirfieldsWithinMissionBoundaries(MissionAirfieldBuilder.java:47)
at pwcg.mission.MissionAirfieldBuilder.getFieldsForPatrol(MissionAirfieldBuilder.java:29)
at pwcg.mission.Mission.getFieldsForPatrol(Mission.java:166)
at pwcg.campaign.ww1.io.RoFMissionFile.writeProductSpecific(RoFMissionFile.java:55)
at pwcg.campaign.io.mission.MissionFile.writeMission(MissionFile.java:111)
at pwcg.campaign.ww1.io.RoFMissionFile.writeMission(RoFMissionFile.java:223)
at pwcg.mission.Mission.write(Mission.java:92)
at pwcg.mission.Mission.finalizeMission(Mission.java:157)
at pwcg.gui.rofmap.brief.BriefingMissionHandler.finalizeMission(BriefingMissionHandler.java:45)
at pwcg.gui.rofmap.brief.BriefingPilotPanelSet.acceptMission(BriefingPilotPanelSet.java:529)
at pwcg.gui.rofmap.brief.BriefingPilotPanelSet.actionPerformed(BriefingPilotPanelSet.java:453)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
 
 
To see if it was only RFC two-seaters I created a Breguet campaign and received this error when I accepted the mission:
 
PWCG Error
Thu Nov 30 16:29:01 EST 2017
java.lang.IllegalArgumentException: Unsupported control type: Master Gain
at com.sun.media.sound.AbstractLine.getControl(Unknown Source)
at pwcg.gui.sound.SoundPlayer.changeVolume(SoundPlayer.java:97)
at pwcg.gui.sound.SoundManager.playNewSong(SoundManager.java:128)
at pwcg.gui.sound.SoundManager.transitionToNewSong(SoundManager.java:110)
at pwcg.gui.sound.SoundManager.run(SoundManager.java:79)
 
 
PWCG Error
Thu Nov 30 16:29:48 EST 2017
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at pwcg.campaign.ww1.airfield.RoFHotSpotTranslator.getHotSpots(RoFHotSpotTranslator.java:30)
at pwcg.campaign.group.airfield.AirfieldObjectPlacer.createAirfieldObjects(AirfieldObjectPlacer.java:33)
at pwcg.campaign.ww1.airfield.RoFAirfield.addAirfieldObjects(RoFAirfield.java:115)
at pwcg.mission.MissionAirfieldBuilder.selectAirfieldsWithinMissionBoundaries(MissionAirfieldBuilder.java:47)
at pwcg.mission.MissionAirfieldBuilder.getFieldsForPatrol(MissionAirfieldBuilder.java:29)
at pwcg.mission.Mission.getFieldsForPatrol(Mission.java:166)
at pwcg.campaign.ww1.io.RoFMissionFile.writeProductSpecific(RoFMissionFile.java:55)
at pwcg.campaign.io.mission.MissionFile.writeMission(MissionFile.java:111)
at pwcg.campaign.ww1.io.RoFMissionFile.writeMission(RoFMissionFile.java:223)
at pwcg.mission.Mission.write(Mission.java:92)
at pwcg.mission.Mission.finalizeMission(Mission.java:157)
at pwcg.gui.rofmap.brief.BriefingMissionHandler.finalizeMission(BriefingMissionHandler.java:45)
at pwcg.gui.rofmap.brief.BriefingPilotPanelSet.acceptMission(BriefingPilotPanelSet.java:529)
at pwcg.gui.rofmap.brief.BriefingPilotPanelSet.actionPerformed(BriefingPilotPanelSet.java:453)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
 

When I go into RoF the missions are there. But when I try to do them, the loading screen shows up and when the bar reaches the end, it returns to the RoF home screen. So far, it appears that scout campaigns work fine. Is this something I can fix?

 

Thanks


  • 0

"It's 'mazing how much luck has to do with being, uh, lucky."


#1366 PatAWilson

PatAWilson
  • Posts: 3337

Posted 02 December 2017 - 17:39

java.lang.IllegalArgumentException: Unsupported control type: Master Gain

Your system might not support music.  Turn it off on the main page. Edit: that is one error but it is not the cause of the mission failure.

 

This is the real issue:

ava.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at pwcg.campaign.ww1.airfield.RoFHotSpotTranslator.getHotSpots(RoFHotSpotTranslator.java:30)
 
I will fix it.

  • 0

#1367 GenMarkof007

GenMarkof007
  • Posts: 264

Posted 07 December 2017 - 21:45

S! All,

 

Got a special question when configuring PWCG for missions output!

Is there any specific fields in the configuration (in-game) to reduce the patrols distance in PWCG (meaning having less waypoint for a mission)?

For now, I can only remove some waypoint after creating a mission (and approving it).

 

Thanks for any help on this.

Cheers,

Gen ;)


  • 0

#1368 jlan5031

jlan5031
  • Member
  • Posts: 3

Posted Yesterday, 20:23

Is there any way to set up familiarization missions to make the area around a new airfield familiar? Most memoirs I've read mention them.

Thanks for any reply


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users