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

[Bug} [49.9 #975] Uncaught Exception When Defaulting on Loan #3372

Closed
IllianiCBT opened this issue Jun 18, 2022 · 6 comments · Fixed by #3378
Closed

[Bug} [49.9 #975] Uncaught Exception When Defaulting on Loan #3372

IllianiCBT opened this issue Jun 18, 2022 · 6 comments · Fixed by #3378

Comments

@IllianiCBT
Copy link
Collaborator

Environment

Version: 49.9 #975
Jave: Homebrew 11.0.12
Platform: Mac OS X 12.4 (x86_64)

Description

Upon clicking 'advance day' MekHQ throws up an Uncaught Exception. The day progresses in the Daily Activity Log, but as an amendment to the prior day:

image

Reproduction

Using the attached campaign file advance two days.

Files

mekhq.log
AdvanceDayException.cpnx.gz

@Windchild292
Copy link
Contributor

18:25:44,846 ERROR [mekhq.MekHQ] {AWT-EventQueue-0}
mekhq.MekHQ.lambda$main$0(MekHQ.java:239) - Uncaught Exception Detected
java.util.MissingFormatArgumentException: Format specifier '%s'
	at java.base/java.util.Formatter.format(Formatter.java:2672)
	at java.base/java.util.Formatter.format(Formatter.java:2609)
	at java.base/java.lang.String.format(String.java:2897)
	at mekhq.campaign.finances.Finances.newDay(Finances.java:330)
	at mekhq.campaign.Campaign.newDay(Campaign.java:3507)
	at mekhq.campaign.CampaignController.advanceDay(CampaignController.java:82)
	at mekhq.gui.CampaignGUI.lambda$initTopButtons$46(CampaignGUI.java:1121)

@IllianiCBT
Copy link
Collaborator Author

Update: testing further, it appears I can avoid the error by adding sufficient funds to cover the loan payment.

Without sufficient funds the payment isn't made, but the exception occurs:

image

With sufficient funds, the payment is made and no exception occurs:

image

@IllianiCBT IllianiCBT changed the title [Bug} [49.9 #975] Uncaught Exception When Advancing Day [Bug} [49.9 #975] Uncaught Exception When Defaulting on Loan Jun 18, 2022
@Windchild292
Copy link
Contributor

The final loan payment resource is also bugged, with it instead missing the format instead of having an additional one.

@Windchild292
Copy link
Contributor

We need the customs to test.

image

@IllianiCBT
Copy link
Collaborator Author

Ugh, sorry, school boy error. I’ll get this done when I wake up.

@IllianiCBT
Copy link
Collaborator Author

Here you go:
Custom Units.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants