Travellerrr / AronaBot

机器人阿洛娜的额外功能插件
GNU Affero General Public License v3.0
11 stars 1 forks source link

读取字体报错 #2

Closed Natane0808 closed 6 months ago

Natane0808 commented 6 months ago

2024-04-20 09:13:30 E/AronaBot: java.lang.RuntimeException: java.io.IOException: Problem reading font data. java.lang.RuntimeException: java.io.IOException: Problem reading font data. at AronaBot-1.0.1.mirai2.jar//cn.travellerr.tools.GFont.init(GFont.java:15) at AronaBot-1.0.1.mirai2.jar//cn.travellerr.AronaBot.onEnable(AronaBot.java:36) at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnEnable$mirai_console(JvmPluginInternal.kt:244) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:393) at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.enable(BuiltInJvmPluginLoaderImpl.kt:40) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt) at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.enable(JvmPluginLoader.kt:54) at net.mamoe.mirai.console.plugin.PluginManager.enablePlugin(PluginManager.kt:173) at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.enableAllLoadedPlugins$mirai_console(PluginManagerImpl.kt:193) at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:360) at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:512) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:182) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:181) at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:59) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.itxtech.mcl.Utility.bootJars(Utility.java:86) at org.itxtech.mcl.Utility.bootJars(Utility.java:76) at org.itxtech.mcl.Utility.bootMirai(Utility.java:98) at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:113) at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:123) at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:196) at org.itxtech.mcl.Loader.tryCatching(Loader.java:151) at org.itxtech.mcl.Loader.start(Loader.java:196) at org.itxtech.mcl.Loader.main(Loader.java:84) Caused by: java.io.IOException: Problem reading font data. at java.desktop/java.awt.Font.createFont0(Font.java:1205) at java.desktop/java.awt.Font.createFont(Font.java:1076) at AronaBot-1.0.1.mirai2.jar//cn.travellerr.tools.GFont.init(GFont.java:13) ... 24 more

Travellerrr commented 6 months ago

能否详细给一下运行mcl的设备系统信息和复现手段?我在Linux Debian系统与Windows11系统上都没有发现这个报错……

Natane0808 commented 6 months ago

系统是Rocky Linux

image

在mcl一开始启动时就会报错

image

image

Travellerrr commented 6 months ago

系统是Rocky Linux

image

在mcl一开始启动时就会报错

image

image

尝试使用一下最新版的插件,配置自定义字体路径或许能够解决,只不过可能图片中的文字会有一点偏移

Natane0808 commented 6 months ago

找到原因了,系统太干净,fontconfig没有装。yum install -y fontconfig一下就好了