Extremely slow workspace

Upvotes: 2
Issue description

Dear MCreator developers,

my workspace (Raolcraft) suddently became extremely slow. It has never been very fast, but it recently became very slow. I thought that updating to 1.9.1 could have fixed this issue, but it is the same.

Should I disable the automatic recompilation (because it gets slow during recompilation)?
 

Anyway, I sent you all my workspaces, if you need them. Could you please remove them from this ticket as soon as it becomes public?

Attachment Size
crash log20.16 KB 20.16 KB

Issue comments

MCreator in 1.9.1 no longer uses Java for recipes so there should be faster builds than before.

If the recompilation makes it slow, try disabling it, but it could you make miss important mistakes in your mod.

I would suggest checking if there is something else on your computer taking up resources.

1.9.1 is definitely faster with your workspaces on my computer.

If this does not help, write back here and we will see what else can be done.

MCreator itself is not slow, but it freezes for a few seconds after an element is edited. And it seems that disabling recompilation doesn't help much, MCreator is very fast until you close one of its tabs, making it freeze for a few seconds.

I've installed some stuff recently, but there still is a lot of free space on the computer. Other programs and games work fine

I've tried opening the Task Manager and it says that every process consumes low resources until I close an element tab, then openjdk starts taking a lot of resources

And everything comes back to normal after a few seconds

(I'm sorry if I posted too many consecutive comments XD)

I have tried closing tabs but it did not lag for me. Could you screen record how this looks like?

I will do my best to fix this, but for now, I can't really replicate this.

If possible, give me your computer specs too (CPU, RAM, disk type).

Another question, does this happen with all mod elements or some specific ones (or specific mod element types)?

Sorry for so many questions, but I can't replicate this myself so I need as much info as possible :)

I can't screen record right now, but here are the computer specs:

Intel (R) Core (TM) i5-2500, 16GB RAM, 64bit...

I think that's enough XD

It seems it happens with everything, but I will check later

Maybe I could allocate more RAM to MCreator, but I don't know if could it cause any issues

RAM settings in Preferences only affect Gradle builds, not whole MCreator.

Does this only happen when saving changes of an existing mod element? Or are there other cases too?

And how long does this lag last approximately in seconds?

It seems it happens when loading the workspace and when closing any tab (I tried closing the create texture tab for example)

It seems it lasts about 18 seconds

It is not much, but I want to add ore dictionary to hundreds of blocks and items and it could take a lot of time because the lag

This is also happening to me, although it is taking way longer then 18 seconds to open my workspace.

Could both of you do the following:

  1. Launch MCreator and get it into situation to lag that badly
  2. Close it
  3. Go to <user folder>/.mcreator/logs and open the latest log file and copy+paste its content here

Alternatively run it using mcreator.bat and paste the terminal contents after it lags.

Thank you for the info!

Ok, I will as soon as I get in front of my computer (probably this evening)

It lags as soon as I click my workspace, and it's still open (so. many. hours.), so I'll get it done in a flash.

2019-09-27-21:43:08 [main/INFO] [Launcher] Starting MCreator 1.9.1, full version: 1.9.1
2019-09-27-21:43:08 [main/INFO] [Launcher] Java version: 1.8.0_222, specification: 1.8, VM name: OpenJDK 64-Bit Server VM
2019-09-27-21:43:08 [main/INFO] [Launcher] Current JAVA_HOME for running instance: C:\Program Files\Pylo\MCreator\jdk\jre
2019-09-27-21:43:10 [main/DEBUG] [Preferences Manager] Loading preferences from the C:\Users\[REDACTED]\.mcreator\preferences
2019-09-27-21:43:10 [main/INFO] [Launcher] Installation path: C:\Program Files\Pylo\MCreator
2019-09-27-21:43:10 [main/INFO] [Launcher] User home of MCreator: C:\Users\Nicolus\.mcreator\
2019-09-27-21:44:06 [AWT-EventQueue-0/INFO] [UpdateNotify] Skipping update message ...
2019-09-27-21:44:06 [Thread-6/WARN] [User Session Manager] Session checking error
java.lang.IllegalArgumentException: Last unit does not have enough valid bits
    at java.util.Base64$Decoder.decode0(Base64.java:734) ~[?:1.8.0_222]
    at java.util.Base64$Decoder.decode(Base64.java:526) ~[?:1.8.0_222]
    at net.mcreator.util.c.b(SourceFile:19) ~[mcreator.jar:?]
    at net.mcreator.b.a.b.e.a(SourceFile:31) ~[mcreator.jar:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
2019-09-27-21:44:08 [Thread-7/INFO] [GA] Tracking page: /1.9.1/launch
2019-09-27-21:44:12 [AWT-EventQueue-0/ERROR] [Exception] Uncaught exception in AWT-EventQueue-0
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) ~[gson-2.8.5.jar:?]
    at com.google.gson.Gson.fromJson(Gson.java:927) ~[gson-2.8.5.jar:?]
...

 

There's the log for you.

BunnyLord_123, this is unrelated, your issue is that your workspace got corrupter, most likely due to forcefully closing MCreator or shutting down a computer.

Workspaces can get corrupted if they are being written to while the computer crashes or MCreator is unexpectedly closed.

To restore your workspace, go to <workspace folder>/.mcreator/workspaceBackups/. In this folder, backups of the workspace file are stored. Pick a backup from a date before the crash and replace your <workspace folder>/<modid>.mcreator file with one of the backups. Make sure to rename the backup to the same name as the original workspace file.

So that's why. Didn't know that. Thanks for the help, even if it has nothing to do with this problem :)

Wait - I don't know why, but today it doesn't lag

I will send you the long anyway, but it's odd how bugs appear and then fix by themselves after a bit...

Here is the log:

2019-09-28-22:39:27 [main/INFO] [Launcher] Starting MCreator 1.9.1, full version: 1.9.1
2019-09-28-22:39:27 [main/INFO] [Launcher] Java version: 1.8.0_222, specification: 1.8, VM name: OpenJDK 64-Bit Server VM
2019-09-28-22:39:27 [main/INFO] [Launcher] Current JAVA_HOME for running instance: C:\Program Files\Pylo\MCreator\jdk\jre
2019-09-28-22:39:27 [main/DEBUG] [Preferences Manager] Loading preferences from the C:\Users\---\.mcreator\preferences
2019-09-28-22:39:27 [main/INFO] [Launcher] Installation path: C:\Program Files\Pylo\MCreator
2019-09-28-22:39:27 [main/INFO] [Launcher] User home of MCreator: C:\Users\---\.mcreator\
2019-09-28-22:39:34 [AWT-EventQueue-0/INFO] [UpdateNotify] Skipping update message ...
2019-09-28-22:39:34 [Thread-6/INFO] [Website API] Checking Pylo user session
2019-09-28-22:39:34 [Thread-7/INFO] [GA] Tracking page: /1.9.1/launch
2019-09-28-22:39:53 [AWT-EventQueue-0/INFO] [Workspace] Loaded workspace file C:\Users\---\MCreatorWorkspaces\Raolcraft\raolcraft.mcreator
2019-09-28-22:39:53 [AWT-EventQueue-0/INFO] [MCreator] Opening MCreator workspace: raolcraft
2019-09-28-22:39:54 [AWT-EventQueue-0/INFO] [Workspace] Loaded workspace file C:\Users\---\MCreatorWorkspaces\Raolcraft\raolcraft.mcreator
2019-09-28-22:39:54 [AWT-EventQueue-0/INFO] [MCreator] Opening MCreator workspace: raolcraft
2019-09-28-22:39:54 [AWT-EventQueue-0/WARN] [Application] Trying to open already open workspace, bringing it to the front.
2019-09-28-22:40:12 [AWT-EventQueue-0/INFO] [Workspace] Loaded workspace file C:\Users\---\MCreatorWorkspaces\Raolcraft\raolcraft.mcreator
2019-09-28-22:40:12 [AWT-EventQueue-0/INFO] [MCreator] Opening MCreator workspace: raolcraft
2019-09-28-22:40:13 [AWT-EventQueue-0/WARN] [Application] Trying to open already open workspace, bringing it to the front.
2019-09-28-22:42:04 [AWT-EventQueue-0/WARN] [Import Formatter] Reinitializing import formatter as generator has been changed
2019-09-28-22:42:22 [pool-3-thread-1/DEBUG] [Workspace File Manager/RAOLCRAFT] Workspace stored on the FS
2019-09-28-22:42:52 [pool-3-thread-1/DEBUG] [Workspace File Manager/RAOLCRAFT] Workspace stored on the FS
2019-09-28-22:44:52 [pool-3-thread-1/DEBUG] [Workspace File Manager/RAOLCRAFT] Workspace stored on the FS
2019-09-28-22:45:22 [pool-3-thread-1/DEBUG] [Workspace File Manager/RAOLCRAFT] Workspace stored on the FS
2019-09-28-22:45:25 [AWT-EventQueue-0/INFO] [MCreator] Closing MCreator window ...
2019-09-28-22:45:25 [AWT-EventQueue-0/INFO] [Workspace File Manager/RAOLCRAFT] Saving the workspace by direct request!
2019-09-28-22:45:25 [AWT-EventQueue-0/DEBUG] [Workspace File Manager/RAOLCRAFT] Workspace stored on the FS
2019-09-28-22:45:25 [AWT-EventQueue-0/DEBUG] [Application] Closing any potentially open MCreator windows
2019-09-28-22:45:25 [AWT-EventQueue-0/DEBUG] [Application] Performing exit tasks
2019-09-28-22:45:25 [AWT-EventQueue-0/INFO] [GA] Tracking page: /1.9.1/close
2019-09-28-22:45:26 [AWT-EventQueue-0/DEBUG] [Application] Stopping AWT and FX threads
2019-09-28-22:45:27 [AWT-EventQueue-0/DEBUG] [Application] Exiting MCreator

Nevermind, there still is the lag. But it doesn't always appear. I edited 3 food elements without lag then edited a block and the lag appeared again...

I also found another issue: runclient crashes.

After a long recompilation where MCreator just freezes, it crashes with the log I attached to the issue (it was too long to be on pastebin).

It seems there are some issues with recipes, probably ore dictionary, but I'm not sure

BunnyLord_123:

To restore your workspace, go to <workspace folder>/.mcreator/workspaceBackups/. In this folder, backups of the workspace file are stored. Pick a backup from a date before the crash and replace your <workspace folder>/<modid>.mcreator file with one of the backups. Make sure to rename the backup to the same name as the original workspace file.

There is no mention of the zip file here. If you keep on having the issue, please open a separate ticket as this does not belong in this one.

Raol:

Did you install patch update and forgot to regenerate the code possibly?

To apply the patch (fix these bugs), uninstall MCreator 1.9.1, download it again and install it again. After reinstalling it, make sure to regenerate code in all the workspaces you already opened with MCreator 1.9.1 by clicking Build & run -> Regenerate code and build.

This most likely causes the lag. Please reply back and clarify if this helps. When a console has too much text in it due to errors, MCreator starts to lag. I will consider releasing a patch fixing this, but the core of the problem is many errors in console due to not rebuilding the workspace.

Actually, I think I forgot to regenerate the code, so you're right XD

Thank you for solving another problem :)

PATCH UPDATE 30. 9. 2019, 15:45 CEST

There were some minor bugs found in MCreator 1.9.1 so we decided to release a patch update. If you are having one of the following bugs or want to have the features added in this path and downloaded MCreator before the time of the patch, consider reinstalling version 1.9.1:

  • [Bugfix #53401] Mod dependencies did not work
  • [Bugfix #53439] Existing buttons in GUI editor could not be resized
  • [Bugfix #53287] MCreator could get extremely laggy with large console tab contents
  • [Bugfix] Duplicate mod element button did not work for some mod element types
  • Improved mob spawning in custom dimensions
  • Added template manager to preferences
  • Instead of default UI background images, custom images and mod screenshots can be used

To apply the patch (fix these bugs and get the listed features), download MCreator 1.9.1 again and install it over the current installation.

I updated to the latest patch and regenerated the code twice (using the hammer button) but it still crashes :(

And I don't know why but I can't get the full crashlog (the first half of it is removed)

Not the hammer button. This one rebuilds only, use the bandaid icon for full regeneration of code or do:

Build & run -> Regenerate code and build.

I regenerated the code using the button you said but it still lags when a tab is closed or switched with another tab

Do you still get errors in the console tab? I find this very strange as I don't get any lag with your workspace on my not that good PC.

Is there an option that you would zip the entire workspace (not export as shareable ZIP) folder from your computer and send it to my email?

Strange, I hope it stopped lagging forever :D

In 1.9.2 there will be some new performance improvements too, I have just tested some of them on your workspaces today and they worked really well :)



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.