Weird crash in multi-threaded game (corrupt stack)

Godot version:
3.1 beta 4
OS/device including version:
Windows 10
Issue description:
While meshes and textures were being created in a background thread, my game segfaulted.
I downloaded mingw64 and ran it through gdb, this is the result:
Thread 23 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 15756.0x1c8]
0x000000000071573f in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
(gdb) bt
#0  0x000000000071573f in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#1  0x000000000071595e in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#2  0x0000000000719295 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#3  0x0000000000726a45 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#4  0x00007ffdfc8020a1 in libgdexample!godot_nativescript_init ()
   from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#5  0x00007ffdfc7ea269 in libgdexample!godot_nativescript_init ()
   from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#6  0x00007ffdfc7d2555 in ?? () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#7  0x00007ffdfc7d3955 in ?? () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#8  0x00007ffdfc7d3822 in ?? () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#9  0x00000000018774e3 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#10 0x0000000000764441 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#11 0x00000000006d04e7 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#12 0x0000000001b08a25 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#13 0x0000000001b1810b in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#14 0x0000000000764441 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#15 0x00000000006d04e7 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#16 0x0000000001b08a25 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#17 0x0000000001b1810b in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#18 0x0000000000764441 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#19 0x00000000005772a1 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#20 0x00000000016116c9 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#21 0x00007ffe19e96975 in ntdll!A_SHAUpdate () from C:\Windows\SYSTEM32\ntdll.dll
#22 0x00007ffe19e76a60 in ntdll!RtlReleaseSRWLockExclusive () from C:\Windows\SYSTEM32\ntdll.dll
#23 0x00007ffe17bc3dc4 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#24 0x00007ffe19ec3691 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#25 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Can someone point me in the right direction for getting a better stacktrace? I've written a C++ module for this game but it's not showing line numbers or specific files so I have no idea where the problem resides

Can you try with beta5? There's a good chance this has been fixed.

Hey @hpvb I've just tried with beta5 and got pretty much the same stack trace:
Thread 25 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6296.0x464]
0x000000000070953f in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
(gdb) bt
#0  0x000000000070953f in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#1  0x000000000070975e in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#2  0x000000000070d095 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#3  0x000000000071a845 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#4  0x00007ffdfc80a231 in libgdexample!godot_nativescript_init () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#5  0x00007ffdfc7ea269 in libgdexample!godot_nativescript_init () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#6  0x00007ffdfc7d2555 in ?? () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#7  0x00007ffdfc7d3955 in ?? () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#8  0x00007ffdfc7d3822 in ?? () from C:\Users\reyit\projects\sandy-boxington\builds\libgdexample.dll
#9  0x0000000001879d03 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#10 0x0000000000758481 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#11 0x00000000006c4547 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#12 0x0000000001b0b9b5 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#13 0x0000000001b1af3b in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#14 0x0000000000758481 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#15 0x00000000006c4547 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#16 0x0000000001b0b9b5 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#17 0x0000000001b1af3b in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#18 0x0000000000758481 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#19 0x000000000056c461 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#20 0x000000000160efc9 in godot.windows.opt.debug.64!FT_Glyph_To_Bitmap ()
#21 0x00007ffe19e96975 in ntdll!A_SHAUpdate () from C:\Windows\SYSTEM32\ntdll.dll
#22 0x00007ffe19e76a60 in ntdll!RtlReleaseSRWLockExclusive () from C:\Windows\SYSTEM32\ntdll.dll
#23 0x00007ffe17bc3dc4 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll
#24 0x00007ffe19ec3691 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll
#25 0x0000000000000000 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

I don't suppose you know any way I can get line numbers and file names showing in here so I can give you better debug info?

Another thing worth noting is that this only happens if I have more than 1 thread running this function at once, so it's likely something I've done wrong in my code but I'm not sure how to see what exactly :(

I’ll try to get more specific details later, but in hopes that this helps to identify the problem...
Make a new thread, start it and do the following in the function:
Create an Image and loop through x and y, setting the pixels
Create an ImageTexture with the Image
Create a ShaderMaterial, assign a Shader and the ImageTexture
Create a SurfaceTool
Set the SurfaceTool material to the ShaderMaterial
Create a mesh programmatically using OpenSimplexNoise with the SurfaceTool (triangles mode)

I managed to create an MRP, please find it here: https://github.com/Thource/MRP-26035
The issue appears to be with creating TextureArray and assigning it to a sampler2DArray in a Shader.
It may take a few runs for you to get the crash, if you see a lot of error spam but no crash, just close it and re-run it.
I don't know what all the errors are about, I don't have them in my main game, just the crash

I can reproduce it on 3.1 beta 8 on Linux with the linked MRP. I get a lot of error spam too, slightly different each time, and eventually it crashes with free(): invalid pointer or malloc(): unsorted double linked list corrupted.

I can reproduce the crash on the master branch (996af8090) with a debug build too.
Here's example output from running it in gdb (it seems to change all the time, the backtrace also can differ):
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.

<<<hundreds more times>>>

ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Condition ' !s ' is true.
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Disconnecting nonexistent signal 'changed', slot: 1987:_shader_changed
   At: core/object.cpp:1542.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.

<<<ad lib until crash>>>

ERROR: _disconnect: Nonexistent signal: changed
   At: core/object.cpp:1531.
Thread 6 "_do_bang" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff457c700 (LWP 21845)]
HashMap<StringName, Object::Signal, HashMapHasherDefault, HashMapComparatorDefault<StringName>, (unsigned char)3, (unsigned char)8>::get_element (this=0x601c078, p_key=...)
    at ./core/hash_map.h:189
189                     Element *e = hash_table[index];

(gdb) bt
#0  HashMap<StringName, Object::Signal, HashMapHasherDefault, HashMapComparatorDefault<StringName>, (unsigned char)3, (unsigned char)8>::get_element (this=0x601c078, p_key=...)
    at ./core/hash_map.h:189
#1  0x0000000003167507 in HashMap<StringName, Object::Signal, HashMapHasherDefault, HashMapComparatorDefault<StringName>, (unsigned char)3, (unsigned char)8>::getptr (this=0x601c078,
    p_key=...) at ./core/hash_map.h:320
#2  0x0000000003161174 in Object::_disconnect (this=0x601c070, p_signal=..., p_to_object=0x7fffcc000e70, p_to_method=..., p_force=true) at core/object.cpp:1528
#3  0x0000000003165992 in Object::~Object (this=0x7fffcc000e70, __in_chrg=<optimized out>) at core/object.cpp:1993
#4  0x0000000003185496 in Reference::~Reference (this=0x7fffcc000e70, __in_chrg=<optimized out>) at core/reference.cpp:113
#5  0x0000000003196ab7 in Resource::~Resource (this=0x7fffcc000e70, __in_chrg=<optimized out>) at core/resource.cpp:402
#6  0x0000000002b8f03d in Material::~Material (this=0x7fffcc000e70, __in_chrg=<optimized out>) at scene/resources/material.cpp:99
#7  0x0000000002b906fe in ShaderMaterial::~ShaderMaterial (this=0x7fffcc000e70, __in_chrg=<optimized out>) at scene/resources/material.cpp:268
#8  0x00000000011f2528 in memdelete<Reference> (p_class=0x7fffcc000e70) at ./core/os/memory.h:120
#9  0x00000000011f1890 in Ref<Reference>::unref (this=0x7ffff45797e8) at ./core/reference.h:269
#10 0x0000000003184eb4 in RefPtr::unref (this=0x7ffff45797e8) at core/ref_ptr.cpp:82
#11 0x00000000031d8a6d in Variant::clear (this=0x7ffff45797d8) at core/variant.cpp:1103
#12 0x00000000011b72d0 in Variant::~Variant (this=0x7ffff45797d8, __in_chrg=<optimized out>) at ./core/variant.h:421
#13 0x00000000012c6f22 in GDScriptFunction::call (this=0x86b6090, p_instance=0x6820dc0, p_args=0x0, p_argcount=0, r_err=..., p_state=0x0) at modules/gdscript/gdscript_function.cpp:1588
#14 0x000000000127174c in GDScriptInstance::call (this=0x6820dc0, p_method=..., p_args=0x0, p_argcount=0, r_error=...) at modules/gdscript/gdscript.cpp:1175
#15 0x000000000315d0cb in Object::call (this=0x86fdca0, p_method=..., p_args=0x0, p_argcount=0, r_error=...) at core/object.cpp:922
#16 0x00000000031f192e in Variant::call_ptr (this=0x7ffff457ad10, p_method=..., p_args=0x0, p_argcount=0, r_ret=0x0, r_error=...) at core/variant_call.cpp:1049
#17 0x00000000012c3c6b in GDScriptFunction::call (this=0x59abb20, p_instance=0x6820dc0, p_args=0x7ffff457bd58, p_argcount=1, r_err=..., p_state=0x0)
    at modules/gdscript/gdscript_function.cpp:1070
#18 0x000000000127174c in GDScriptInstance::call (this=0x6820dc0, p_method=..., p_args=0x7ffff457bd58, p_argcount=1, r_error=...) at modules/gdscript/gdscript.cpp:1175
#19 0x000000000315d0cb in Object::call (this=0x86fdca0, p_method=..., p_args=0x7ffff457bd58, p_argcount=1, r_error=...) at core/object.cpp:922
#20 0x0000000003386d3d in _Thread::_start_func (ud=0x606aff0) at core/bind/core_bind.cpp:2420
#21 0x0000000001ac62eb in ThreadPosix::thread_callback (userdata=0x86b3e40) at drivers/unix/thread_posix.cpp:74
#22 0x000000388d60904c in start_thread () from /lib64/libpthread.so.0
#23 0x000000388d50525f in clone () from /lib64/libc.so.6

Another run which crashed right away:
(gdb) r
Starting program: /usr/local/bin/godot-git
Missing separate debuginfos, use: debuginfo-install glibc-2.29-3.mga7.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7ff9700 (LWP 22163)]
[Detaching after fork from child process 22164]
[Detaching after fork from child process 22165]
[New Thread 0x7ffff69a8700 (LWP 22166)]
OpenGL ES 3.0 Renderer: GeForce GTX 670MX/PCIe/SSE2
[New Thread 0x7ffff494f700 (LWP 22167)]
[New Thread 0x7ffff490e700 (LWP 22168)]
[New Thread 0x7ffff457c700 (LWP 22169)]
[New Thread 0x7ffff4122700 (LWP 22170)]
[New Thread 0x7ffff40e1700 (LWP 22171)]
[New Thread 0x7ffff40a0700 (LWP 22172)]
double free or corruption (!prev)

Thread 8 "_do_bang" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff40e1700 (LWP 22171)]
0x000000388d43cb8a in raise () from /lib64/libc.so.6

(gdb) bt
#0  0x000000388d43cb8a in raise () from /lib64/libc.so.6
#1  0x000000388d425524 in abort () from /lib64/libc.so.6
#2  0x000000388d47f628 in __libc_message () from /lib64/libc.so.6
#3  0x000000388d485e8a in malloc_printerr () from /lib64/libc.so.6
#4  0x000000388d48796c in _int_free () from /lib64/libc.so.6
#5  0x000000388d4898ac in _int_realloc () from /lib64/libc.so.6
#6  0x000000388d48abbb in realloc () from /lib64/libc.so.6
#7  0x00000000032882db in Memory::realloc_static (p_memory=0x7fffcc00ef90, p_bytes=256, p_pad_align=true) at core/os/memory.cpp:140
#8  0x000000000316d376 in CowData<VMap<Object::Signal::Target, Object::Signal::Slot>::Pair>::resize (this=0x7fffcc00c8a0, p_size=2) at ./core/cowdata.h:282
#9  0x000000000316d0f9 in CowData<VMap<Object::Signal::Target, Object::Signal::Slot>::Pair>::insert (this=0x7fffcc00c8a0, p_pos=1, p_val=...) at ./core/cowdata.h:174
#10 0x000000000316a219 in VMap<Object::Signal::Target, Object::Signal::Slot>::insert (this=0x7fffcc00c8a0, p_key=..., p_val=...) at ./core/vmap.h:125
#11 0x0000000003167df8 in VMap<Object::Signal::Target, Object::Signal::Slot>::operator[] (this=0x7fffcc00c8a0, p_key=...) at ./core/vmap.h:200
#12 0x0000000003160a3a in Object::connect (this=0x601c800, p_signal=..., p_to_object=0x7fffb4000e70, p_to_method=..., p_binds=..., p_flags=0) at core/object.cpp:1493
#13 0x0000000002b8fb7c in ShaderMaterial::set_shader (this=0x7fffb4000e70, p_shader=...) at scene/resources/material.cpp:197
#14 0x0000000002bc2cfd in MethodBind1<Ref<Shader> const&>::call (this=0x5be8980, p_object=0x7fffb4000e70, p_args=0x7ffff40de808, p_arg_count=1, r_error=...)
    at ./core/method_bind.gen.inc:729
#15 0x000000000315d1eb in Object::call (this=0x7fffb4000e70, p_method=..., p_args=0x7ffff40de808, p_argcount=1, r_error=...) at core/object.cpp:943
#16 0x00000000031f192e in Variant::call_ptr (this=0x7ffff40de7a8, p_method=..., p_args=0x7ffff40de808, p_argcount=1, r_ret=0x0, r_error=...) at core/variant_call.cpp:1049
#17 0x00000000012c3c6b in GDScriptFunction::call (this=0x59abb10, p_instance=0x86afc00, p_args=0x0, p_argcount=0, r_err=..., p_state=0x0) at modules/gdscript/gdscript_function.cpp:1070
#18 0x000000000127174c in GDScriptInstance::call (this=0x86afc00, p_method=..., p_args=0x0, p_argcount=0, r_error=...) at modules/gdscript/gdscript.cpp:1175
#19 0x000000000315d0cb in Object::call (this=0x68277f0, p_method=..., p_args=0x0, p_argcount=0, r_error=...) at core/object.cpp:922
#20 0x00000000031f192e in Variant::call_ptr (this=0x7ffff40dfd10, p_method=..., p_args=0x0, p_argcount=0, r_ret=0x0, r_error=...) at core/variant_call.cpp:1049
#21 0x00000000012c3c6b in GDScriptFunction::call (this=0x5e07a20, p_instance=0x86afc00, p_args=0x7ffff40e0d58, p_argcount=1, r_err=..., p_state=0x0)
    at modules/gdscript/gdscript_function.cpp:1070
#22 0x000000000127174c in GDScriptInstance::call (this=0x86afc00, p_method=..., p_args=0x7ffff40e0d58, p_argcount=1, r_error=...) at modules/gdscript/gdscript.cpp:1175
#23 0x000000000315d0cb in Object::call (this=0x68277f0, p_method=..., p_args=0x7ffff40e0d58, p_argcount=1, r_error=...) at core/object.cpp:922
#24 0x0000000003386d3d in _Thread::_start_func (ud=0x86b5260) at core/bind/core_bind.cpp:2420
#25 0x0000000001ac62eb in ThreadPosix::thread_callback (userdata=0x6280460) at drivers/unix/thread_posix.cpp:74
#26 0x000000388d60904c in start_thread () from /lib64/libpthread.so.0
#27 0x000000388d50525f in clone () from /lib64/libc.so.6

This is (another) use-after-free bug.

The problem appears to be that setting a shader isn't a threadsafe operation. Trying to figure out why now.

So this is not a bug. The problem is that any resource that's loaded only exists once. Trying to manipulate a resource from multiple threads (in this case assigning it to multiple materials in multiple threads) causes memory corruption.
This is expected behavior.

@hpvb Could you please provide an example of how I could make this threadsafe?


Completely ignore arrays for Prettier

Proposal
It would be really awesome, if there was an option to "disable arrays" for Prettier completely.
You can think of it as before every line with array there would be // prettier-ignore.
Reasoning
I'm using Prettier with ESLint (I'm sure I'm not the only one), and I would prefer to manually sometimes have each element on newline or all elements on single line - for that reasons I have 2 rules in .eslintrc:
"array-bracket-newline": ["error", "consistent"],
"array-element-newline": ["error", "consistent"],

and I would like Prettier to completely not care about arrays and let eslint --fix deal with arrays.

Ah, nice use case! However, I think this request is out of scope for this plugin: this plugin is specifically used for forcing multiline arrays.


fix(count): use asterisk if not distinct by field is given

Contributor checklist

[ ] Bug fixes include regression tests
[ ] Features include unit/acceptance tests

Hi @zachdaniel
There is no value in using count(^field) in this case or am I wrong? We use the ash framework in a project with millions of entries. If we use count(*) instead of count(^field) (for example for the offset pagination), the time for the count action goes down from > 1sec to a couple of milliseconds.

This makes sense! I'll update the PR on Monday (Switzerland timezone ;-))

🚀 Thank you for your contribution! 🚀


Contact us page

I would like to work on this under DevIncept. I would like to design contact us page for the user where details will be required such as their name, mail address, and phone number and the user can send their query through mail to us. I have designed a website for a restaurant. Please assign this to me.

Hello , I would like to work on this issue under the DevIncept Contribution program.  Please assign this issue to me.

hello i would like to
work on this issue

You can start working on contact page

I would like to work on this issue @sifa123

@sifa123 Please assign this issue to me. I have this contact section code ready.


refactor: change Coinbase SDK import to dynamic in coinbaseSDKWallet.ts

#3329  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on  Graphite


Oauth Authentication Needed for Sql Azure Database

Thanks @nusairi -- is there a specific article you had in mind for this info?


fix smack 4.0.7 can't login issue which described as NoResponseException

When attempt to login against ejabberd 17.11, it response with like below:

Exception in thread "main" org.jivesoftware.smack.SmackException$NoResponseException
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:1 91)
at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:1 75)
at org.jivesoftware.smack.XMPPConnection.bindResourceAndEstablishSession(XMPPConne ction.java:530)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.login(XMPPTCPConnection.java:260)

the issue also described here: https://discourse.igniterealtime.org/t/smack-4-0-4-communigate-pro-login-issue/72716/6
For workaround this, upgrade smack version to 4.1.0-alpha3 which fix the issue and has no significant change.

Thanks!


fix "unmarshaled from TOML" bug

when you run with "go run ./cmd/server/main.go -config config.toml"
you would get "load config err : only a pointer to struct or map can be unmarshaled from TOML"
it was a pointer error at cmd/server/main.go line 72

这种小的问题可以提个 issue 哈，希望理解，期待你的下一次 Pr！


Add docker development environment

I wanted to make a small contribution but I didn't want to setup a database server on my local machine so I ended up making this PR.
My goal was to make getting started with development as easy and straightforward as possible.
This PR adds a complete Docker Compose development environment.
Improvements:

You don't need any dependencies installed on your computer (composer, php, mysql, node etc.), only Docker and Docker Compose
Added an admin user to DummyContentSeeder
Straightforward setup in 6 steps. (See changes in readme.md)
After the first setup, one only needs to run docker-compose up to spin up the entire development environment (php server, mysql server, npm run watch)

I would love to see something like this.
Currently trying to spin the project up to create a PR and test it has been a lot more complex than it really should be.

For now, you can just check out my branch, make changes and then check out master and commit.
It would be great if @ssddanbrown might take a look at this.

For now, you can just check out my branch, make changes and then check out master and commit.
It would be great if @ssddanbrown might take a look at this.

For now I'm just running a mysql container via docker, then running the frontend build and app on my local machine (app via php artisan serve).

Sorry for my really late response on this and thanks for offering this pull request @timoschwarzer.
I can definitely see how this would be valuable to those wanting to help develop BookStack. There's a few things I'd want to tweak before merging into master though:

I'd prefer not to litter the top-level folder with additional example configs. I think we should be able to make the .env.example.docker-development redundant by setting env vars in the app container to override DB details.
I think we can avoid having an additional DB connection via the same method as above.
I don't think the additional dummy content seeder is needed. An admin user is created during normal migration. Think it confuses things having a different initial login for docker-dev and non-docker-dev/production.
I'd prefer not to have any files or folders with docker in the name within the top-level folder, especially the docker-compose.yml file.  I'm worried people will just directly use these thinking they're some kind of official docker production offerings which is something I'd prefer to avoid. Instead, we should probably put this all into a /dev folder.

Thank you for your response :)
I think these are all valid points I agree with.
I didn't notice that the migrations create an admin user, that's why I added that seed. Is it documented somewhere?
I'll work on this the next 1-2 weeks then.

@ssddanbrown

I'd prefer not to litter the top-level folder with additional example configs. I think we should be able to make the .env.example.docker-development redundant by setting env vars in the app container to override DB details.

Done. Settings are now set via environment variables inside docker-compose.yml.

I think we can avoid having an additional DB connection via the same method as above.

Same.

I don't think the additional dummy content seeder is needed. An admin user is created during normal migration. Think it confuses things having a different initial login for docker-dev and non-docker-dev/production.

Removed the dummy content seeder and added docs for the initial admin user.

I'd prefer not to have any files or folders with docker in the name within the top-level folder, especially the docker-compose.yml file. I'm worried people will just directly use these thinking they're some kind of official docker production offerings which is something I'd prefer to avoid. Instead, we should probably put this all into a /dev folder.

I disagree with this one.

The docker directory only contains Docker related files and I don't think someone will think that these are production-ready assets because these are all contained in a dev subdirectory.
I'd be against putting the docker-compose.yml somewhere other than the project root directory. Typing docker-compose -f docker/dev/docker-compose.yml <command> [args] all the time is not that great and the docker-compose.yml states in its first two lines that it's intended for development purposes only.

Thanks for the changes.
In regards to the directory bits, I was thinking about more of a middle ground, With a structure like this:
├── dev
│   ├── docker
│   │   ├── Dockerfile
│   │   ├── entrypoint.app.sh
│   │   └── entrypoint.node.sh
│   └── docker-compose.yml

That way it keeps docker references out of the top-level and should allow someone to just cd into the dev folder then run any composer commands like normal. I know it's not as easy as having them in the top level, and I realise I'm sounding a bit paranoid about this, but I do think that by having a docker-compose.yml in the top level people will just run it without thinking or reading the comments in the file. Just the action of them having to go into the dev dir will massively defend against that.

I've made the changes you requested but I have to admit that I'm not happy with the docker-compose.yml not being in the project root.

Running composer/artisan/docker-compose commands requires switching directories all the time
The docker-compose.yml now is really weird with its paths because some of them are relative to context (which is now ..) and some aren't

but I do think that by having a docker-compose.yml in the top level people will just run it without thinking or reading the comments in the file.

I don't see a problem with this. I mean, who clones a source repository and just blindly runs docker-compose up in it in a production environment? I don't know any project with Docker development support which has problems with people just blindly running the top-level docker-compose.yml in production.
Some could also just run artisan serve or ./server.php. Should we move these files to dev/, too? I don't think so. :)

Quoting from the Docker page: "Compose has traditionally been focused on development and testing workflows", and you cannot throw this docker-compose.yml into a Swarm cluster by accident because it won't work.

Note to myself @timoschwarzer: Fix CI tests

Thanks @timoschwarzer, Now merged.
I moved the compose file back into the root folder, I thought your reasonings were fair and think I was being overly paranoid. .

I see you fixed/reverted the tests, too. Thanks! :)


Transcode Folder Location

I was wondering where the Transcode folder location is?
I have a docker stack and it is running on an SSD and media is located on a NAS share via HDDs. Not sure if it is transcoding it to ram, or transcoding to a file stored somewhere, but I would like to mount the directory via the NAS HDDs location through docker instead of a local location via the SSD to try and prevent pre-mature wear on the SSDs.

It depends on which version of ETV you are using, e.g. for docker I use tmpfs like --tmpfs /root/.local/share/etv-transcode.
Can you paste the version found below the left menu?

I have 0.6.9-beta-docker. So it would just be as simple as mapping the NAS location for the transcode to the /root/.local/share/etv-transcode within my docker-compose file?


Please support Vargargs

Please take a look at:
http://java.sun.com/j2se/1.5.0/docs/guide/language/varargs.html
So this code is going to work with java but not in beanshell.
public class foo {
    public static void bar(String... a){
        print(a.length);
    }
}

// Error: Parser Error: Parse error at line 5, column 32.  Encountered: .
bsh % // Error: Parser Error: Parse error at line 1, column 3.  Encountered: )
bsh % // Error: EvalError: Class or variable not found: a.length : at Line: 2 : in file: <unknown file> : a .length
bsh % // Error: Parser Error: Parse error at line 4, column 1.  Encountered: }
This is a feature from java itself many people are waiting for, please support this in beanshell too.
Thanks
Chris
Reported by: somefreestring
Original Ticket: "beanshell/feature-requests/16":https://sourceforge.net/p/beanshell/feature-requests/16

Varargs implemented on 3.0.0-SNAPSHOT.841
bsh % public class foo {
    public static void bar(String... a){
        print(a.length);
    }
}
--> $1 = class foo :Class
bsh % foo.bar(new String[] {"1","2","3"});
3I :int
--> void

Closed works as expected.


Github sync translation update for PT-BR

Updating PT-BR translations with new doc content, starting with Github sync.

Fixing a mistake on lang version files.

Awesome, thank you so much @bellentani 🎉


Ad0: Ruby IT Sat campaign

I'm sorry, that was added by mistake

:smile: what are you guys doing here?

@moklick heh, we forked this theme for our site, I wanted to make PR to the fork but Github uses repo by default ;)
Thank you for the theme BTW :+1:

no problem :)