Comments (3)
Someone told me the exception stack trace won't be printed after script reloading. But I couldn't reproduce the bug.
// functions.zs
#loader crafttweaker reloadable
#priority 100
import crafttweaker.item.IItemStack;
function throwException() as void {
val item as IItemStack = null;
print(item.commandString);
}
// reload.zs
#loader crafttweaker reloadable
import crafttweaker.event.PlayerCraftedEvent;
import crafttweaker.player.IPlayer;
events.onPlayerCrafted(function(event as PlayerCraftedEvent) {
val player as IPlayer = event.player;
if (event.player.world.remote) return;
event.player.world.catenation() // builds a new catenation
.run(function(world, context) {
scripts.functions.throwException();
})
.start();
});
log:
[SERVER_STARTED][SERVER][INFO] [reloadable | SIDE_CLIENT]: Loading Script: {[0:crafttweaker|reloadable]: reload.zs}
[SERVER_STARTED][SERVER][INFO] [reloadable | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: reuse.zs} as we are currently loading with a different loader
[SERVER_STARTED][SERVER][INFO] [reloadable | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: test.zs} as we are currently loading with a different loader
[SERVER_STARTED][SERVER][INFO] [reloadable | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: testDelay.zs} as we are currently loading with a different loader
[SERVER_STARTED][SERVER][INFO] Completed script loading in: 19ms
[SERVER_STARTED][SERVER][ERROR] Exception occurred in a catenation task, stopping the catenation...
java.lang.NullPointerException
at Functions.throwException(functions.zs:7)
at CrafttweakerReloadableReload3.apply(reload.zs:10)
at youyihj.zenutils.impl.util.catenation.InstantTask.run(InstantTask.java:21)
at youyihj.zenutils.api.util.catenation.Catenation.tick(Catenation.java:48)
at youyihj.zenutils.impl.util.catenation.CatenationManager.lambda$onWorldTick$0(CatenationManager.java:31)
at youyihj.zenutils.impl.util.catenation.CatenationManager$$Lambda$1123.000000001A55B750.test(Unknown Source)
at java.util.Collection.removeIf(Collection.java:414)
at youyihj.zenutils.impl.util.catenation.CatenationManager.onWorldTick(CatenationManager.java:31)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_53_CatenationManager_onWorldTick_WorldTickEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraftforge.fml.common.FMLCommonHandler.onPreWorldTick(FMLCommonHandler.java:287)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:752)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
at java.lang.Thread.run(Thread.java:813)
Can you test whether these scripts can dump stack trace, or post your test scripts?
from zenutils.
Seems like this happen when VanillaFix
or LoliAMS
recovering from crash.
So, probably, to reproduce i need:
- Cause fatal error inside catenation (usually error that cause crash from mod)
- Dropped to main menu, enter world again
- Spawn same error with catenation again, but this time no stack trace
I will probably try to reproduce this later.
from zenutils.
Since this issue happens exceptionally rare, i could close issue. Thank you for your utils!
from zenutils.
Related Issues (20)
- [Feature] Config HOT 1
- Native Method Access HOT 1
- Template strings cant work with Unicode
- Template strings cant content comment sequence
- LateSetCoTFunction strips modid from item/block's translation key
- [Feature Request] fix CT error `"this.access" is null` when calling `IWorld.getFromID().getBlockState()`
- debug.log mixin WARN: `changeDeepNullExpression exceeds the maximum allowed value: 0.` HOT 1
- NullPointerException: `Cannot invoke "stanhebben.zenscript.ZenParsedFile.getFileName()" because the return value of "stanhebben.zenscript.parser.ParseException.getFile()" is null` HOT 3
- [Feature Request] expose GUI open event HOT 8
- [Feature Request] Iterate/list loaded chunks HOT 2
- FATAL: `Illegal character in opaque part at index 26: jar:file:[...]mcp_stable-39-1.12`
- Template string parsing error when using cast
- `zenutils-1.19.0-pre3` server errors HOT 4
- Rotation issue for COT block creation
- Override methods for custom contents
- not sure what this error is about but HOT 1
- Cannot get native java List as a returning value; Got zenscript's array instead HOT 2
- Incompatible with Cleanroom 0.2.3 HOT 9
- zenutils-1.20.4 crash `NoClassDefFoundError`
- Error in single mixin script breaking all the mixin scripts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zenutils.