Core error while doing a lot of sqlite queries
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 28/100
Hướng nghiên cứu
Bắt đầu với com.laytonsmith.core.functions.SQL$query.getConnection và exec trong SQL.java, sau đó tái hiện lỗi bằng cách chạy các SQLite inserts lặp lại thông qua foreach/procedure được示示. Kiểm tra lý do kết nối SQLite bị lỗi sau các truy vấn kéo dài và xác minh rằng các truy vấn lặp lại vẫn tiếp tục thực thi thành công mà không dừng các truy vấn từ các package khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
CMDHELPER-3107 - Reported by redwall_hp
I'm writing a sort of exporter script to fill a new sqlite database with a large quantity of data exported from CommandHelper's persistance.db and a Java serialized store. Functionally, everything is in working order, but when the command runs and all of the functions run in series—executing a lot of sqlite queries in the process—CommandHelper starts throwing errors like this one after 30-60 seconds of work.
I'm fairly certain that it's related to the querying, since I can take an individual one of my functions—any of several—and invoke it excessively with a for loop to trigger the same sort of error. e.g. this one:
proc(_chce_export_channel_bulletins, @channel, @bulletins,
foreach(@bulletins, @bulletin,
@result = query("clanchatexport", "INSERT INTO `clanchat_bulletins` (channel, message) VALUES(?, ?);", @channel, @bulletin)
)
)
As you can see, it's just looping through an array of strings and inserting the lines. Nothing out of the ordinary. (Except I'd use transactions if CommandHelper had an API for that, instead of going about it this inefficiently...) Now, if I fed this function enough data (or cheated and invoked it with the same data and a for loop several times) the errors start coming, and CommandHelper seemingly ceases to process any sqlite queries, even from other packages.
The error in question:
[20:35:44 ERROR]: Uh oh! You've found an error in Core.
This is an error caused while running your code, so you may be able to find a workaround, but is ultimately an error in Core itself.
The line of code that caused the error was this:
@name = '[removed]'
@channel = '[removed]'
@is_manager = 0
@uuid = '[removed]'
query('clanchatexport', 'INSERT INTO `clanchat_members` (channel, uuid, name, manager, subscribed) VALUES(?, ?, ?, ?, ?);', @channel, @uuid, @name, @is_manager, 1)
on or around /CraftBukkit/CH-1.8/plugins/CommandHelper/LocalPackages/ExportClanchat/auto_include.ms:122.
Please report this error to the developers, and be sure to include the version numbers:
Server version: 1.8.8-R0.1-SNAPSHOT;
CommandHelper version: 3.3.1-SNAPSHOT.2949-;
Loaded extensions and versions:
Core (version 3.3.1);
SKCompat (version 1.0.4);
Here's the stacktrace:
java.lang.NullPointerException
at org.sqlite.NestedDB$CausedSQLException.fillInStackTrace(NestedDB.java:649)
at java.lang.Throwable.<init>(Throwable.java:250)
at java.lang.Exception.<init>(Exception.java:54)
at java.sql.SQLException.<init>(SQLException.java:140)
at org.sqlite.NestedDB$CausedSQLException.<init>(NestedDB.java:626)
at org.sqlite.NestedDB._open(NestedDB.java:63)
at org.sqlite.DB.open(DB.java:86)
at org.sqlite.Conn.open(Conn.java:140)
at org.sqlite.Conn.<init>(Conn.java:57)
at org.sqlite.JDBC.createConnection(JDBC.java:77)
at org.sqlite.JDBC.connect(JDBC.java:64)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at com.laytonsmith.core.functions.SQL$query.getConnection(SQL.java:136)
at com.laytonsmith.core.functions.SQL$query.exec(SQL.java:171)
at com.laytonsmith.core.Script.eval(Script.java:354)
at com.laytonsmith.core.Script.eval(Script.java:323)
at com.laytonsmith.core.Script.eval(Script.java:323)
at com.laytonsmith.core.functions.DataHandling$foreach.execs(DataHandling.java:741)
at com.laytonsmith.core.Script.eval(Script.java:313)
at com.laytonsmith.core.Procedure.execute(Procedure.java:214)
at com.laytonsmith.core.Procedure.cexecute(Procedure.java:165)
at com.laytonsmith.core.Script.eval(Script.java:282)
at com.laytonsmith.core.Script.eval(Script.java:323)
at com.laytonsmith.core.functions.DataHandling$foreach.execs(DataHandling.java:741)
at com.laytonsmith.core.Script.eval(Script.java:313)
at com.laytonsmith.core.Procedure.execute(Procedure.java:214)
at com.laytonsmith.core.Procedure.cexecute(Procedure.java:165)
at com.laytonsmith.core.Script.eval(Script.java:282)
at com.laytonsmith.core.Script.eval(Script.java:323)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1985)
at com.laytonsmith.core.MethodScriptCompiler.execute(MethodScriptCompiler.java:1942)
at com.laytonsmith.core.Script.run(Script.java:195)
at com.laytonsmith.core.AliasCore.alias(AliasCore.java:167)
at com.laytonsmith.commandhelper.CommandHelperServerListener.onServerCommand(CommandHelperServerListener.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
at net.minecraft.server.v1_8_R3.DedicatedServer.aO(DedicatedServer.java:407)
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:375)
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:653)
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:556)
at java.lang.Thread.run(Thread.java:744)
- Ngôn ngữ chính
- Java
- Star
- 128
- Fork
- 70
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của EngineHub/CommandHelper
-
discussion wanted documentation
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
EngineHub/CommandHelper#1403 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
EngineHub/CommandHelper#1370 · 1 bình luận ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
EngineHub/CommandHelper#1354 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
EngineHub/CommandHelper#1349 · 3 bình luận ·
-
bug
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
EngineHub/CommandHelper#1341 · 2 bình luận ·
Tất cả issue của EngineHub/CommandHelper
Issue tương tự
-
certification
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Đang mởbug ecr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Needs: Triage Type: Feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
github/copilot-sdk#2760 ·