Display of nerdtree broken. When deleting lines, artifact appears in the nerdtree windows.

Environment

Operating System: Ubuntu 20.04
Vim/Neovim version 0.7.2
NERDTree version, found on first line of quickhelp ?: 6.10.16
Are you using any of these NERDTree-dependent plugins? No nerdtree dependent plugin.
Provide a minimal .vimrc file that will reproduce the issue.

call plug#begin()
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' }
Plug 'preservim/nerdtree'
call plug#end()
" Telescope config
" Find files using Telescope command-line sugar.
nnoremap <silent>;f <cmd>Telescope find_files<cr>
nnoremap <silent>;g <cmd>Telescope live_grep<cr>
nnoremap <silent>;b <cmd>Telescope buffers<cr>
nnoremap <silent>;h <cmd>Telescope help_tags<cr>
" Nerdtree
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>

Steps to Reproduce the Issue
Open a nerdtree windows within a js file. Delete a few lines, they will glitch and appear stuck to the nerdtree side.
Current Behavior (Include screenshots where appropriate.)

Expected Result
There should be not artifact within the nerdtree windows.

If I'm not mistaken this artifact is happening in older versions of Windows terminal, I used to experience similar issues. They have a new render engine called "Atlas", consider turning this option on even if your problem gets solved with the update, And maybe you can switch to the Windows terminal preview version as it proved to be stable enough and has some cutting-edge features.
Here is my attempt to recreate it with your config using WSL(which I think is your environment, or perhaps it's an SSH connection?)


Fix arrow start in conditional expression

Also, fixed optional being serialized as "elements"

Thanks!! I were too busy and I couldn't review my own patch throughtfully


[test] Update IRGen/raw_layout.swift test failure

On platforms with pointer authentication, these produce slightly different symbols.
Resolves: rdar://129065473

@swift-ci please smoke test


[Extensibility Request] codeunit 7322 “Create Inventory Pick/Movement”

Could you please add an external procedure to suppress the commit in the codeunit 7322?
//+new
var
    SuppressCommitGlobal: Boolean;

procedure SetSuppressCommit(SuppressCommit: Boolean)
begin
    SuppressCommitGlobal := SuppressCommit;
end;
//-new

local procedure MakeHeader()
var
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeMakeHeader(WhseActivHeader, AutoCreation, IsHandled);
    if IsHandled then
        exit;

    if AutoCreation and not LineCreated then begin
        WhseActivHeader."No." := '';
        WhseActivHeader.Insert(true);
        UpdateWhseActivHeader(WhseRequest);
        NextLineNo := 10000;
        if not SuppressCommitGlobal then //New
            Commit();
    end;
end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


reflect.DeepEqual trippin

Empty slices are functionally equal to nil through the Go system. You can do bb1 := []int{} or var bb2 []int and get the same runtime behavior.
reflect.DeepEqual is a nuisance with its insistence that bb1 is not bb2. This breaks tests. This breaks QuickCheck. Gah!

There's nothing to be done here, so closing.

See  #12918, in particular https://github.com/golang/go/issues/12918#issuecomment-147720864:

This is working as intended. reflect.DeepEqual aims to replicate the language's == operator for cases where the language permits a comparison. []byte{} == nil will return false.


Cannot start docker image on Fedora

System Info
What am I trying to do?
Start the LLM in docker using:
export volume=$PWD/data
docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.1.0 --model-id tiiuae/falcon-7b-instruct
What happens:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
ERRO[0002] error waiting for container:
What did I expect to happen?
The container should start and I can call the model with curl
System Info
Fedora 38
Docker version 24.0.6, build ed223bc
NVIDIA Container Toolkit:
Version      : 1.14.2
Release      : 1
Architecture : x86_64
Size         : 2.6 M
Source       : nvidia-container-toolkit-1.14.2-1.src.rpm
Information

[X] Docker
[ ] The CLI directly

Tasks

[X] An officially supported command
[ ] My own modifications

Reproduction
export volume=$PWD/data
docker run --gpus all --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/huggingface/text-generation-inference:1.1.0 --model-id tiiuae/falcon-7b-instruct
Expected behavior
The container should start and I can call the model with curl

Same issue here. New install for Ubuntu 22.04.3 LTS having the exact same issue.

Seems related to https://github.com/NVIDIA/nvidia-docker/issues/1746?

try with sudo, it's a permission problem

Thanks. I'll give it a crack. But just a comment - running a container with sudo breaks all of the security best practices. If the image needs to be run as root then that is a good reason to not use this project...

libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown. hints at a broken nvidia drivers/toolkit stack.

If the image needs to be run as root
It does not.


Error while importing unsloth in databricks

Tried installing unsloth in databricks
%%capture
!pip install unsloth "xformers==0.0.28.post2"
# Also get the latest nightly Unsloth!
!pip uninstall unsloth -y && pip install --upgrade --no-cache-dir "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"

While importing
from unsloth import FastLanguageModel
Got error
🦥 Unsloth: Will patch your computer to enable 2x faster free finetuning.
Unexpected internal error when monkey patching `PreTrainedModel.from_pretrained`: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):
operator torchvision::nms does not exist
Unexpected internal error when monkey patching `Trainer.train`: Failed to import transformers.trainer because of the following error (look up to see its traceback):
Failed to import transformers.integrations.integration_utils because of the following error (look up to see its traceback):
Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):
partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
Unsloth: If you want to finetune Gemma 2, upgrade flash-attn to version 2.6.3 or higher!
Newer versions support faster and less memory usage kernels for Gemma 2's attention softcapping!
To update flash-attn, do the below:

pip install --no-deps --upgrade "flash-attn>=2.6.3"
AttributeError: partially initialized module 'torchvision' has no attribute 'extension' (most likely due to a circular import)
File <command-1593331561314759>, line 1
----> 1 from unsloth import FastLanguageModel
File /databricks/python/lib/python3.11/site-packages/torchvision/_meta_registrations.py:18, in register_meta.<locals>.wrapper(fn)
     17 def wrapper(fn):
---> 18     if torchvision.extension._has_ops():
     19         get_meta_lib().impl(getattr(getattr(torch.ops.torchvision, op_name), overload_name), fn)
     20     return fn

Anyone who has used unsloth in databricks have faced this issue ?

Tried
pip install -U torch==2.3.1
pip install torchvision==0.17.2

Was able to import torchvision, but got a new issue
Unsloth: Will patch your computer to enable 2x faster free finetuning.
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 2.5.0+cu121 with CUDA 1201 (you have 2.2.2+cu121)
    Python  3.11.10 (you have 3.11.0rc1)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
Unsloth: Your Flash Attention 2 installation seems to be broken?
A possible explanation is you have a new CUDA version which isn't
yet compatible with FA2? Please file a ticket to Unsloth or FA2.
We shall now use Xformers instead, which does not have any performance hits!
We found this negligible impact by benchmarking on 1x A100.
ImportError: Unsloth: You have torch = 2.2.2+cu121 but xformers = 0.0.28.post2.
Please install xformers < 0.0.26 for torch = 2.2.2+cu121.

Try running wget -qO- https://raw.githubusercontent.com/unslothai/unsloth/main/unsloth/_auto_install.py | python - then running that directly


Bluetooth controller crash with IllegalInstruction from btdm_sleep_check_duration with BT modem sleep disabled (IDFGH-10366)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v5.0.2-279-ga6a962d5f8
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
DevkitC with ESP32-WROVER-E module
Power Supply used.
USB
What is the expected behavior?
I should be able to write advertising data to the nimBLE stack via a call to ble_gap_adv_set_data() while periodic BLE advertising is running without crashing the Bluetooth controller (libbtdm_app.c and/or bt.c).
What is the actual behavior?
In our product application, we write advertising data relatively frequently while advertising is running.
This usually works, but infrequently we would see crashes with the following backtrace signature:
ASSERT_PARAM(-218959118 0), in arch_main.c at line 369
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40091df8: f01d020c 00004136 f01d0000
0x40091df8: btdm_sleep_check_duration at C:/Espressif/frameworks/esp-idf-v5.0/components/bt/controller/esp32/bt.c:950

This line number is on exit from btdm_sleep_check_duration() which is apparently getting called by libbtdm_app.a code even though we have modem sleep disabled (CONFIG_BTDM_CTRL_MODEM_SLEEP=n).
The crashes would sometimes appear during connection / disconnection, or sometimes just spontaneously while connected for a while with ongoing advertising.
Neither the nimBLE nor Espressif documentation specifies limitations on when ble_gap_adv_set_data() can be called (except obviously after ble sync) and we never get an error code returned from the call.
Steps to reproduce.
We have attached a simple example project (similar to examples/bluetooth/nimble/bleprph) that reliably reproduces the crash (or at least generates exactly the same proximate cause in the logs).
To reproduce

Copy the attached ble_panic_demo.zip file to the examples/bluetooth/nimble directory in your esp-idf release/v5.0 toolchain
Extract the contents there (you should end up with a directory  examples/bluetooth/nimble/ble_panic_demo
Navigate to the new directory
Build, flash, and run the project using the idf.py tools
Observe the console output.  You'll see logging every 100 milliseconds when the code writes advertising data.  Approximately 21 seconds after boot, you should see code reliably crash and show the backtrace mentioned above.

ble_panic_demo.zip
Debug Logs.
Here is a log from the `ble_panic_demo` project showing the reproducible crash.
==================

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:7008
load:0x40078000,len:15592
load:0x40080400,len:3864
0x40080400: _init at ??:?

entry 0x40080650
I (27) boot: ESP-IDF v5.0.2-279-ga6a962d5f8-dirty 2nd stage bootloader
I (27) boot: compile time 13:15:20
I (28) boot: Multicore bootloader
I (32) boot: chip revision: v3.0
I (36) boot.esp32: SPI Speed      : 40MHz
I (41) boot.esp32: SPI Mode       : DIO
I (45) boot.esp32: SPI Flash Size : 4MB
I (50) boot: Enabling RNG early entropy source...
I (55) boot: Partition Table:
I (59) boot: ## Label            Usage          Type ST Offset   Length
I (66) boot:  0 nvs              WiFi data        01 02 00011000 00006000
I (74) boot:  1 nvs_keys         NVS keys         01 04 00017000 00001000
I (81) boot:  2 otadata          OTA data         01 00 00018000 00002000
I (89) boot:  3 phy_init         RF data          01 01 0001a000 00001000
I (96) boot:  4 ota_0            OTA app          00 10 00020000 00190000
I (104) boot:  5 ota_1            OTA app          00 11 001b0000 00190000
I (111) boot:  6 fctry            WiFi data        01 02 00340000 00020000
I (119) boot:  7 storage          Unknown data     01 81 00360000 00084000
I (126) boot: End of partition table
I (131) esp_image: segment 0: paddr=00020020 vaddr=3f400020 size=1a838h (108600) map
I (178) esp_image: segment 1: paddr=0003a860 vaddr=3ffbdb60 size=04678h ( 18040) load
I (186) esp_image: segment 2: paddr=0003eee0 vaddr=40080000 size=01138h (  4408) load
I (188) esp_image: segment 3: paddr=00040020 vaddr=400d0020 size=5d2c4h (381636) map
I (330) esp_image: segment 4: paddr=0009d2ec vaddr=40081138 size=19ad0h (105168) load
I (387) boot: Loaded app from partition at offset 0x20000
I (387) boot: Disabling RNG early entropy source...
I (399) cpu_start: Multicore app
I (399) quad_psram: This chip is ESP32-D0WD
I (400) esp_psram: Found 8MB PSRAM device
I (401) esp_psram: Speed: 40MHz
I (405) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (413) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (422) cpu_start: Pro cpu up.
I (425) cpu_start: Starting app cpu, entry point is 0x4008162c
0x4008162c: call_start_cpu1 at C:/Espressif/frameworks/esp-idf-v5.0/components/esp_system/port/cpu_start.c:143

I (0) cpu_start: App cpu up.
I (1337) esp_psram: SPI SRAM memory test OK
I (1346) cpu_start: Pro cpu start user code
I (1346) cpu_start: cpu freq: 240000000 Hz
I (1346) cpu_start: Application information:
I (1349) cpu_start: Project name:     panic_demo_1_0
I (1355) cpu_start: App version:      v5.0.2-279-ga6a962d5f8-dirty
I (1361) cpu_start: Compile time:     Jun  8 2023 13:14:43
I (1368) cpu_start: ELF file SHA256:  f32fc78e6347dbfe...
I (1374) cpu_start: ESP-IDF:          v5.0.2-279-ga6a962d5f8-dirty
I (1380) cpu_start: Min chip rev:     v3.0
I (1385) cpu_start: Max chip rev:     v3.99
I (1390) cpu_start: Chip rev:         v3.0
I (1395) heap_init: Initializing. RAM available for dynamic allocation:
I (1402) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (1408) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (1415) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (1421) heap_init: At 3FFC6DE8 len 00019218 (100 KiB): DRAM
I (1427) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1434) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1440) heap_init: At 4009AC08 len 000053F8 (20 KiB): IRAM
I (1447) esp_psram: Adding pool of 4096K of PSRAM memory to heap allocator
I (1455) spi_flash: detected chip: generic
I (1459) spi_flash: flash io: dio
W (1463) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (1477) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1487) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1527) BTDM_INIT: BT controller compile version [ad2b7cd]
I (1527) system_api: Base MAC address is not set
I (1527) system_api: read default base MAC address from EFUSE
I (1537) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (1787) app_main: on_ble_sync
I (1787) NimBLE: GAP procedure initiated: advertise;
I (1787) NimBLE: disc_mode=2
I (1797) NimBLE:  adv_channel_map=0 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=1000 adv_itvl_max=1000
I (1807) NimBLE:

I (1887) app_main: write ad data
I (1987) app_main: write ad data
I (2087) app_main: write ad data
I (2187) app_main: write ad data
I (2287) app_main: write ad data
I (2387) app_main: write ad data
I (2487) app_main: write ad data
I (2587) app_main: write ad data
I (2687) app_main: write ad data
I (2787) app_main: write ad data
I (2887) app_main: write ad data
I (2987) app_main: write ad data
I (3087) app_main: write ad data
I (3187) app_main: write ad data
I (3287) app_main: write ad data
I (3387) app_main: write ad data
I (3487) app_main: write ad data
I (3587) app_main: write ad data
I (3687) app_main: write ad data
I (3787) app_main: write ad data
I (3887) app_main: write ad data
I (3987) app_main: write ad data
I (4087) app_main: write ad data
I (4187) app_main: write ad data
I (4287) app_main: write ad data
I (4387) app_main: write ad data
I (4487) app_main: write ad data
I (4587) app_main: write ad data
I (4687) app_main: write ad data
I (4787) app_main: write ad data
I (4887) app_main: write ad data
I (4987) app_main: write ad data
I (5087) app_main: write ad data
I (5187) app_main: write ad data
I (5287) app_main: write ad data
I (5387) app_main: write ad data
I (5487) app_main: write ad data
I (5587) app_main: write ad data
I (5687) app_main: write ad data
I (5787) app_main: write ad data
I (5887) app_main: write ad data
I (5987) app_main: write ad data
I (6087) app_main: write ad data
I (6187) app_main: write ad data
I (6287) app_main: write ad data
I (6387) app_main: write ad data
I (6487) app_main: write ad data
I (6587) app_main: write ad data
I (6687) app_main: write ad data
I (6787) app_main: write ad data
I (6887) app_main: write ad data
I (6987) app_main: write ad data
I (7087) app_main: write ad data
I (7187) app_main: write ad data
I (7287) app_main: write ad data
I (7387) app_main: write ad data
I (7487) app_main: write ad data
I (7587) app_main: write ad data
I (7687) app_main: write ad data
I (7787) app_main: write ad data
I (7887) app_main: write ad data
I (7987) app_main: write ad data
I (8087) app_main: write ad data
I (8187) app_main: write ad data
I (8287) app_main: write ad data
I (8387) app_main: write ad data
I (8487) app_main: write ad data
I (8587) app_main: write ad data
I (8687) app_main: write ad data
I (8787) app_main: write ad data
I (8887) app_main: write ad data
I (8987) app_main: write ad data
I (9087) app_main: write ad data
I (9187) app_main: write ad data
I (9287) app_main: write ad data
I (9387) app_main: write ad data
I (9487) app_main: write ad data
I (9587) app_main: write ad data
I (9687) app_main: write ad data
I (9787) app_main: write ad data
I (9887) app_main: write ad data
I (9987) app_main: write ad data
I (10087) app_main: write ad data
I (10187) app_main: write ad data
I (10287) app_main: write ad data
I (10387) app_main: write ad data
I (10487) app_main: write ad data
I (10587) app_main: write ad data
I (10687) app_main: write ad data
I (10787) app_main: write ad data
I (10887) app_main: write ad data
I (10987) app_main: write ad data
I (11087) app_main: write ad data
I (11187) app_main: write ad data
I (11287) app_main: write ad data
I (11387) app_main: write ad data
I (11487) app_main: write ad data
I (11587) app_main: write ad data
I (11687) app_main: write ad data
I (11787) app_main: write ad data
I (11887) app_main: write ad data
I (11987) app_main: write ad data
I (12087) app_main: write ad data
I (12187) app_main: write ad data
I (12287) app_main: write ad data
I (12387) app_main: write ad data
I (12487) app_main: write ad data
I (12587) app_main: write ad data
I (12687) app_main: write ad data
I (12787) app_main: write ad data
I (12887) app_main: write ad data
I (12987) app_main: write ad data
I (13087) app_main: write ad data
I (13187) app_main: write ad data
I (13287) app_main: write ad data
I (13387) app_main: write ad data
I (13487) app_main: write ad data
I (13587) app_main: write ad data
I (13687) app_main: write ad data
I (13787) app_main: write ad data
I (13887) app_main: write ad data
I (13987) app_main: write ad data
I (14087) app_main: write ad data
I (14187) app_main: write ad data
I (14287) app_main: write ad data
I (14387) app_main: write ad data
I (14487) app_main: write ad data
I (14587) app_main: write ad data
I (14687) app_main: write ad data
I (14787) app_main: write ad data
I (14887) app_main: write ad data
I (14987) app_main: write ad data
I (15087) app_main: write ad data
I (15187) app_main: write ad data
I (15287) app_main: write ad data
I (15387) app_main: write ad data
I (15487) app_main: write ad data
I (15587) app_main: write ad data
I (15687) app_main: write ad data
I (15787) app_main: write ad data
I (15887) app_main: write ad data
I (15987) app_main: write ad data
I (16087) app_main: write ad data
I (16187) app_main: write ad data
I (16287) app_main: write ad data
I (16387) app_main: write ad data
I (16487) app_main: write ad data
I (16587) app_main: write ad data
I (16687) app_main: write ad data
I (16787) app_main: write ad data
I (16887) app_main: write ad data
I (16987) app_main: write ad data
I (17087) app_main: write ad data
I (17187) app_main: write ad data
I (17287) app_main: write ad data
I (17387) app_main: write ad data
I (17487) app_main: write ad data
I (17587) app_main: write ad data
I (17687) app_main: write ad data
I (17787) app_main: write ad data
I (17887) app_main: write ad data
I (17987) app_main: write ad data
I (18087) app_main: write ad data
I (18187) app_main: write ad data
I (18287) app_main: write ad data
I (18387) app_main: write ad data
I (18487) app_main: write ad data
I (18587) app_main: write ad data
I (18687) app_main: write ad data
I (18787) app_main: write ad data
I (18887) app_main: write ad data
I (18987) app_main: write ad data
I (19087) app_main: write ad data
I (19187) app_main: write ad data
I (19287) app_main: write ad data
I (19387) app_main: write ad data
I (19487) app_main: write ad data
I (19587) app_main: write ad data
I (19687) app_main: write ad data
I (19787) app_main: write ad data
I (19887) app_main: write ad data
I (19987) app_main: write ad data
I (20087) app_main: write ad data
I (20187) app_main: write ad data
I (20287) app_main: write ad data
I (20387) app_main: write ad data
I (20487) app_main: write ad data
I (20587) app_main: write ad data
I (20687) app_main: write ad data
I (20787) app_main: write ad data
I (20887) app_main: write ad data
I (20987) app_main: write ad data
I (21087) app_main: write ad data
I (21187) app_main: write ad data
I (21287) app_main: write ad data
I (21387) app_main: write ad data
I (21487) app_main: write ad data
I (21587) app_main: write ad data
I (21687) app_main: write ad data
I (21787) app_main: write ad data
I (21887) app_main: write ad data
ASSERT_PARAM(-218959118 0), in arch_main.c at line 369
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40091df8: f01d020c 00004136 f01d0000
0x40091df8: btdm_sleep_check_duration at C:/Espressif/frameworks/esp-idf-v5.0/components/bt/controller/esp32/bt.c:950

Core  0 register dump:
PC      : 0x40091dff  PS      : 0x00060b34  A0      : 0x80086361  A1      : 0x3ffd0210
0x40091dff: r_assert at C:/Espressif/frameworks/esp-idf-v5.0/components/bt/controller/esp32/bt.c:1890

A2      : 0x00000000  A3      : 0xf2f2f2f2  A4      : 0x00000000  A5      : 0x3f40961d
A6      : 0x00000171  A7      : 0xfffffffc  A8      : 0x8000814b  A9      : 0x3ffd0180
A10     : 0x00000000  A11     : 0x3ffd01a3  A12     : 0x3ffd014f  A13     : 0x00000039
A14     : 0x00000000  A15     : 0x3ffd0154  SAR     : 0x00000004  EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000  LBEG    : 0x40086269  LEND    : 0x40086271  LCOUNT  : 0x00000000
0x40086269: r_assert_param at ??:?

0x40086271: r_assert_param at ??:?

Backtrace: 0x40091dfc:0x3ffd0210 0x4008635e:0x3ffd0230 0x400e9a5d:0x3ffd0250 0x40019fb5:0x3ffd0270 0x4001a1f2:0x3ffd02a0 0x40019471:0x3ffd02c0 0x400175a7:0x3ffd0300 0x40019d11:0x3ffd0320 0x40055b4d:0x3ffd0340 0x400e9e27:0x3ffd0360 0x400ea465:0x3ffd0380 0x400969d1:0x3ffd03b0
0x40091dfc: r_assert at C:/Espressif/frameworks/esp-idf-v5.0/components/bt/controller/esp32/bt.c:1889

0x4008635e: r_assert_param at ??:?

0x400e9a5d: r_platform_reset at ??:?

0x400e9e27: r_rw_schedule at ??:?

0x400ea465: btdm_controller_task at ??:?

0x400969d1: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.0/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

More Information.
The original intermittent crash we observed in our product looks very similar to the issue reported here
https://github.com/espressif/esp-idf/issues/10555.  But the most recent libbtdm_app.a in the comment thread there does not fix our issue.
Hopefully, the reproducible version from the ble_panic_demo project has the same root cause.
Per comments we included in ble_panic_demo/main/app_main.c, we don't see the panic occur if the periodic call to ble_gap_adv_set_data is made directly from a timer context.  Only when it is called from a task context.

Hi, @rockys-spindance
I have reproduced the problem using your example. We will fix it ASAP.

Hi, @rockys-spindance
I have found out the reason. The adv interval is 625ms and you set adv data per 100ms. The adv data you set will take effect on the next adv event. So that you set adv data 6 times during an adv interval, but only the last time will take effect. The memory leak is caused by controller. I will fix it.
I suggest that the interval to set adv data should be less than adv interval, otherwise the adv data will be overwritten and this is useless. That would solve the problem too. You can set adv data per 1000ms.

Hi, @rockys-spindance
You can use my lib to fix this problem. Unzip libbtdm_app.zip and replace it with esp-idf/components/bt/controller/lib_esp32/esp32/libbtdm_app.a.
libbtdm_app.zip

@esp-cjh Thanks for the quick response.  I have confirmed that the new library you provided fixes the issue in our example app when we run it here.  Still working to confirm if the fix also solves the intermittent panic we were observing in our actual application.  That will take us a while since that panic was relatively infrequent.

@esp-cjh Here's an update from our side
The good news
When built with the v5.0.2-279-ga6a962d5f8 esp-idf tools plus  the new library you provided above, our production code no longer shows the original panic.
The not-so-good news
With the new library we now infrequently encounter two new panics in our production code. They occur anywhere between several minutes and several hours of operation.

The first shows the following backtrace:

assert failed: ble_hs_hci_cmd_tx ble_hs_hci.c:324 (ble_hs_hci_ack == ((void *)0))
Backtrace: 0x400823da:0x3ffbd170 0x40093699:0x3ffbd190 0x40098f99:0x3ffbd1b0 0x400e1c16:0x3ffbd2d0 0x400deaa5:0x3ffbd300 0x400d89f5:0x3ffbd340 0x400d8557:0x3ffbd3d0 0x40096775:0x3ffbd400 0x400967ad:0x3ffbd420 0x40096934:0x3ffbd450 0x40096a1d:0x3ffbd480
0x400823da: panic_abort at C:/Espressif/frameworks/esp-idf-v5.0-2/components/esp_system/panic.c:424
0x40093699: esp_system_abort at C:/Espressif/frameworks/esp-idf-v5.0-2/components/esp_system/esp_system.c:153
0x40098f99: __assert_func at C:/Espressif/frameworks/esp-idf-v5.0-2/components/newlib/assert.c:78
0x400e1c16: ble_hs_hci_cmd_tx at C:/Espressif/frameworks/esp-idf-v5.0-2/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci.c:324 (discriminator 1)
0x400deaa5: ble_gap_adv_set_data at C:/Espressif/frameworks/esp-idf-v5.0-2/components/bt/host/nimble/nimble/nimble/host/src/ble_gap.c:2827
0x400d89f5: ble_advertise at C:/ego/iot-infra8/code/projects/wifi_connector/main/app_main.c:248
0x400d8557: on_ble_adv_restart_timeout at C:/ego/iot-infra8/code/projects/wifi_connector/main/app_main.c:82
0x40096775: prvProcessExpiredTimer at C:/Espressif/frameworks/esp-idf-v5.0-2/components/freertos/FreeRTOS-Kernel/timers.c:572
0x400967ad: prvProcessTimerOrBlockTask at C:/Espressif/frameworks/esp-idf-v5.0-2/components/freertos/FreeRTOS-Kernel/timers.c:641
0x40096934: prvTimerTask at C:/Espressif/frameworks/esp-idf-v5.0-2/components/freertos/FreeRTOS-Kernel/timers.c:604 (discriminator 1)
0x40096a1d: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.0-2/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

That ble_gap.c line 2827 is inside ble_gap_adv_set_data().
Additional experimentation revealed that this panic occurs infrequently when a call to ble_gap_adv_set_data occurs between
ble_gap_adv_stop and ble_gap_adv_start calls but only for very specific timing of the calls. There is no documented restriction on such a call, so we would definitely count this as a controller bug (or at least a documentation bug).  But it's an easy one to dodge by modifying our application code to disable ble_gap_adv_set_data calls between any ble_gap_adv_stop and ble_gap_adv_start calls.
If it is of interest, we have another example project that reproduces this error on a DevkitC-WROVER-E and can share it.
The second panic shows a different backtrace, although one still related to setting the advertising data:

  	Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.

  	Core  0 register dump:
  	PC      : 0x4000c2e4  PS      : 0x00060c30  A0      : 0x8010d9a0  A1      : 0x3ffdba90
  	A2      : 0x00000000  A3      : 0x3ffb30d4  A4      : 0x0000002c  A5      : 0x00000000
  	A6      : 0xffffffff  A7      : 0x00050805  A8      : 0x00000000  A9      : 0x00000000
  	A10     : 0x3ffb53c8  A11     : 0x00060323  A12     : 0x80083ff7  A13     : 0x3ffc0b00
  	A14     : 0x00060323  A15     : 0x3ffb290c  SAR     : 0x0000001d  EXCCAUSE: 0x0000001d
  	EXCVADDR: 0x00000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0x00000001

  	Backtrace: 0x4000c2e1:0x3ffdba90 0x4010d99d:0x3ffdbaa0 0x4004c94d:0x3ffdbac0 0x400873fc:0x3ffdbae0 0x40019d11:0x3ffdbb10 0x40055b4d:0x3ffdbb30 0x400fffcb:0x3ffdbb50 0x40100629:0x3ffdbb70 0x4009876d:0x3ffdbba0
  	0x4010d99d: hci_le_set_adv_data_cmd_handler at llm_hci.c:?

  	0x400873fc: ke_task_schedule at ke_task.c:?

  	0x400fffcb: r_rw_schedule at ??:?

  	0x40100629: btdm_controller_task at ??:?

  	0x4009876d: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.0-2/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:154

This panic occurs during steady-state advertising (no stop/start in the vicinity) independent of whether BLE is connected or not.
But other than that, we have not been able to narrow down conditions that trigger it or find ways to reproduce it.
@esp-cjh We have two questions

Does the backtrace for the second panic above suggest anything to you?  Any pointers from that call tree inside the controller might suggest things we can try to identify the trigger condition or reproduce the panic more reliably.
Are these controller issues inside nimBLE code or only inside theESP32 port?  We are looking for ways we can help debug.

@esp-cjh
We are attaching a new example app here
ble_panic_demo-2.zip
that reproduces the second ble controller panic (inside hci_le_set_adv_data_cmd_handler ) described in the previous comment.
Unfortunately, the reproducibility rate is not 100%.  Typically if we run multiple ~10 minute long runs, we see the crash in about 25% of the runs. That's not great for debugging, but it's a lot better than the one such crash every hour or two that we see in our production code.
The example app just turns on BLE advertising with a 10 ms interval and then writes advertising data to the stack every 10 ms with a little random delay to alter the timing of the write relative to the ad interval.
We built it with the v5.0.2-279-ga6a962d5f8 esp-idf tools plus your library from above .
To reproduce the crash on a DevkitC-WROVER-E:

Copy the attached ble_panic_demo-2.zip file to the examples/bluetooth/nimble directory in your esp-idf release/v5.0 toolchain

Extract the contents there (you should end up with a directory examples/bluetooth/nimble/ble_panic_demo-2)

Navigate to the new directory

Build, flash, and run the project using the idf.py tools

if no crash is observed in the first 10-12 minutes then power cycle the devkit and try again.  We're seeing a crash in about 25% of such runs.

@rockys-spindance
OK, I will reproduce the problem and find out the cause.

Hi, @rockys-spindance
Please use this lib to test. I have test and didn't reproduce the crash.
libbtdm_app.zip

Thanks @esp-cjh !  We will test this right away and let you know how it goes.

@esp-cjh
Alas, we started testing with the latest library you provided in your comment above by running the ble_panic_demo-2 example project.  We're still using esp-idf from the release/v5.0 branch (v5.0.2-285-g7493b907ef) plus your new library.
Almost every run hits a spontaneous reset at some point typically within a few minutes.  No panic or error logging of any kind, just a reboot.  Here's a log snippet of one such reset:
I (101807) app_main: write data delay     2495  phase    6
I (101817) app_main: write data delay     2496  phase    7
I (101827) app_main: write data delay     2497  phase    6
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
...

Note that because there's no panic, there's no print-and-halt.  So it's easy to miss these resets.
Are you able to see these spontaneous resets there?  For us, four runs of ble_panic_demo-2 out of 5 attempts hit the reset, while one run lasted more than 10 minutes with no reset.

@rockys-spindance
Yes, I have noticed the restart. This is because you invoke esp_restart() in your code.

@esp-cjh Apologies.  I forgot that was in there.  The intent of the original code was to vary timings, so we were periodically resetting in case some of the hardware bring-up was adding variable timings.
I'll continue testing.

Thanks for reporting, will close due to short of feedback, feel free to reopen. Thanks.

@Alvin1Zhang Is there a plan to merge @esp-cjh's fixes for the libbtdm_app.a library into the release/v5.0 branch at some point?  And if so, is there a way we can track when that happens?

@rockys-spindance Sorry that I didn't share the details earlier, the fix is on release/5.0 available at https://github.com/espressif/esp-idf/commit/d3031ddddca242ee36d621a450a69203296b9e56. Thanks.


How to specify url port?

Is port specification in the config url expected to work?
Like url: 'https://www.whatever.com:10001/'.
I can't get this to work. Thx.

Thanks for reporting! That's a use-case I didn't try yet, gonna take a look later today.

@jveres I checked the URL from your config and I am also getting 525 (SSL handshake) errors from the Workers. It seems to be a known limitation, as described here https://community.cloudflare.com/t/fetch-in-worker-strips-port-number-from-url/189481

Yep, I too found the list of enabled ports in the CF firewall but those don't work in my case. Thanks for checking this out anyway.


ESP-S3-BOX-3: Unexpected error during wake-word-detection

I flashed my ESP-S3-Box-3 by using the esphome.io website. I had connected the box to HA. The waiting house symbol appears on the screen. There is a little snap sound after the startup was successful. After saying "ok nabu" the orange house (error) appears and no more response is possible. I'm using piper, openwakeword and whisper as local addons in my HA supervised installation.
ESPHOME shows the following output:
[22:06:00][D][api.connection:1089]: Home Assistant 2023.12.3 (xx.xx.xx.xx): Connected successfully
[22:06:00][W][component:214]: Component api took a long time for an operation (0.28 s).
[22:06:00][W][component:215]: Components should block for at most 20-30ms.
[22:06:01][D][voice_assistant:422]: State changed from IDLE to START_MICROPHONE
[22:06:01][D][voice_assistant:428]: Desired state set to WAIT_FOR_VAD
[22:06:01][W][component:214]: Component api took a long time for an operation (0.28 s).
[22:06:01][W][component:215]: Components should block for at most 20-30ms.
[22:06:01][D][voice_assistant:159]: Starting Microphone
[22:06:01][D][voice_assistant:422]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[22:06:01][D][esp-idf:000]: I (25378) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8

[22:06:01][D][esp-idf:000]: I (25384) I2S: I2S0, MCLK output by GPIO2

[22:06:01][D][esp-idf:000]: I (25390) AUDIO_PIPELINE: link el->rb, el:0x3d036c54, tag:i2s, rb:0x3d037068

[22:06:01][D][esp-idf:000]: I (25393) AUDIO_PIPELINE: link el->rb, el:0x3d036dc8, tag:filter, rb:0x3d0390a8

[22:06:01][D][esp-idf:000]: I (25399) AUDIO_ELEMENT: [i2s-0x3d036c54] Element task created

[22:06:01][D][esp-idf:000]: I (25402) AUDIO_THREAD: The filter task allocate stack on external memory

[22:06:01][D][esp-idf:000]: I (25409) AUDIO_ELEMENT: [filter-0x3d036dc8] Element task created

[22:06:01][D][esp-idf:000]: I (25415) AUDIO_ELEMENT: [raw-0x3d036ef8] Element task created

[22:06:01][D][esp-idf:000]: I (25419) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:16586299 Bytes, Inter:50964 Bytes, Dram:50964 Bytes

[22:06:01][D][esp-idf:000]: I (25422) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:1

[22:06:01][D][esp-idf:000]: I (25425) AUDIO_ELEMENT: [filter] AEL_MSG_CMD_RESUME,state:1

[22:06:01][D][esp-idf:000]: I (25429) RSP_FILTER: sample rate of source data : 16000, channel of source data : 2, sample rate of destination data : 16000, channel of destination data : 1

[22:06:01][D][esp-idf:000]: I (25432) AUDIO_PIPELINE: Pipeline started

[22:06:01][D][esp_adf.microphone:294]: Microphone started
[22:06:01][D][voice_assistant:422]: State changed from STARTING_MICROPHONE to WAIT_FOR_VAD
[22:06:01][D][voice_assistant:176]: Waiting for speech...
[22:06:01][D][voice_assistant:422]: State changed from WAIT_FOR_VAD to WAITING_FOR_VAD
[22:06:06][D][voice_assistant:189]: VAD detected speech
[22:06:06][D][voice_assistant:422]: State changed from WAITING_FOR_VAD to START_PIPELINE
[22:06:06][D][voice_assistant:428]: Desired state set to STREAMING_MICROPHONE
[22:06:06][D][voice_assistant:206]: Requesting start...
[22:06:06][D][voice_assistant:422]: State changed from START_PIPELINE to STARTING_PIPELINE
[22:06:06][D][voice_assistant:443]: Client started, streaming microphone
[22:06:06][D][voice_assistant:422]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[22:06:06][D][voice_assistant:428]: Desired state set to STREAMING_MICROPHONE
[22:06:06][D][voice_assistant:529]: Event Type: 0
[22:06:06][E][voice_assistant:656]: Error: no_wake_word - No wake word detected
[22:06:06][D][voice_assistant:522]: Signaling stop...
[22:06:06][D][voice_assistant:422]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE
[22:06:06][D][voice_assistant:428]: Desired state set to IDLE
[22:06:06][D][esp_adf.microphone:256]: Stopping microphone
[22:06:06][D][voice_assistant:422]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[22:06:06][D][esp-idf:000]: W (30571) AUDIO_ELEMENT: IN-[filter] AEL_IO_ABORT

[22:06:06][D][esp-idf:000]: E (30575) AUDIO_ELEMENT: [filter] Element already stopped

[22:06:06][D][esp-idf:000]: W (30603) AUDIO_PIPELINE: There are no listener registered

[22:06:06][D][esp-idf:000]: I (30607) AUDIO_PIPELINE: audio_pipeline_unlinked

[22:06:06][D][esp-idf:000]: W (30612) AUDIO_ELEMENT: [i2s] Element has not create when AUDIO_ELEMENT_TERMINATE

[22:06:06][D][esp-idf:000]: I (30617) I2S: DMA queue destroyed

[22:06:06][D][esp-idf:000]: W (30624) AUDIO_ELEMENT: [filter] Element has not create when AUDIO_ELEMENT_TERMINATE

[22:06:07][D][esp-idf:000]: W (30629) AUDIO_ELEMENT: [raw] Element has not create when AUDIO_ELEMENT_TERMINATE

[22:06:07][W][component:214]: Component voice_assistant took a long time for an operation (0.28 s).
[22:06:07][W][component:215]: Components should block for at most 20-30ms.
[22:06:07][D][voice_assistant:529]: Event Type: 2
[22:06:07][D][voice_assistant:619]: Assist Pipeline ended
[22:06:07][D][voice_assistant:529]: Event Type: 1
[22:06:07][D][voice_assistant:532]: Assist Pipeline running
[22:06:07][D][voice_assistant:529]: Event Type: 9
[22:06:07][D][esp_adf.microphone:306]: Microphone stopped
[22:06:07][D][voice_assistant:529]: Event Type: 0
[22:06:07][E][voice_assistant:656]: Error: wake-stream-failed - Unexpected error during wake-word-detection
[22:06:07][D][voice_assistant:522]: Signaling stop...
[22:06:07][D][voice_assistant:422]: State changed from STOPPING_MICROPHONE to STOP_MICROPHONE
[22:06:07][D][voice_assistant:428]: Desired state set to IDLE
[22:06:07][D][voice_assistant:422]: State changed from STOP_MICROPHONE to IDLE
[22:06:07][W][component:214]: Component voice_assistant took a long time for an operation (0.27 s).
[22:06:07][W][component:215]: Components should block for at most 20-30ms.
[22:06:07][D][voice_assistant:529]: Event Type: 2
[22:06:07][D][voice_assistant:619]: Assist Pipeline ended
[22:06:07][D][voice_assistant:422]: State changed from IDLE to START_MICROPHONE
[22:06:07][D][voice_assistant:428]: Desired state set to WAIT_FOR_VAD
[22:06:07][D][voice_assistant:159]: Starting Microphone
[22:06:07][D][voice_assistant:422]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[22:06:07][D][esp-idf:000]: I (31287) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8

[22:06:07][D][esp-idf:000]: I (31292) I2S: I2S0, MCLK output by GPIO2

[22:06:07][D][esp-idf:000]: I (31299) AUDIO_PIPELINE: link el->rb, el:0x3d036c54, tag:i2s, rb:0x3d037068

[22:06:07][D][esp-idf:000]: I (31303) AUDIO_PIPELINE: link el->rb, el:0x3d036dc8, tag:filter, rb:0x3d0390a8

[22:06:07][D][esp-idf:000]: I (31310) AUDIO_ELEMENT: [i2s-0x3d036c54] Element task created

[22:06:07][D][esp-idf:000]: I (31313) AUDIO_THREAD: The filter task allocate stack on external memory

[22:06:07][D][esp-idf:000]: I (31318) AUDIO_ELEMENT: [filter-0x3d036dc8] Element task created

[22:06:07][D][esp-idf:000]: I (31323) AUDIO_ELEMENT: [raw-0x3d036ef8] Element task created

[22:06:07][D][esp-idf:000]: I (31326) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:359, MEM Total:16586747 Bytes, Inter:51412 Bytes, Dram:51412 Bytes

[22:06:07][D][esp-idf:000]: I (31330) AUDIO_ELEMENT: [i2s] AEL_MSG_CMD_RESUME,state:1

[22:06:07][D][esp-idf:000]: I (31332) AUDIO_ELEMENT: [filter] AEL_MSG_CMD_RESUME,state:1

[22:06:07][D][esp-idf:000]: I (31336) RSP_FILTER: sample rate of source data : 16000, channel of source data : 2, sample rate of destination data : 16000, channel of destination data : 1

[22:06:07][D][esp-idf:000]: I (31339) AUDIO_PIPELINE: Pipeline started

[22:06:07][D][esp_adf.microphone:294]: Microphone started
[22:06:07][D][voice_assistant:422]: State changed from STARTING_MICROPHONE to WAIT_FOR_VAD
[22:06:07][D][voice_assistant:176]: Waiting for speech...
[22:06:07][D][voice_assistant:422]: State changed from WAIT_FOR_VAD to WAITING_FOR_VAD
[22:06:08][W][component:214]: Component voice_assistant took a long time for an operation (0.27 s).
[22:06:08][W][component:215]: Components should block for at most 20-30ms.
[22:06:08][W][component:214]: Component voice_assistant took a long time for an operation (0.27 s).
[22:06:08][W][component:215]: Components should block for at most 20-30ms.

HA assist debug:

stage: done
run:
  pipeline: 01hhz9tr3494bh7s6fvc967ncw
  language: en
events:
  - type: run-start
    data:
      pipeline: 01hhz9tr3494bh7s6fvc967ncw
      language: en
    timestamp: "2023-12-18T21:06:06.836622+00:00"
  - type: wake_word-start
    data:
      entity_id: wake_word.openwakeword
      metadata:
        format: wav
        codec: pcm
        bit_rate: 16
        sample_rate: 16000
        channel: 1
      timeout: 5
    timestamp: "2023-12-18T21:06:06.837100+00:00"
  - type: error
    data:
      code: wake-stream-failed
      message: Unexpected error during wake-word-detection
    timestamp: "2023-12-18T21:06:06.847630+00:00"
  - type: run-end
    data: null
    timestamp: "2023-12-18T21:06:06.848318+00:00"
wake_word:
  entity_id: wake_word.openwakeword
  metadata:
    format: wav
    codec: pcm
    bit_rate: 16
    sample_rate: 16000
    channel: 1
  timeout: 5
  done: false
error:
  code: wake-stream-failed
  message: Unexpected error during wake-word-detection

Very similar issue here.
The same errors from ESP side:
`[D][esp-idf:000]: I (14121) AUDIO_PIPELINE: Pipeline started
[D][esp_adf.microphone:264]: Microphone started
[D][voice_assistant:410]: State changed from STARTING_MICROPHONE to WAIT_FOR_VAD
[D][voice_assistant:170]: Waiting for speech...
[D][voice_assistant:410]: State changed from WAIT_FOR_VAD to WAITING_FOR_VAD
[D][voice_assistant:183]: VAD detected speech
[D][voice_assistant:410]: State changed from WAITING_FOR_VAD to START_PIPELINE
[D][voice_assistant:416]: Desired state set to STREAMING_MICROPHONE
[D][voice_assistant:200]: Requesting start...
[D][voice_assistant:410]: State changed from START_PIPELINE to STARTING_PIPELINE
[D][voice_assistant:431]: Client started, streaming microphone
[D][voice_assistant:410]: State changed from STARTING_PIPELINE to STREAMING_MICROPHONE
[D][voice_assistant:416]: Desired state set to STREAMING_MICROPHONE
[D][voice_assistant:517]: Event Type: 0
[E][voice_assistant:644]: Error: no_wake_word - No wake word detected
[D][voice_assistant:510]: Signaling stop...
[D][voice_assistant:410]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE
[D][voice_assistant:416]: Desired state set to IDLE
[D][esp_adf.microphone:226]: Stopping microphone
[D][voice_assistant:410]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE
[D][esp-idf:000]: W (72547) AUDIO_ELEMENT: IN-[filter] AEL_IO_ABORT
[D][esp-idf:000]: E (72549) AUDIO_ELEMENT: [filter] Element already stopped
[D][esp-idf:000]: W (72580) AUDIO_PIPELINE: There are no listener registered
[D][esp-idf:000]: I (72583) AUDIO_PIPELINE: audio_pipeline_unlinked
[D][esp-idf:000]: W (72585) AUDIO_ELEMENT: [i2s] Element has not create when AUDIO_ELEMENT_TERMINATE
[D][esp-idf:000]: I (72587) I2S: DMA queue destroyed
[D][esp-idf:000]: W (72589) AUDIO_ELEMENT: [filter] Element has not create when AUDIO_ELEMENT_TERMINATE
[D][esp-idf:000]: W (72593) AUDIO_ELEMENT: [raw] Element has not create when AUDIO_ELEMENT_TERMINATE
[W][component:214]: Component voice_assistant took a long time for an operation (0.21 s).
[W][component:215]: Components should block for at most 20-30ms.
[D][voice_assistant:517]: Event Type: 2
[D][voice_assistant:607]: Assist Pipeline ended
[D][voice_assistant:517]: Event Type: 1
[D][voice_assistant:520]: Assist Pipeline running
[D][esp_adf.microphone:276]: Microphone stopped
[D][voice_assistant:517]: Event Type: 9
[D][voice_assistant:410]: State changed from STOPPING_MICROPHONE to IDLE
[D][voice_assistant:517]: Event Type: 0
[E][voice_assistant:644]: Error: wake-stream-failed - Unexpected error during wake-word-detection
[D][voice_assistant:410]: State changed from IDLE to START_MICROPHONE
[D][voice_assistant:416]: Desired state set to WAIT_FOR_VAD
[W][component:214]: Component voice_assistant took a long time for an operation (0.21 s).
[W][component:215]: Components should block for at most 20-30ms.
[D][voice_assistant:517]: Event Type: 2
[D][voice_assistant:607]: Assist Pipeline ended
[D][voice_assistant:153]: Starting Microphone
[D][voice_assistant:410]: State changed from START_MICROPHONE to STARTING_MICROPHONE
[D][esp-idf:000]: I (72987) I2S: DMA Malloc info, datalen=blocksize=512, dma_buf_count=8
[D][esp-idf:000]: I (72992) I2S: I2S0, MCLK output by GPIO2
[D][esp-idf:000]: I (72996) AUDIO_PIPELINE: link el->rb, el:0x3d036c2c, tag:i2s, rb:0x3d037040
[D][esp-idf:000]: I (72998) AUDIO_PIPELINE: link el->rb, el:0x3d036da0, tag:filter, rb:0x3d039080
[D][esp-idf:000]: I (73003) AUDIO_ELEMENT: [i2s-0x3d036c2c] Element task created0m
[D][esp-idf:000]: I (73005) AUDIO_THREAD: The filter task allocate stack on external memory
[D][esp-idf:000]: I (73008) AUDIO_ELEMENT: [filter-0x3d036da0] Element task created
[D][esp-idf:000]: I (73010) AUDIO_ELEMENT: [raw-0x3d036ed0] Element task created`
Did you manage to resolve it somehow?

Sadly not, its still not working

Issue still exists after upgrading to ESPHome 2023.12.9. Doesn't make a difference if I use openwakeword or porcupine1. Both times its crashing after saying something (even if its not the wake word)....

Exactly the same symptoms here.
What's more, I was able to reinstall original firmware and it reacts to "OK E.S.P." with no issues.
Also understands the commands, to it's not a hardware issue.

After switching to local wake word the detection works like expected. https://github.com/esphome/firmware/tree/main/wake-word-voice-assistant

When switching to wake word engine location from "on device" to "in Home Assistant" the error still exists. So re-opening this ticket because its solved when using local wake word detection but one may still use the Home Assistant detection...


INT-2756: add statusbar attribute

INT-2756
issue: https://github.com/tinymce/tinymce-webcomponent/issues/24

@spocke changelog entry added, have a look


Test tool communication

@fmauch After discussion could you please give us some feedback on testing tool communication after #218 has been merged.
Thanks!

yep, I'll do that.

I wasn't able to test the full pipeline on a real robot as I couldn't find the connection cable for my hardware in order to connect it to the UR. The script itself should work though, as it is the same that is used for the ROS1 driver.
However, I noticed that the tool_communication script does not get started automatically, when use_tool_communication is set to true in the launchfile. For the ROS1 driver we actually started the script when that argument was set.

Sounds good to start the script if the parameter is set to true. I will address this in a follow-up PR


Keep status of expanded tree when navigating back in browser

Motivation
When opening a page for navigation in browser, the state of the tree should be kept (which parts of the tree are expanded/collapsed).
Proposed Solution
Track the status of the tree in a Cookie(?) and automatically expand the tree as needed/set.
Alternatives
Make it work in the browser history, which we disabled.
Additional Context
We intentionally disabled browser cache right now.

So #1179 was actually a feature and not a bug? :laughing:

Why would we need a cookie for this? Can't we just revert the changes from #1192?

The issue was that the HTML tree seems to be in the history correctly, but then there are some issues with drag & drop.

https://developer.mozilla.org/en-US/docs/Web/API/History_API

@svenseeberg but I guess the normal history API is also used on the back button? If the tree is broken after using the back-button, I see no reason why it should work using window.history.back(). But maybe I'm missing something :sweat_smile:

@timoludwig I was thinking that we can maybe fix things by pushing states to the history whenever we're firing AJAX calls.

I enabled the browser cache of the page tree again in 0e2b49c2db6de28bfc01027ca541748ff6920aa7, but this does not lead to the tree being expanded on the back button. So apparently, the source of bug #1179 was not the browser cache, but something different, and removing the browser cache just was a workaround.
Regarding this issue: Yes, your approach makes sense, but is definitely not an easy task. With all our event handlers, this increases the potential for bugs which we cannot prevent with unit tests. Maybe the latest improvements to the page tree already provide most of the functionality that was the motivation of this issue?

I think we should redefine the scope of this issue. We could limit it to keeping the expanded/collapsed state of single nodes. And this could easily stored in a cookie.

We could, yes. To me, it still sounds complicated and I'm not sure whether the benefit of the feature is big enough to justify the effort, but maybe I'm overestimating the complexity :wink:


Readme updates?

https://github.com/shader-slang/slang/blob/9b580e58417a77109617804362be872f05885f23/README.md?plain=1#L39-L40
32 bit seems to be gone. arm64 and macOS is present.
https://github.com/shader-slang/slang/blob/9b580e58417a77109617804362be872f05885f23/README.md?plain=1#L103
The linked repo is archived.

Thank you for noticing these.


Add Android Test using Sauce demo app

[ ] Update page objects for Saucedemo app using existing page objects
[ ] Update existing tests to also run for Android
[ ] Run test on local emulator for PR
[ ] Run test on BS and LT on latest mobile and tablet devices

Please assign this ticket to me.

Please assign this ticket to me.

Hi @MakodeAjay , this ticket depends on the ticket which introduces Appium integration to Boyka-framework. Until that time, we need to hold for this ticket.


Toggle button inside collapsible content

Hello, I'm trying to have the toggle button inside the content that will be collapsed, but I can't seem to be able to get it to work...
Would you mind helping me to get it to work as intended? ... Here's a quick look at how it should look in both states:
Expanded

Collapsed

Thanks in advance 🙏

Can you share a codesandbox of what you have?

Nevermind, it was something else


Isle of souls ground fixes

Fixes the ground around The Isle of Souls to properly respect the winter theme; Hot areas are empty of snow.

Fixes: #307

The only thing I'd suggest is pushing the snow out under the trees at red base

Otherwise a big improvment and looks good to me!

Fixed Jin's request and also defined the pyre fiend area


[Question] Readme vs Script for per_device_train_batch_size and increase the gradient_accumulation_steps

Question
According to Readme, it sounds like Global Batch Size (per_device_train_batch_size * gradient_accumulation_steps) should be 128.
However, both From scripts/pretrain.sh and scripts/finetune.sh have --per_device_train_batch_size 16 --gradient_accumulation_steps 1.
That sounds like Global Batch Size is 16, not 128?
Which is correct?
What about finetune, is Global Batch Size the same?
Also, in order to train with fewer gpus, when you you reduce per_device_train_batch_size by x amount, do you just multiply gradient_accumulation_steps by x?
If we take the scripts (--per_device_train_batch_size 16 --gradient_accumulation_steps 1) as an example, do you divide per_device_train_batch_size/4 and multiply gradient_accumulation_steps*4? Then you replace with --per_device_train_batch_size 4 --gradient_accumulation_steps 4.
Lastly, I think it would be clearer if we had different documentation files (one for original paper and one for new).
Thanks!

Just corrected this error in the README, global batch size should be: per_device_train_batch_size x gradient_accumulation_steps x num_gpus.
We used 8 GPUs in pretraining / finetuning, so the global batch size is 16x1x8=128.

Lastly, I think it would be clearer if we had different documentation files (one for original paper and one for new).

Great suggestion. We'll add this later. Thanks.

Thanks for the info!
global batch size  = per_device_train_batch_size x gradient_accumulation_steps x num_gpus
That makes sense. Could you clarify one more thing?
Readme said:
"You may run this with a single A100 GPU with the following code.
Pretrain: LLaVA-13B, 1x A100 (80G). Time: ~33 hours."
python llava/train/train_mem.py
--per_device_train_batch_size 16
--gradient_accumulation_steps 8
Does the per_device_train_batch_size  stays the same as 16? Readme said: "To train on fewer GPUs, you can reduce the per_device_train_batch_size and increase the gradient_accumulation_steps accordingly."
On a related note, 1x A100 80gb only works for pretraining, not finetuning?
I asked about using 1x a100 80gb for finetuning on another discussion.
https://github.com/haotian-liu/LLaVA/discussions/356

"You may run this with a single A100 GPU with the following code.
Pretrain: LLaVA-13B, 1x A100 (80G). Time: ~33 hours."
python llava/train/train_mem.py
--per_device_train_batch_size 16
--gradient_accumulation_steps 8
Does the per_device_train_batch_size stays the same as 16? Readme said: "To train on fewer GPUs, you can reduce the per_device_train_batch_size and increase the gradient_accumulation_steps accordingly."

Yes, as 16x8x1=128

On a related note, 1x A100 80gb only works for pretraining, not finetuning?
Yes. You need LoRA/QLoRA for finetuning on a single A100.

Thanks so much!
Then should the readme say "reduce the per_device_train_batch_size or increase the gradient_accumulation_steps," not "reduce the per_device_train_batch_size and increase the gradient_accumulation_steps?"
I was thinking I had to both decrease and increase like 4 (per_device_train_batch_size) * 32 (gradient_accumulation_steps) *1 (ngpu). :)

Huge thanks @haotian-liu for answering all my questions!
I finally had a chance to score renting 8x A100 80gb gpus, and I successfully finetuned llama-2-13b.
Also I tried with --per_device_train_batch_size 8 * --gradient_accumulation_steps 4 * 4 a100 80gb gpus. It gave me a warning about clearing memory once in a while, but it finished the process, and the output was usable.

Huge thanks @haotian-liu for answering all my questions! I finally had a chance to score renting 8x A100 80gb gpus, and I successfully finetuned llama-2-13b. Also I tried with --per_device_train_batch_size 8 * --gradient_accumulation_steps 4 * 4 a100 80gb gpus. It gave me a warning about clearing memory once in a while, but it finished the process, and the output was usable.

Hi, did you face out of memory issues with using batch of 16 with 4 A100 80 GB?


fix: Added '' tags and heading classes

Fixes

Fixes #1069  by @zackkrida
Description

Added semantic heading tags and classes
Checklist

[x] My pull request has a descriptive title (not a vague title like Update index.md).
[x] My pull request targets the default branch of the repository (main or master).
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[x] I added tests for the changes I made (if applicable).
[x] I added or updated documentation (if applicable).
[x] I tried running the project locally and verified that there are no
visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Made one small edit, but thank you so much @chetas411! Nice work. hope to see you contribute more in the future

Yeah I am also eager to contribute further, thanks


Request for Documentation: Add desktop app troubleshooting FAQ item: the message/input box goes missing after zooming in/out

Mattermost user jason.blais from https://community-release.mattermost.com has requested the following be documented:
Add desktop app troubleshooting FAQ item: the message/input box goes missing after zooming in/out

The issue is upstream with Electron itself: https://github.com/electron/electron/issues/7375

Usually clicking somewhere inside the center channel with messages, then hitting CMD/CTRL+0 resolves it.

If not, there are longer steps that can be taken to resolve, below (steps assume a Windows enviroment):
 a. quit the desktop app
 b. go to ~/.config/Mattermost/Preferences
 c. [IMPORTANT] copy the folder contents to your Desktop (or anywhere in your local file directory)
 d. delete the ~/.config/Mattermost/Preferences folder
 e. re-open the desktop app

Mattermost should now take the full page view. However, you'll notice that all your preferences, including the server URL, is back to a "clean" default state.

To restore preferences,
- quit the desktop app
- go to the folder you copied in step 2c (Desktop or local file directory you chose), and copy config.json to ~/.config/Mattermost/Preferences
- reopen the desktop app

Everything should be back to normal now.

See the original post here.
This issue was generated from Mattermost using the Doc Up plugin.

@hmhealey - Would you be open to confirming whether the requested product documentation applies to the current day product functionality/operation? (It may be that this is no longer something that needs documenting).

I don't think so. If it ends up being needed though, we can always reopen it.

Thanks! Closing.


get all 0 when gets decimal field value from mysql

#when i use gorm to gets decimal field value from mysql，whatever this struct dield type is float32，float64 or shopspring/decimal，it gets all 0
What version of Go are you using (go version)?
go version go1.8.3 linux/amd64
Which database and its version are you using?
mysql 5.6.23
Models：
package main

import (
	"log"
	"github.com/shopspring/decimal"
)

func main() {
	month := "201805"
	t := "2018-05-07"
	companyUser, _ := CompanyUserRepo.GetDaily(month, t)
	for _, cu := range companyUser {
		log.Println(cu.Ks3Storage)
	}
}

type CompanyUser struct {
	Ks3Storage float64  // or float32 or decimal.Decimal
}

var CompanyUserRepo = new(CompanyUser)

func (*CompanyUser) GetDaily(month string,
	date string) ([]*CompanyUser, error) {

	var cs []*CompanyUser
	table := "company_user_201805"
	err := db.LogMode(true).Table(table).Where("stat_date=?",
		date).Find(&cs).Error
	if err != nil {
		return nil, err
	}
	return cs, nil
}

then output is always 0，whatever the real value is.
What am I doing wrong here ?  Or how I should do ？

@jinzhu ，please!

@jinzhu Confirm that it would be nice and useful having this support!


nbf check allows exact time matches.

From the spec "The nbf (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing.". The exact time is not before itself, so it should be valid.
This was annoying me in unit tests in a project of mine.

Adding another snippet from http://self-issued.info/docs/draft-jones-json-web-token-06.html
Section 4.1 Reserved Claim Names
"The processing of the nbf claim requires that the current date/time MUST be after or equal to the not-before date/time listed in the nbf claim."

Thanks for the commit! :+1:


Remove crds completely after downloading

I tried multiple ways to force installCRDs: false but they always get installed by the chart watcher/applier.
Decided to just remove crds as the end step of the download script. This way OLM will create the crds and this helm operator will just deploy ESO

lgtm, but not sure what impacts we might have :)

Tried it locally, If we try to use the helm operator alone it will deploy an ESO instance in a failed state until someone applies the crds. But I don't see anyone using this helm operator without OLM. Let me also add this to the Readme.


Absorb code from project

@rithik83 would it be possible to absorb your code from the project here? Would be nice to start filling this repo 😄

Done!


Add MatteAnything

Thank you for your outstanding work!  Based on your previous work, I have made some updates and improvements.   We have added our project, Matte Anything (MatAny), to your project.   I have made my best effort to adhere to the coding guidelines you previously established and have maintained a consistent code style.
Thank you for your time and review!   I look forward to your merge and continuing to contribute to this project.
Best regards,
Lang Ye

@YeL6 Thank you for your submission and excellent work!


docs: fix winhighlight example

Corrects the example in the README about how to use winhiglight for customizing highlights.
Context
Follow-up of #101.

Good catch, thanks!


Rotation plus motion causes jitter in pixel-perfect mode

Godot version
3.4.2.stable.official
System information
Win10, NVIDIA GeForce GTX 960
Issue description
I am working in pixel-perfect mode (viewport). When I rotate a sprite it follows the pixel grid perfectly, just as I want. Motion is also as expected, even if I use float velocities, the character is always fixed to the pixel grid, which is exactly what I would expect.
Now this:
If I move my rotated character with integer speed, this works fine (here: 1 px per frame):

But if I move my character with float speeds (here: 1.01 px per frame), the rotation is not stable and I get jittery pixel shifts all across the sprite:

This effect seems to stem from the interaction between the float position and the float angle.
This is a version with float speed (1.01 px per frame) and int (90°) rotation, which is fine:

It seems like Godot maps the float position and angle to the pixel grid in one go, which accumulates rounding errors between the two parameters into a single step. This could lead to the fractional part of the position influencing the outcome of the rotation, which should be independent from it.
If that is the case, a solution might lie in the direction of first rounding the position before applying the rotation.
EDIT
The same seems to be happing for scaling.
I was able to see a problem with the combination of float scale and float position.
But I was also able to see the problem with int position (px/frame) and a very specific scale (1.5 or 2.5), other float scalings seem to work with int positions.
Steps to reproduce
This is the minimal example code I used (also see Godot project below). It's pretty standard. Default settings except these two:

Display -> Window -> Size -> 320x180
Display -> Window -> Stretch -> viewport

Change the values in the code as the comment states to get the different behaviors:
func _physics_process(delta):

	var SPEED_INT = 1.0
	var SPEED_FLOAT = 1.01

	var ANGLE_90 = PI/2
	var ANGLE_float = 1

	# change these to reproduce:
	# SPEED_INT / ANGLE_float --> ok
	# SPEED_INT / ANGLE_90 --> ok
	# SPEED_FLOAT / ANGLE_90 --> ok
	# SPEED_FLOAT / ANGLE_float --> not ok
	var speed = SPEED_INT
	var angle = ANGLE_float

	if Input.is_key_pressed(KEY_A):
		self.position.x -= speed
	if Input.is_key_pressed(KEY_D):
		self.position.x += speed
	if Input.is_key_pressed(KEY_W):
		self.position.y -= speed
	if Input.is_key_pressed(KEY_S):
		self.position.y += speed
	if Input.is_key_pressed(KEY_E):
		self.rotate(angle)
	if Input.is_key_pressed(KEY_Q):
		self.rotate(-angle)
	if Input.is_key_pressed(KEY_SPACE):
		self.rotation = 0

Minimal reproduction project
game.zip

cc @lawnjelly
Many fixes to pixel snap were attempted in the 3.3 cycle, but they were reverted because they always ended up causing regressions in some cases.

@Calinou Wow, thanks for the quick reply!
So since we are at 3.4 now, are there any plans to finally go through with the changes?
I remember that pixel snap used to be much worse than it currently is, so I am really happy with the progress so far.
It's just that this rotation bug is so obvious that it's a complete show-stopper for anyone making a pixel-precise game and wants rotation (which is not a rare feature I would guess).
So I am by no means complaining. I highly respect the work you guys and gals do here
It's just that I feel Godot is so close to being a perfect fit for pixel art games that it would be a shame if things like this couldn't be ironed out. Especially since this issue just works in Game Maker, and I think Godot is superior to that engine in many ways.
If this is a regression issue, is the main problem that it breaks existing games or does it break other features of Godot? In the former case, would it be possible to re-introduce the changes with an optional parameter or is this something you think can be fixed permanently given enough dev time?
If this is not currently on the map, is there anything I can do to help speed up this process? To be honest, I won't have time to dive into the code myself, but if this could be achieved by other means (a moderate bounty maybe), I might be able to chip in (within my means).

If this is a regression issue, is the main problem that it breaks existing games or does it break other features of Godot? In the former case, would it be possible to re-introduce the changes with an optional parameter or is this something you think can be fixed permanently given enough dev time?

The current behavior in 3.4 isn't a regression from earlier releases. It's just that rotating sprites when using the viewport stretch mode will always be a contentious issue, and one that cannot be fully resolved without using complex algorithms such as RotSprite.
If you don't mind rotated pixels not matching the pixel grid (which is what many Game Maker games do), use the 2d stretch mode.

@Calinou Apologies in advance if I misunderstood your answer, but I have the feeling we are talking about different things.
My problem is not that the rotation itself looks pixely. This is something I fully expect, since pixels must snap to the grid. The problem is that for a fixed angle, the actual pixel pattern of the sprite changes when I move the sprite around (e.g. the white pixel appearing and disappearing on Chrono's left foot in the second gif).
Please let me clarify with still images. These three examples have the exact same rotation and only differ in the sprite's position

This may be subtle in the still image but it is very noticeable in motion.
I am not sure about the connection to the RotSprite algorithm. The rotation itself looks fine to me. The problem is that it's not stable when I add floating point motion. The same occurs with scaling, so it's definitely not purely a rotation issue. I still think there might be something wrong with the rounding, but as I said, I don't know the code enough to verify. I might look into the tickets you posted to check if I can spot something.
I found an interesting angle that produces this scanline-like behavior which enforces my assumption that this could be a rounding issue, I rebuilt the game in 30 fps, since my gif recorder maxes out at 60fps, so the effect should be more apparent now. This is only a very slight rotation, but it's there. The angle is fixed, only the translation changes:

About Game Maker: I have completed 4 Ludum Dare games with GM, two of which made heavy use of rotation, and I had absolutely no issues with GM breaking the pixel grid. For all of GM's failings, this was ironclad behavior that I was always able to depend upon. It's possible to disable pixel snap in GM, so I am sure there are games that do not obey the grid, but once you enable it, it just works. 2d is not an option for me as making pixel-perfect games is kinda my thing. ;)
These two games I made feature pixel-precision and rotation in GameMaker:
https://ldjam.com/events/ludum-dare/38/a-perfectly-lovely-adventure
https://ldjam.com/events/ludum-dare/40/boiler-room-defense
This image is a screenshot from A Perfectly Lovely Adventure, loaded in Aseprite with grid enabled for illustration. The whole bottom part is actually a sphere that rotates as the player walks on it and it behaves exactly as I expect:

I marked two objects that correspond to one another. One is the original, the other is rotated. It looks pixely but it obeys the grid.

There is no longer an Use Pixel Snap option, but there's now Snap 2d Transforms To Pixel and Snap 2d Vertices To Pixel which can be enabled independently.

I haven't found these settings in my version of Godot, were they reverted as well?

I tried enabling GPU pixel snap, but that only makes the problem sporadic.
Disabling it causes a steady shift of pixels, while enabling it makes the effect more "jumpy" and erratic.

You are getting jiggling in your project because when at an angle, as a sprite moves in floating point units, the texels that will be sampled at a particular pixel will "jiggle" in relation to those sampled at neighbouring pixels. This is a consequence of maths and filtering and how GPUs work.
To do pixel games in Godot (especially if you hope to use any rotations or float offset) it is essential to understand texture filtering, especially nearest neighbour filtering. See e.g.:
https://www.essentialmath.com/OtherPubs/Texture_Filtering.pdf
I would encourage you to work through the maths with a paper and pen, calculating the positions of few pixels as a sprite moves past and calculating where it will sample the texels from. Once you understand how the maths works, you will be better able to predict why and when these effects will happen and how to avoid them.
This is partly why I now avoid this area - there are two problems we have in Godot for 2d pixel perfect viewport stretch games which work in combination:

most 2D users do not understand and do not want to understand how GPUs work (understandable)
there are too many options for 2D beginners (the engine allows you to shoot yourself in the foot)

Things like floating point positioning, rotation, scaling, parallax are all things you will want to avoid for this kind of game in most cases, unless you have a deep understanding of the math.
Here's some tips on making pixel games:
https://github.com/lawnjelly/godot-snapping-demo

Without GPU snap:
(here you can see the nearest neighbour affecting filtering every frame)
https://user-images.githubusercontent.com/21999379/151131312-e00be50d-46be-40bb-bc4e-594c9229885b.mp4
With GPU snap:
(mostly stays stable until jumping over a boundary)
https://user-images.githubusercontent.com/21999379/151131347-c429ac4b-f968-469c-b44a-0e7ad6e73283.mp4

@lawnjelly Thanks for your extensive replies, I really appreciate it.
A few thoughts: From a pure user perspective, I think it would be really nice if Godot would be able to offer the different options in a more user-friendly and systematic manner. Of course I am an absolute newb in Godot and what I am asking for could be very hard or impossible to do, please bear with my naivete for a moment.
I have some background in image processing so the link you posted was a nice throwback to my uni time. I am familiar with the concepts, the question to me is how we can apply them in a more user-friendly way. You refer to all the complexities of mapping texels to pixels and note that the users won't want to dive into the nitty-gritty, and I agree. But then again, they shouldn't have to either.
An example: You gave me a very important hint in your last post (3rd video). I implemented something following that concept and it works like a charm:
func _ready():
	var position = Vector2(self.position.x, self.position.y)

func _physics_process(delta):
        var speed = 1.01

	if Input.is_key_pressed(KEY_A):
		position[0] -= speed
	if Input.is_key_pressed(KEY_D):
		position[0] += speed
	if Input.is_key_pressed(KEY_W):
		position[1] -= speed
	if Input.is_key_pressed(KEY_S):
		position[1] -= speed

        # this rounding fixes the problem
	self.position.x = round(position[0])
	self.position.y = round(position[1])

So basically I store my float position in a member variable and round it before writing it to the actual sprite's position.
Now my question is, why isn't this done in the engine automatically once we enable pixel snap? Wouldn't that be exactly what is expected by the user? They rotate by float and move by float and still their sprite robustly snaps to the pixel grid and does not cause any jitter. Sure the users can fix this themselves, but should they have to?
I see that Game Maker does pixel-perfect rotation well and it just works. I see that Unity has a pixel-perfect mode (although I don't know how well this works). I believe Godot should have the same ambitions. I believe in this project enough to be a Patron, and I would also like to help improving it in more tangible ways, as much as my time allows.
Would you be willing to reopen this can of worms again? To me, it looks like Godot is very closely missing an important mark here.
To me it would make a lot of sense to take inventory of all possible 2D modes a user might want, then try to offer project settings that allow to pick exactly the behavior that the user wants. I can't imagine there are that many modes to take into consideration.
I could try and draft a first version of these modes, something like this:

pixel-perfect, palette-perfect (your third video above)
pixel-perfect, bilinear filtering (the behavior I have seen in Godot 4)
mixed resolution (Stardew Valley style)
high-resolution 2D (non-pixel art)

I'm sure there are a few more, but I don't think there would be that many. I'd try and mock some example images for clarity. After that we could discuss problems with the concepts, what modes might be missing, or what corner cases we would have to address. It would probably help me understand what has been tried and why it failed.
This might be a little naive coming from someone who hasn't really looked into the code much, but I really think working out a concept about how more user-friendly pixel support could be established. From what I can see in Godot 3.4, pixel perfectness is almost achieved already.

Would you be willing to reopen this can of worms again?

Not personally, no. I'm mostly on 3D now. But this is open source, anyone else can work on something which interests them.
See these PRs and the linked issues:
#43554
#43813
#44690
#46614
#46615
#46657
Also reduz has some CPU snapping in 4.0.
#43194

@lawnjelly Thanks for your input.
One question, since I'm really new to Godot's organisational structure: Are there any people who decide on higher-level concepts for 2D in Godot? Either officially or inofficialy by virtue of seniority or otherwise? It seems a little bit like there is not a clear definition what would be the expected behavior for certain things.
For instance, Godot 3 works does pixel-perfect rotation with nearest-neighbor interpolation, while Godot 4 seems to have switched to bilinear (which does not work for purist pixel art). So before I start implementing something that may go against some existing design decisions, it would be nice to discuss this with people who have some weight in how things should be in Godot.
If I am right in my observation that some things are not formally defined, I think it would be a good idea to whitepaper these concepts first and then ensure the implementation follows that design.
So, do you know someone who might be interested and knowledgeable enough to nail down these concepts and then realize them in a structured approach? Or should I just go ahead and draft something for discussion? Is there a place for concept discussions, or should I just open another ticket?

For instance, Godot 3 does pixel-perfect rotation with nearest-neighbor interpolation, while Godot 4 seems to have switched to bilinear (which does not work for purist pixel art). So before I start implementing something that may go against some existing design decisions, it would be nice to discuss this with people who have some weight in how things should be in Godot.

In Godot 4.0, the filter mode is no longer stored in the texture itself, but in the location where the texture is used instead. You can change the default 2D filter mode in the Project Settings.

@Calinou Thanks for the proposals link, I'll take a look at it.
About the bilinear thing, I am not talking about the import of sprites (although I welcome having the filter mode in one place instead of resetting it for each and every sprite).
What I was talking about is this:
Godot 3:

Godot 4:

Apparently, the pixels still fit the grid perfectly, but their colors are bilinearly interpolated. For purists that's a no-go, although I would understand how this would be a neat option to have it either way.

Apparently, the pixels still fit the grid perfectly, but their colors are bilinearly interpolated. For purists that's a no-go, although I would understand how this would be a neat option to have it either way.

This sounds like a different issue, and is likely not intended behavior.

@Calinou Thanks, that was it.
It seems like I haven't fully grasped the new settings.
So the global setting is CanvasTexture (I love that this can now be globally set!)
Then each node along the tree can deviate from the global setting or just Inherit (which is the default).
So setting the CanvasTexture to Nearest and leaving everything else, works like a charm, thank you!
So, after all this journey I still have the feeling that we should try and make it easier for pixel art games to get to the setting in a more convenient way. I read that Godot allows providing configs as cfg files, which is nice. I'm thinking whether it might be a good idea to curate a set of commonly used configs for different tasks (2d pixel perfect, 2d mixed resolution, 2d hi resolution, etc) and to offer them as presets to the user in a convenient (but optional) way when they start a new project.
Do you know whether something like this already exists?
If not, I'll try to think a little more about some presets that may make sense and if something comes out of it I'll start a discussion about them. I think that's probably a way better solution than to have a fixed set of project settings because that is too limiting.

@Cerno-b: AFAIK there is nothinh like a "commonly curated set of configs", but that sounds like a use case for https://github.com/godotengine/godot-proposals/issues/1481

@Zireael07 Thank you, that looks like a good starting point

Should this issue be closed? I believe the lawnjelly clarified the behavior, since this is unavoidable.

It can be closed for the time being. It was a Godot 3 issue and I think that it does not occur in Godot 4 anymore. I think there is a number of issues related to pixel perfect games in 4, but they are better discussed elsewhere. The discussion is archived here so it's fine by me to close it.

Thanks for the discussion everyone! As a final closing note, we are very eager to improve the experience of making pixel art games in Godot 4. So please feel free to open a new issue if you stumble onto new problems


Cannot upgrade microk8s v1.27.16 to microk8s v1.28.12

Summary
First of all thanks for the awesome product. I'm using it extensively.
I have a microk8s instance (v1.27.16) on an Ubuntu vm.
This is the OS information:
   Static hostname: machiavelli
         Icon name: computer-vm
           Chassis: vm
        Machine ID: fb84d53edc164b438084094e4c1dd23c
           Boot ID: 201de1f84d7c401695fdc4c72a58dfb3
    Virtualization: microsoft
  Operating System: Ubuntu 20.04.6 LTS
            Kernel: Linux 5.15.0-107-generic
      Architecture: x86-64

I want to upgrade to a newer Kubernetes version (at least 1.29). I am upgrading step by step each minor kubernetes release. I just cordon and drain the node then use snap refresh microk8s --channel 1.xx/stable. So far I was able to update from 1.26 to 1.27. Starting from 1.28 I have a strange behaviour of the node. The node is Ready but it has an incorrect version (I should see 1.28.12 instead of 1.27.16) and pod are not scheduled in it. I see that the node has NodeNotSchedulable in its events but I don't understand what's the problem. Can you help me pinpoint the error and fix it?
Here are some command outputs:
# kubectl get nodes
NAME          STATUS   ROLES    AGE      VERSION
machiavelli   Ready    <none>   2y283d   v1.27.16

# kubectl describe node machiavelli
Name:               machiavelli
Roles:              <none>
Labels:             beta.kubernetes.io/arch=amd64
                    beta.kubernetes.io/os=linux
                    environment=*********
                    ephemeral=false
                    kubernetes.io/arch=amd64
                    kubernetes.io/hostname=machiavelli
                    kubernetes.io/os=linux
                    microk8s.io/cluster=true
                    reserved-for=system
                    topology.cstor.openebs.io/nodeName=machiavelli
                    topology.jiva.openebs.io/nodeName=machiavelli
Annotations:        csi.volume.kubernetes.io/nodeid: {"cstor.csi.openebs.io":"machiavelli","jiva.csi.openebs.io":"machiavelli"}
                    node.alpha.kubernetes.io/ttl: 0
                    projectcalico.org/IPv4Address: 192.168.***.***/24
                    projectcalico.org/IPv4VXLANTunnelAddr: <IP_ADDRESS>
                    volumes.kubernetes.io/controller-managed-attach-detach: true
CreationTimestamp:  Mon, 15 Nov 2021 09:47:16 +0100
Taints:             <none>
Unschedulable:      false
Lease:
  HolderIdentity:  machiavelli
  AcquireTime:     <unset>
  RenewTime:       Sat, 24 Aug 2024 13:42:40 +0200
Conditions:
  Type                 Status  LastHeartbeatTime                 LastTransitionTime                Reason                       Message
  ----                 ------  -----------------                 ------------------                ------                       -------
  NetworkUnavailable   False   Sat, 24 Aug 2024 13:32:14 +0200   Sat, 24 Aug 2024 13:32:14 +0200   CalicoIsUp                   Calico is running on this node
  MemoryPressure       False   Sat, 24 Aug 2024 13:41:18 +0200   Mon, 27 Dec 2021 11:54:43 +0100   KubeletHasSufficientMemory   kubelet has sufficient memory available
  DiskPressure         False   Sat, 24 Aug 2024 13:41:18 +0200   Mon, 27 Dec 2021 11:54:43 +0100   KubeletHasNoDiskPressure     kubelet has no disk pressure
  PIDPressure          False   Sat, 24 Aug 2024 13:41:18 +0200   Mon, 27 Dec 2021 11:54:43 +0100   KubeletHasSufficientPID      kubelet has sufficient PID available
  Ready                True    Sat, 24 Aug 2024 13:41:18 +0200   Sat, 24 Aug 2024 13:31:03 +0200   KubeletReady                 kubelet is posting ready status. AppArmor enabled
Addresses:
  InternalIP:  <IP_ADDRESS>
  Hostname:    machiavelli
Capacity:
  cpu:                8
  ephemeral-storage:  526878168Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             32059776Ki
  pods:               110
Allocatable:
  cpu:                8
  ephemeral-storage:  525829592Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             31957376Ki
  pods:               110
System Info:
  Machine ID:                 fb84d53edc164b438084094e4c1dd23c
  System UUID:                52337ed6-99e0-334c-8e1b-3a405b4bf026
  Boot ID:                    3094f23e-6484-445e-bed9-bfb8c02a4393
  Kernel Version:             5.4.0-90-generic
  OS Image:                   Ubuntu 20.04.6 LTS
  Operating System:           linux
  Architecture:               amd64
  Container Runtime Version:  containerd://1.6.28
  Kubelet Version:            v1.27.16
  Kube-Proxy Version:         v1.27.16
Non-terminated Pods:          (7 in total)
  Namespace                   Name                            CPU Requests  CPU Limits  Memory Requests  Memory Limits  Age
  ---------                   ----                            ------------  ----------  ---------------  -------------  ---
  kube-system                 calico-node-nsx6s               250m (3%)     0 (0%)      0 (0%)           0 (0%)         3h8m
  metallb-system              speaker-5k4hr                   0 (0%)        0 (0%)      0 (0%)           0 (0%)         86d
  monitoring                  node-exporter-2cfzr             0 (0%)        0 (0%)      0 (0%)           0 (0%)         185d
  monitoring                  promtail-sqvqm                  20m (0%)      0 (0%)      64Mi (0%)        128Mi (0%)     291d
  openebs                     openebs-cstor-csi-node-f56pn    0 (0%)        0 (0%)      0 (0%)           0 (0%)         2y283d
  openebs                     openebs-jiva-csi-node-jb9zf     0 (0%)        0 (0%)      0 (0%)           0 (0%)         185d
  openebs                     openebs-ndm-jwbxf               0 (0%)        0 (0%)      0 (0%)           0 (0%)         2y283d
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  Resource           Requests   Limits
  --------           --------   ------
  cpu                270m (3%)  0 (0%)
  memory             64Mi (0%)  128Mi (0%)
  ephemeral-storage  0 (0%)     0 (0%)
  hugepages-1Gi      0 (0%)     0 (0%)
  hugepages-2Mi      0 (0%)     0 (0%)
Events:
  Type     Reason                   Age                  From             Message
  ----     ------                   ----                 ----             -------
  Normal   Starting                 3h9m                 kube-proxy
  Normal   NodeNotSchedulable       3h12m                kubelet          Node machiavelli status is now: NodeNotSchedulable
  Warning  InvalidDiskCapacity      3h9m                 kubelet          invalid capacity 0 on image filesystem
  Normal   Starting                 3h9m                 kubelet          Starting kubelet.

I should be able to upgrade microk8s instance without incurring in strange problems.
Reproduction Steps
I have this problem in a VM, while I have successfully updated microk8s in another 2 VMs. They are similarly configured, there shouldn't be much difference.
Introspection Report
# microk8s inspect
Inspecting system
Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-kubelite is running
  Service snap.microk8s.daemon-k8s-dqlite is running
  Service snap.microk8s.daemon-apiserver-kicker is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy openSSL information to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy asnycio usage and limits to the final report tarball
  Copy inotify max_user_instances and max_user_watches to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster
Inspecting dqlite
  Inspect dqlite

Building the report tarball
  Report tarball is at /var/snap/microk8s/7018/inspection-report-20240824_163332.tar.gz

inspection-report-20240824_163332.tar.gz
Can you suggest a fix?
I didn't understand the problem so I do not have a fix to suggest.
Are you interested in contributing with a fix?
yes

Hi @davgia the error I am seeing in the logs (journalctl -fu snap.microk8s.daemon-kubelite) is that
Aug 24 16:33:14 machiavelli microk8s.daemon-kubelite[262289]: Error: failed to set feature gates from initial flags-based config: unrecognized feature gate: DevicePlugins
Aug 24 16:33:14 machiavelli microk8s.daemon-kubelite[262289]: F0824 16:33:14.674155  262289 daemon.go:57] Kubelet exited failed to set feature gates from initial flags-based config: unrecognized feature gate: DevicePlugins

This is casing the services to enter a crashloop.

Hi @ktsakalozos, thank you so much. I completely missed it. I'll update the kubelet config and let you know once I successfully updated microk8s. Thanks!


Do not invert country flags in /r/europe on Reddit

Inverted colors make the country flags look wrong (for example white becomes black, etc.). Flags are important :) and should be displayed as is, so that national colors are left intact.

So, according to Travis reddit.com/r/europe does not belong alphabetically between react.js and reddit.com/r/GlobalOffensive...

The reason was in case sensitive sort.


User IDs less than 5 characters cause analytics to fail

Expected Behavior

User IDs with less than 5 characters can be used. Analytics events work as normal.
Current Behavior

User Ids with less than 5 characters cause this response from https://api2.amplitude.com/2/httpapi
{
  "code": 400,
  "events_with_invalid_id_lengths": {
    "user_id": [
      1
    ]
  },
  "error": "Invalid id length for user_id or device_id"
}

example captured request:
curl 'https://api2.amplitude.com/2/httpapi' \
-X POST \
-H 'Accept: application/json' \
-H 'User-Agent: Dalvik/2.1.0 (Linux; U; Android 13; Pixel 5 Build/TQ1A.221205.011)' \
-H 'Host: api2.amplitude.com' \
-H 'Connection: close' \
-H 'Content-Length: 955' \
-H 'Content-Type: application/json; charset=utf-8' \
-d '{
  "api_key": "hidden",
  "events": [
    {
      "event_type": "$identify",
      "user_id": "2",
      "device_id": "hidden",
      "time":<PHONE_NUMBER>145,
      "event_properties": {},
      "user_properties": {
        "$set": {
          "Test prop": "test",
        }
      },
      "groups": {},
      "group_properties": {},
      "platform": "Android",
      "os_name": "android",
      "os_version": "13",
      "device_brand": "google",
      "device_manufacturer": "Google",
      "device_model": "Pixel 5",
      "carrier": "",
      "language": "en",
      "ip": "$remote",
      "adid": "00000000-0000-0000-0000-000000000000",
      "event_id": 884,
      "session_id": hidden,
      "insert_id": "hidden",
      "library": "amplitude-analytics-android/1.6.1",
      "android_app_set_id": "hidden"
    },
  ]
}' \
--proxy http://localhost:9090

After a while, the SDK gets in a loop and starts sending 10 failing requests per second

Editing and resending a request with an ID longer than 5 characters results in a successful 200 response.
Possible Solution

Remove 5 character limit.
Enforce the 5 character limit in the kotlin android analytics sdk

Steps to Reproduce

In an Android application, bring in the analytics-android:1.6.1 dependency
Using the amplitude sdk, set the user id to any id that is under 5 characters
In logcat, you will see this logged when sending events: "Handle response, status: BAD_REQUEST, error: Invalid id length for user_id or device_id"
Using a proxy you will see the response mentioned in current behavior above

Environment

Android Plugin Version: 1.6.1
Device: Pixel 5
Device OS and Version:  Android 13

Hi @jp2014, thanks for reporting this! Regarding the 5 characters limit, that's a default limit in our HTTP v2 API. There is a configuration minIdLength that could be used and adjust the value for it.
Thanks for the suggestions on SDK behavior. Sending retries in this scenario could be avoided, and the character limit warning could be enforced earlier. We would make the improvements on our end.
cc @justin-fiedler @yuhao900914 @liuyang1520

Thanks @qingzhuozhen! Good to know. I've updated to use the minIdLength configuration option and it works as expected.


added fuzzy search to themes settings as per #1760

Description
added a simple fuzzy search field to the themes settings page #1760

Added a search textfield and filtering capabilities
Related Issues

#1760

Checklist

[x] I read and understood the contributing guide as well as the code of conduct
[ ] The issues this PR addresses are related to each other
[x] My changes generate no new warnings
[x] My code builds and runs on my machine
[x] My changes are all related to the related issue above
[ ] I documented my code

Screenshots

@activcoding he will need to comment on the issue so we can assign him as he won't be able to assign himself.

@activcoding I'll definitely give that a look thank you.
Feel free to assign to me

will sync this later

@hkarmoush

Please use draft PRs for pull requests that are still in progress and not ready for review.
The way you implemented the algorithm is better, but there is a cleaner approach. Please take a look at how it is used elsewhere. (Hint:  QuickOpenViewModel.swift)

Thanks for your time 😁

Closing due to inactivity.


Fix Steam Deck power button sticking, prevent key scanning returning "any" on out of range values

closes #755

Thank you for the PR


Add a config variable to use symbol addresses instead of LLDB location resolution

Is your feature request related to a problem? Please describe.
We saw an issue where LLDB was generating a uprobe location that was falling in between two instructions. This is bad and can cause memory corruption in the targeted process if the uprobe is attached (via use of the --unsafe flag).
Describe the solution you'd like
Create a config variable that will default to using LLDB location resolution but provides the option of disabling this and using symbol addresses for all probes.
Describe alternative solutions or features you've considered
Deciding not to go with this option: https://github.com/bpftrace/bpftrace/pull/3481

to fix your trouble check this solution click
maybe this will solve your problem.


fix: add mpijobs to kubeflow training role

What this PR does / why we need it:
mpijob resource is missing in kubeflow training role.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
9 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.1%) to 37.184%

Files with Coverage Reduction
New Missed Lines
%

pkg/controller.v1/pytorch/pytorchjob_controller.go
9
62.24%

Totals

Change from base Build<PHONE_NUMBER>:
-0.1%

Covered Lines:
2298

Relevant Lines:
6180

💛  - Coveralls

/ok-to-test