Unable to use Event Markers created in the Viewer as cutting bounds in the Edit window
LunarEclipse363 opened this issue ยท 2 comments
I wanted to cut out some parts of a replay, but do it precisely.
I realized that the start and end markers in the Edit menu accessible from the Replay List seem to be just normal markers with special names: _RM_START_CUT
and _RM_END_CUT
.
I decided to rename two markers to the aformentioned names to see if I could set them from the Viewer that way.
Sure enough they appeared in the Edit window as if I had added them with the buttons available there. Then I pressed Apply...
Expected behavior
The marked area gets cut out of the replay successfully.
Actual behavior
The plugin throws an error (log attached below):
Crash Report (click to expand)
---- Minecraft Crash Report ----
// My bad.
Time: 12/21/20 1:42 AM
Description: Running marker processor
java.lang.NullPointerException: Running marker processor
at com.replaymod.replaystudio.filter.SquashFilter.onEnd(SquashFilter.java:542)
at com.replaymod.editor.gui.MarkerProcessor.apply(MarkerProcessor.java:188)
at com.replaymod.editor.gui.GuiEditReplay.lambda$apply$10(GuiEditReplay.java:158)
at java.lang.Thread.run(Thread.java:748)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.16.4
Minecraft Version ID: 1.16.4
Operating System: Linux (amd64) version 5.9.11-arch2-1
Java Version: 1.8.0_265, Oracle Corporation
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 585498160 bytes (558 MB) / 2725249024 bytes (2599 MB) up to 3817865216 bytes (3641 MB)
CPUs: 12
JVM Flags: 2 total; -Xms409m -Xmx4096m
Fabric Mods:
cloth-basic-math: Cloth Basic Math 0.5.1
cloth-config2: Cloth Config v4 4.7.0-unstable
fabric: Fabric API 0.28.3+1.16
fabric-api-base: Fabric API Base 0.2.0+ab87788d3a
fabric-biome-api-v1: Fabric Biome API (v1) 3.1.0+2e23b97c3a
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.4+6a2618f53a
fabric-command-api-v1: Fabric Command API (v1) 1.0.9+6a2618f53a
fabric-commands-v0: Fabric Commands (v0) 0.2.0+6a2618f53a
fabric-containers-v0: Fabric Containers (v0) 0.1.9+a03e98793a
fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.0+e77439c73a
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.2+b7f9825d3a
fabric-dimensions-v1: fabric-dimensions-v1 2.0.1+9a6c75813a
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.1+6a2618f53a
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.0+6a2618f53a
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.3+a4467d2a3a
fabric-item-api-v1: Fabric Item API (v1) 1.2.0+6a2618f53a
fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.1+6a2618f53a
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.1+730711c63a
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.0+3fa9f7c53a
fabric-language-kotlin: Fabric Language Kotlin 1.4.0+build.1
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.2.0+ffb68a873a
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.1+6a2618f53a
fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.2+6a2618f53a
fabric-models-v0: Fabric Models (v0) 0.1.1+6a2618f53a
fabric-networking-api-v1: Fabric Networking API (v1) 1.0.0+4358fbc63a
fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.7+a03e98793a
fabric-networking-v0: Fabric Networking (v0) 0.3.1+2a4333d33a
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.9.2+6a2618f53a
fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.1+6a2618f53a
fabric-particles-v1: fabric-particles-v1 0.2.2+6a2618f53a
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.3+be155ae23a
fabric-renderer-api-v1: Fabric Renderer API (v1) 0.3.3+6a2618f53a
fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.3+6a2618f53a
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 2.2.0+6a2618f53a
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.4+6a2618f53a
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.12+6a2618f53a
fabric-rendering-v0: Fabric Rendering (v0) 1.1.1+6a2618f53a
fabric-rendering-v1: Fabric Rendering (v1) 1.4.0+6a2618f53a
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.3.2+1944f3e03a
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.0+6a2618f53a
fabric-structure-api-v1: Fabric Structure API (v1) 1.1.1+f1d8af063a
fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.0+e77439c73a
fabric-textures-v0: Fabric Textures (v0) 1.0.5+6a2618f53a
fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.5+6a2618f53a
fabricloader: Fabric Loader 0.10.8
fiber: fiber 0.23.0-2
inventoryprofiles: Inventory Profiles 0.4.2
lithium: Lithium 0.6.0
lithium-api: Lithium API 0.6.0
malilib: MaLiLib 0.10.0-dev.21+arne.2
minecraft: Minecraft 1.16.4
modmenu: Mod Menu 1.14.13+build.19
okzoomer: Ok Zoomer 4.0.1+1.16.2
org_jetbrains_annotations: annotations 20.0.0
org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.4.0
org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.4.0
org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.4.0
org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.4.0
org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.3.9
phosphor: Phosphor 0.7.0+build.10
replaymod: Replay Mod 1.16.4-2.5.1
sodium: Sodium 0.1.0
splash: Splash 1.2.0
Steps to reproduce
- Record a replay
- Open it in the Viewer
- Add at least one Event Marker, name it either
_RM_START_CUT
or_RM_END_CUT
- Exit the Viewer
- Open the replay list, select the replay, and press "Edit"
- Without moving the existing marker, either add more markers so they create proper bounds, or do not.
- Press Apply
Other details
The only visible difference between the Markers created by the Edit menu buttons and ones created in the Viewer that I could find was that all fields except the time code were 0 in the ones created via the Edit buttons. I tried zeroing them in the ones created in the Viewer, but still got the same result.
Another detail: the log file provided above was actually created when the start Marker was created with a button in the Edit window, and the first end Marker was created in the Viewer. I'm attaching another log in which both the start and the end Markers were created in the Viewer below:
Crash Report (click to expand)
---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.
Time: 12/21/20 2:18 AM
Description: Running marker processor
java.lang.NullPointerException: Running marker processor
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.16.4
Minecraft Version ID: 1.16.4
Operating System: Linux (amd64) version 5.9.11-arch2-1
Java Version: 1.8.0_265, Oracle Corporation
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 1937351472 bytes (1847 MB) / 3327131648 bytes (3173 MB) up to 3817865216 bytes (3641 MB)
CPUs: 12
JVM Flags: 2 total; -Xms409m -Xmx4096m
Fabric Mods:
cloth-basic-math: Cloth Basic Math 0.5.1
cloth-config2: Cloth Config v4 4.7.0-unstable
fabric: Fabric API 0.28.3+1.16
fabric-api-base: Fabric API Base 0.2.0+ab87788d3a
fabric-biome-api-v1: Fabric Biome API (v1) 3.1.0+2e23b97c3a
fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.4+6a2618f53a
fabric-command-api-v1: Fabric Command API (v1) 1.0.9+6a2618f53a
fabric-commands-v0: Fabric Commands (v0) 0.2.0+6a2618f53a
fabric-containers-v0: Fabric Containers (v0) 0.1.9+a03e98793a
fabric-content-registries-v0: Fabric Content Registries (v0) 0.2.0+e77439c73a
fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.2+b7f9825d3a
fabric-dimensions-v1: fabric-dimensions-v1 2.0.1+9a6c75813a
fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.1+6a2618f53a
fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.0+6a2618f53a
fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.3+a4467d2a3a
fabric-item-api-v1: Fabric Item API (v1) 1.2.0+6a2618f53a
fabric-item-groups-v0: Fabric Item Groups (v0) 0.2.1+6a2618f53a
fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.1+730711c63a
fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.0+3fa9f7c53a
fabric-language-kotlin: Fabric Language Kotlin 1.4.0+build.1
fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.2.0+ffb68a873a
fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.1+6a2618f53a
fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.2+6a2618f53a
fabric-models-v0: Fabric Models (v0) 0.1.1+6a2618f53a
fabric-networking-api-v1: Fabric Networking API (v1) 1.0.0+4358fbc63a
fabric-networking-blockentity-v0: Fabric Networking Block Entity (v0) 0.2.7+a03e98793a
fabric-networking-v0: Fabric Networking (v0) 0.3.1+2a4333d33a
fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.9.2+6a2618f53a
fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.1+6a2618f53a
fabric-particles-v1: fabric-particles-v1 0.2.2+6a2618f53a
fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.7.3+be155ae23a
fabric-renderer-api-v1: Fabric Renderer API (v1) 0.3.3+6a2618f53a
fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.3+6a2618f53a
fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 2.2.0+6a2618f53a
fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.1.4+6a2618f53a
fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.12+6a2618f53a
fabric-rendering-v0: Fabric Rendering (v0) 1.1.1+6a2618f53a
fabric-rendering-v1: Fabric Rendering (v1) 1.4.0+6a2618f53a
fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.3.2+1944f3e03a
fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.0+6a2618f53a
fabric-structure-api-v1: Fabric Structure API (v1) 1.1.1+f1d8af063a
fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.1.0+e77439c73a
fabric-textures-v0: Fabric Textures (v0) 1.0.5+6a2618f53a
fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.2.5+6a2618f53a
fabricloader: Fabric Loader 0.10.8
fiber: fiber 0.23.0-2
inventoryprofiles: Inventory Profiles 0.4.2
lithium: Lithium 0.6.0
lithium-api: Lithium API 0.6.0
malilib: MaLiLib 0.10.0-dev.21+arne.2
minecraft: Minecraft 1.16.4
modmenu: Mod Menu 1.14.13+build.19
okzoomer: Ok Zoomer 4.0.1+1.16.2
org_jetbrains_annotations: annotations 20.0.0
org_jetbrains_kotlin_kotlin-reflect: kotlin-reflect 1.4.0
org_jetbrains_kotlin_kotlin-stdlib: kotlin-stdlib 1.4.0
org_jetbrains_kotlin_kotlin-stdlib-jdk7: kotlin-stdlib-jdk7 1.4.0
org_jetbrains_kotlin_kotlin-stdlib-jdk8: kotlin-stdlib-jdk8 1.4.0
org_jetbrains_kotlinx_kotlinx-coroutines-jdk8: kotlinx-coroutines-jdk8 1.3.9
phosphor: Phosphor 0.7.0+build.10
replaymod: Replay Mod 1.16.4-2.5.1
sodium: Sodium 0.1.0
splash: Splash 1.2.0
Additionally, I found that moving the markers inside the Edit window stops this issue from occuring. This is not a valid workaround though because as said in the beginning, I wanted to make precise cuts.
There should not be any functional difference between markers created via the Edit window vs inside the Viewer (or in fact during recording via the Start/Stop/Pause/Resume buttons, cause that's all those do).
My best guess would be that there's just a bug in the editing code which happens to get triggered if there's a marker where you want it to be but not if it's in a different spot.
Looking at the code, I think I might know what causes it. Could you attach your replay with the broken markers (i.e. right before step 7), so I can verify that my suspicion is correct?
Afaict the issue can only occur when the edit functionality is used more than once (the first time was when you used the Start/Stop/Pause/Resume buttons during recording). Therefore a possible workaround for your specific case could be to use the raw version (without Start/Stop/Pause/Resume) of the replay and cut that one instead.
If your replay was recorded less than 21 days ago, you should be able to find the raw version is .minecraft/replay_recordings/raw/
(just move it one folder up for it to become visible ingame). There may be multiple replays in there with similar names (we create a backup each time the edit function is used), the original one is probably the one with the largest file size.
Note to self:
I actually edited the replay before once, as it was 2 hours long and that seemed to make the quick mode glitchy (blocks not appearing when they have already been placed etc), so your suspicion is probably correct.
I wasn't sure if this mod would make backups so I made them myself just to be sure, but I'm happy to see it does create them.
Here's the replay file so you can verify it though:
https://drive.google.com/file/d/15T30hIsDYApQcPAqehhS3gI0c9isRbj4/view?usp=sharing