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

[0.49.20+] Difficulty saving Battle Armor units #1558

Open
mhjacks opened this issue Jul 12, 2024 · 5 comments
Open

[0.49.20+] Difficulty saving Battle Armor units #1558

mhjacks opened this issue Jul 12, 2024 · 5 comments
Labels
Battle Armor Concerns BattleArmor Bug

Comments

@mhjacks
Copy link
Contributor

mhjacks commented Jul 12, 2024

Environment

0.49.20 and current nightlies (As 0f 7/12/2024)
JDK 11, 17, and 21
Bundle MML from MekHQ in Fedora Linux 40

Description

image

When trying to save custom battlearmor units, the filetype is replaced with the filename, and the file doesn't save. It may also be significant that more elements are added to the "File TYpe" part of the dialog.

The issue appears to be related to the dialog, the save happens fine when there is no dialog.

Files

Logfile doesn't seem to have anything interesting, but you may be interested in the versions:

15:59:46,475 INFO  [megameklab.MegaMekLab] {main}
megameklab.MegaMekLab.initializeLogging(MegaMekLab.java:53) - Starting MegaMekLab v0.49.20
    Build Date: 2024-06-28T16:07:06.716978700
    Today: 2024-07-12
    Origin Project: MegaMekLab
    Java Vendor: Red Hat, Inc.
    Java Version: 11.0.23
    Platform: Linux 6.9.8-200.fc40.x86_64 (amd64)
    System Locale: en_US
    Total memory available to MegaMekLab: 1 GB
    MM Code Revision: Unknown
    MML Code Revision: Unknown
    MHQ Code Revision: Unknown

I have been able to reproduce the issue with all 3 versions of the system JDK available on Fedora 40

@pavelbraginskiy
Copy link
Collaborator

pavelbraginskiy commented Jul 14, 2024

This is caused by square brackets in the unit name. Absolutely no idea why that's a problem, though.

@mhjacks
Copy link
Contributor Author

mhjacks commented Jul 14, 2024

I see that removing the square brackets works around this. I agree, this is odd. There must be a good reason for this behavior, but I can't imagine what it would be.

@pavelbraginskiy
Copy link
Collaborator

I should add that this is definitely OS-specific. Possibly Fedora related, since I only tested on Fedora 40.
In Windows MML saves unit files with square brackets with no issue.

@mhjacks
Copy link
Contributor Author

mhjacks commented Jul 14, 2024

Interesting. Looking at the code there doesn't seem to be any special handling of characters or anything else suspicious in the MML code. I'm assuming you tested with the system JDK only? (That's all I've tried, though I'm downloading adoptium because it seems like it would be an interesting test)

@mhjacks
Copy link
Contributor Author

mhjacks commented Jul 14, 2024

I got the same (problematic) behavior with Temurin 21:

OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)```

@repligator repligator added the Bug label Aug 2, 2024
@repligator repligator added the Battle Armor Concerns BattleArmor label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Battle Armor Concerns BattleArmor Bug
Projects
None yet
Development

No branches or pull requests

3 participants