Closed fian46 closed 1 year ago
Can you provide an example ? - otherwise It's hard to determine what to fix.
hi i found the trigger of the bug, it happened when i trying to save my script in editor while my game is still running. i think it still a bug too right ? when i disabled sync script change and sync scene change from debug menu the problem goes away.
i also find another issue in 3.1.1 when you exit the editor the sync script change and sync scene change is not saved when you opened the editor again in the future. i am not sure if this is intended but as user it is not pleasant.
Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.
I can verify this bug in 3.3, but as it occurs randomly, I haven't found a reliable way to reproduce this. But I got an error in a line in my script (160) whereas the script only has 92 lines. I am going to dig deeper. Maybe I can isolate the problem more as I continue working on my project.
Maybe it is not so random. I guess this is heavily tied to coroutines (and they are known to be problematic with script hot reload). I can provide a project privately, where you can save any script and will get a random opcode in a random file. It is not a mrp, but it would be a project usable to cause the error reliablely. In three tries, I got the opcode 0, 2, 6, 22 and 38.
I can confirm that I have the same problem. Not using the coroutine solves the issue. Changing a scene or changing a script will trigger random errors, One of which is the one above, other error can be random variables in other object's scripts to be Nil.
This sounds pretty difficult to debug without a clear way to reproduce it with a MRP. I appreciate that making a MRP for this is not trivial though so it's understandable, I just wanted to make expectations clear.
If the opcodes and error lines are seemingly random there might be some kind of race condition.
As I have stated, I can share a project on rocket chat if someone has time to look into it (although to be fair I don't even remember which project it has been, but that is solvable 😅 )
Edit: I actually think, I know which project it has been
@akien-mga What is an MRP? I could try to make a small project that tries to replicate the bug. Though after doing some reading thru the documentation, The issue occurs because the hanging state of the couroutine gets invalidated by the changing scene/script source. Hot loading puts the whole system in an invalid state. Disclaimer : I am just supposing what might happen, I am not familiar with the source code of the Godot engine.
What is an MRP?
Minimal Reproduction Project, i.e.
a small project that tries to replicate the bug.
@c64cosmin Can you (or anyone else) still reproduce this bug in Godot 3.5.1 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.
Closing due to lack of response. Please comment if you can still reproduce this bug.
PS: Since no minimal reproduction project was included in the original bug report, please upload one as well to ease troubleshooting.
Godot version: 3.1.1
OS/device including version: Linux mint 19.3
Issue description: the error is not appear in debugger but appear in log files. i enable file logging in project setting
this is the output in log file
ERROR: Condition ' (ip + 5) > _code_size ' is true. Breaking..: At: modules/gdscript/gdscript_function.cpp:441:call() - Condition ' (ip + 5) > _code_size ' is true. Breaking..: SCRIPT ERROR: Internal Script Error! - opcode #38 (report please). At: res://general_script/culling_job.gd:39:culling_job.start() - Internal Script Error! - opcode #38 (report please).
sometimes it work just fine but sometimes it just stop running and freeze
Steps to reproduce: i am not sure what is wrong
Minimal reproduction project: -