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

Manually Generated New Contract Throws Arithmetic Error #5181

Open
7 tasks done
jschmetzer opened this issue Nov 8, 2024 · 1 comment
Open
7 tasks done

Manually Generated New Contract Throws Arithmetic Error #5181

jschmetzer opened this issue Nov 8, 2024 · 1 comment
Labels

Comments

@jschmetzer
Copy link
Contributor

Prerequisites and Pre-Issue Checklist

  • I'm reporting the issue to the correct repository:

  • MegaMek

  • MegaMekLab

  • MekHQ

  • I've tested the issue against at least the latest MILESTONE version

  • I've asked on the MegaMek Discord about the error

  • I've reviewed the BattleTech rules and MekHQ documentation, and I've confirmed that something isn't working as intended.

  • I've searched the Github tracker and haven't found the issue listed

Severity *

Medium (Gameplay Limitation): Non-core functionality is impaired, providing a suboptimal but playable experience.

Brief Description *

When creating a new contract using the Add Mission button , and all fields are populated, creating the contract throws an arithmetic error.

Steps to Reproduce

  1. Download and unpack latest Nightly
  2. Start a new Campaign with the complete Stratcon preset
  3. Create a new contract mission; fill in any not-generated fields
  4. Press Ok

Operating System *

Mac

Java Version *

17.0.12

MekHQ Suite Version *

Free Text (type manually)

Custom MekHQ Version

50.01

Attach Files

mekhq.log.zip

Final Checklist

  • I've checked to make sure that this issue has not already been filed
  • I'm reporting only one issue in this ticket for clarity and focus
@jschmetzer jschmetzer changed the title Manually Generation New Contract Throws Arithmetic Error Manually Generated New Contract Throws Arithmetic Error Nov 11, 2024
@repligator
Copy link
Collaborator

14:34:19,175 ERROR [mekhq.MekHQ] {AWT-EventQueue-0}
mekhq.MekHQ.lambda$main$1(MekHQ.java:291) - Uncaught java.lang.ArithmeticException detected. Please open up an issue containing all logs, the game save file, and customs at https://github.com/MegaMek/megamek/issues . If Sentry is enabled, the error has also been logged.
java.lang.ArithmeticException: / by zero
	at mekhq.campaign.stratcon.StratconContractInitializer.trackObjectDistribution(StratconContractInitializer.java:247)
	at mekhq.campaign.stratcon.StratconContractInitializer.initializeCampaignState(StratconContractInitializer.java:107)
	at mekhq.gui.dialog.NewAtBContractDialog.btnOKActionPerformed(NewAtBContractDialog.java:549)

@repligator repligator added the Bug label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants