text:
gtk-rs windows cross-compilation

Hello, for some reason I cannot get my program to compile to an .exe following https://gtk-rs.org/docs-src/tutorial/cross
I tried to feed into ~/.cargo/config (as the linker value) both
x86_64-w64-mingw32-gcc
x86_64-w64-mingw32-clang (https://github.com/tpoechtrager/wclang)
Here's my output (a bit lengthy)
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-m64" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o" "-L" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.0.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.1.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.10.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.11.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.12.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.13.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.14.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.15.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.2.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.3.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.4.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.5.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.6.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.7.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.8.rcgu.o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.client.euanij2a-cgu.9.rcgu.o" "-o" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.exe" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/client-d78dae3ad41e9e71.1tyx1m93zuj2o0pq.rcgu.o" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps" "-L" "/home/infrandomness/sources/Client/target/release/deps" "-L" "/home/infrandomness/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-x86_64-pc-windows-gnu-0.4.0/lib" "-L" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib" "-Wl,-Bstatic" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgdk-e231dc617863438e.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libpango-83847e9793be6269.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgdk_pixbuf-bd5a2c603035accb.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgio-1e95201a11424bb1.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures-a0186c2da462d2e0.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libcairo-be9c5654c379f517.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libthiserror-4e089c62abf45013.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libatk-27a976ae1782f353.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libglib-70dac637d0af723a.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_executor-7d176ba90e3d86f0.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_util-5f7a6b0585eac6cc.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libmemchr-9f87befffeb5e2ce.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_io-2fe622d566ba17f9.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libslab-690481a4b29a3087.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libpin_project-fbfb997a770c3b94.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libpin_utils-7ecbc6393f0bbe3f.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_task-3b78e50279f1b7dd.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_channel-42ac2680ce1b7ebe.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_sink-773cb99eb6e28a95.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libfutures_core-3c5be4bdae6e87bc.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk_sys-b2c7883de212409c.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libatk_sys-b081cced37cbb998.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgdk_sys-84bb7ced76ba5387.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libpango_sys-535c2ed849e25b11.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgdk_pixbuf_sys-44ca1219fe3e90c5.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgio_sys-7a667874fc12b96a.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libwinapi-c90bd75202752b5a.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgobject_sys-5e02c20909c39500.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libcairo_sys-82ffed062a306987.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libglib_sys-337ae18614871872.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libonce_cell-4cc78dd4c70110e0.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libbitflags-ebacaee370a91844.rlib" "/home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/liblibc-41215a640495cfe2.rlib" "-Wl,--start-group" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libstd-0caf4d662a4ef5f8.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libpanic_unwind-8a59b16c39611151.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libobject-e13e98fb6ab0eff1.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libaddr2line-59ff01db0f1b8d16.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libgimli-62d802be845390cf.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_demangle-5e0f7ff3c15fc8e2.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libhashbrown-a38440dc081fef14.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_std_workspace_alloc-b9a3b45dfac82ae1.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libunwind-4fd14f24bde027d2.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcfg_if-f4096be20188f30b.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liblibc-af13a5c5272cb500.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/liballoc-06222cee570f8141.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/librustc_std_workspace_core-2486433ecd174ccd.rlib" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcore-fe3777168aed5f4e.rlib" "-Wl,--end-group" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/libcompiler_builtins-46cac4d8e27c6a45.rlib" "-Wl,-Bdynamic" "-lgtk-3" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-latk-1.0" "-lcairo-gobject" "-lcairo" "-lgdk_pixbuf-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-latk-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgdk-3" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lwinapi_advapi32" "-lwinapi_cfgmgr32" "-lwinapi_kernel32" "-lwinapi_user32" "-lwinapi_ws2_32" "-lgobject-2.0" "-lglib-2.0" "-lcairo-gobject" "-lgobject-2.0" "-lglib-2.0" "-lcairo" "-lglib-2.0" "-ladvapi32" "-lws2_32" "-luserenv" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "/home/infrandomness/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsend.o"
  = note: /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.11.rcgu.o):gtk.byeq05nf-cgu.1:(.text+0x24a0): undefined reference to `gtk_socket_get_type'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.11.rcgu.o):gtk.byeq05nf-cgu.1:(.text+0x3920): undefined reference to `gtk_plug_get_type'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.15.rcgu.o):gtk.byeq05nf-cgu.1:(.text+0x17cf9): undefined reference to `gtk_plug_new'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.15.rcgu.o):gtk.byeq05nf-cgu.1:(.text+0x17dc0): undefined reference to `gtk_plug_new_for_display'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.15.rcgu.o):gtk.byeq05nf-cgu.1:(.text+0x19bfc): undefined reference to `gtk_plug_get_type'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.15.rcgu.o):gtk.byeq05nf-cgu.1:(.text+0x2f645): undefined reference to `gtk_plug_get_type'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.8.rcgu.o):gtk.byeq05nf-cgu.8:(.text+0xefc4): undefined reference to `gtk_socket_new'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.8.rcgu.o):gtk.byeq05nf-cgu.8:(.text+0x100a8): undefined reference to `gtk_socket_get_type'
          /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: /home/infrandomness/sources/Client/target/x86_64-pc-windows-gnu/release/deps/libgtk-c5cd68c7fe20d3a0.rlib(gtk-c5cd68c7fe20d3a0.gtk.byeq05nf-cgu.8.rcgu.o):gtk.byeq05nf-cgu.8:(.text+0x19fa5): undefined reference to `gtk_socket_get_type'
          collect2: error: ld returned 1 exit status

My environment:
OS : Linux (fedora 33 kde spin)
rustc : 1.48.0
gtk-rs : 0.9.2 (features version 3_24, same as the host trying to compile)
x86_64-w64-mingw32-gcc : (GCC) 10.2.1 20200723 (Fedora MinGW 10.2.1-2.fc33)
x86_64-w64-mingw32-clang : clang version 11.0.0 (Fedora 11.0.0-2.fc33)
gtk3-devel : gtk3-devel-3.24.24-1.fc33.x86_64
ld : GNU ld version 2.35-15.fc33
(ask me if you need another information)

According to https://github.com/gtk-rs/gtk/blob/0.9.0/Gir.toml#L1957 this should only be enabled when the X11 backend is available from gdk.
What's the output of pkg-config --variable=targets gdk-3.0? Make sure to have it use the correct (mingw64!) pkg-config and also point it to the correct location of pkg-config files.

The output of pkg-config --variable=targets gdk-3.0 is
x11 broadway wayland

So there's a problem in your setup then. Your pkg-config seems to point at the Linux versions of everything.

Okay, I was missing some environment variables there, fixed.

Okay, I was missing some environment variables there, fixed.

I have the same issue. Can you tell me how to solve it? Thank you.

source: gharchive/issue

authors: InfRandomness chen-gz sdroege

license: MIT

license_type: permissive

license_source: github-api


text:
Remove video atom

What are you changing?

remove video atom from atoms rendering

Why?

we're migrating atoms to dcr

@jamesmockett should be fixed now

source: gharchive/pull-request

repo: guardian/csnx


text:
Update scalatest to 3.2.12

Updates org.scalatest:scalatest from 3.2.9 to 3.2.12.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalatest", artifactId = "scalatest" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequest = { frequency = "@monthly" },
  dependency = { groupId = "org.scalatest", artifactId = "scalatest" }
}]

labels: test-library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #79.


text:
merge

merge

a


text:
Estudar aplicação multimídia: sinalização

Depende de https://github.com/gugon/smu20222/issues/7 e https://github.com/gugon/smu20222/issues/16.

Realizado!


text:
add llama.cpp interface

This PR adds a llama.cpp interface to the pythonic2 branch of guidance.

Ran it locally and looks good!

authors: paulbkoch slundberg

repo: guidance-ai/guidance


text:
[WIP] [Bug] Phi3 Tokeniser

Triggered by #880 , it appears that there's trouble with another Phi3 tokeniser.

I think this is a great start! Since this PR is in the spirit of solving #880, I think the next step would be to go beyond the loading smoke/round trip tests and move towards replicating our full initialization logic here (e.g. the special unicode symbol recovery tests, existence of a byte decoder, checking for a warning on a sentence piece fallback for the SP based tokenizers, etc.)

I've been thinking in that direction. The issue is that tests like that are only going to work if we remove that logic from TransformersTokenizer itself. And it does have some value there, given the rather wide variety of models which might get thrown at us; given an unknown tokeniser, it guarantees a quick error, rather than a more esoteric one later.

I've been thinking in that direction. The issue is that tests like that are only going to work if we remove that logic from TransformersTokenizer itself. And it does have some value there, given the rather wide variety of models which might get thrown at us; given an unknown tokeniser, it guarantees a quick error, rather than a more esoteric one later.

I'm not quite sure I follow -- why would we have to strip the logic from TransformersTokenizer? We could just duplicate in the test or refactor to a series of utility functions that get called if we have to, right? I think we're much more likely to actually detect real errors in that stage of the pipeline (vs. smoke initialization/roundtrips)

I've been thinking in that direction. The issue is that tests like that are only going to work if we remove that logic from TransformersTokenizer itself. And it does have some value there, given the rather wide variety of models which might get thrown at us; given an unknown tokeniser, it guarantees a quick error, rather than a more esoteric one later.

I'm not quite sure I follow -- why would we have to strip the logic from TransformersTokenizer? We could just duplicate in the test or refactor to a series of utility functions that get called if we have to, right? I think we're much more likely to actually detect real errors in that stage of the pipeline (vs. smoke initialization/roundtrips), so I'd love to make sure we're actively monitoring that stage of the init logic

Because it's rather hard to test an object if its constructor throws an exception. As I said though, there is value in that assert given the rather wider variety of things which might get thrown at us.

Codecov Report
Attention: Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 57.47%. Comparing base (d5d07dc) to head (3183732).

Files
Patch %
Lines

guidance/models/transformers/_transformers.py
0.00%
4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #899      +/-   ##
==========================================
+ Coverage   57.10%   57.47%   +0.36%
==========================================
  Files          64       64
  Lines        4705     4703       -2
==========================================
+ Hits         2687     2703      +16
+ Misses       2018     2000      -18

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


text:
Using an exponent as label raises error when filtering runs

If you use an exponent as a run label then guild compare/view/tensorboard will raise TypeError: argument of type 'float' is not iterable if you try to filter runs by label.
- model: label_bug
  description: MWE for exponent label bug
  operations:
    train:
      main: guild.pass

If you then execute the train operation as follows:
guild run train --label 1e6
then any filtering by label:
guild compare --label any_filter
Will raise a TypeError, the final part of that traceback is:
  File "/home/dhalion-linux/miniconda3/envs/py3/lib/python3.6/site-packages/guild/var.py", line 138, in <genexpr>
    filter = lambda r: all((f(r) for f in filters))
  File "/home/dhalion-linux/miniconda3/envs/py3/lib/python3.6/site-packages/guild/commands/runs_impl.py", line 188, in f
    return any((l in run_label for l in labels))
  File "/home/dhalion-linux/miniconda3/envs/py3/lib/python3.6/site-packages/guild/commands/runs_impl.py", line 188, in <genexpr>
    return any((l in run_label for l in labels))
TypeError: argument of type 'float' is not iterable

Interestingly, if you explicitly use a float (which seems to be the source of the error) then there is no issue, i.e.:
guild run train --label 1.0
Doesn't raise any errors in guild compare.

Should be fixed in 0.7.0. If you're still seeing this behavior, please feel free to re-open. Thanks again!

repo: guildai/guildai


text:
issue MYSQL: 1071 Specified key was too long

To solve the issue in time of artisan migrate

Hum are you ok with your PRs?

repo: guillaumebriday/laravel-blog

license: mit

license_source: bigquery


text:
replies only hello, doesn't responds to typing

here when i copy the content from corpus it gives me correct reply, but when i type the exact sentence or type anything it replies only hello... help me

I think that's depends on how comparison methods you are configured, try to use JaccardSimilarity http://chatterbot.readthedocs.io/en/stable/comparisons.html#chatterbot.comparisons.JaccardSimilarity

sir,
actually used the same as in project :
https://github.com/gunthercox/Chatterbot/tree/master/examples/django_app .
I m not getting what's going wrong. can you please help me out with it?
On Fri, Mar 23, 2018 at 11:25 PM, Mallikarjunarao Kosuri <
notifications@github.com> wrote:

I think that's depends on how comparison methods you are configured, try
to use JaccardSimilarity http://chatterbot.readthedocs.
io/en/stable/comparisons.html#chatterbot.comparisons.JaccardSimilarity
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gunthercox/ChatterBot/issues/1259#issuecomment-375750085,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AcjxfxmkB6G1V5_6G16QAg_1-0e_AQS0ks5thTb4gaJpZM4S5C1k
.

basically whatever you type in "type here box" it responds with hello.. can you please help me

http://chatterbot.readthedocs.io/en/stable/django/training.html

authors: kunalwanikar vkosuri

repo: gunthercox/ChatterBot


text:
Uncaught SyntaxError: Unexpected token export

Fix bodyParsing.js modular usage.
Export default {...} was got Uncaught SyntaxError: Unexpected token export.  Module.exports will fix that.

Thanks! I'll merge it as soon as I'm able to test it.

authors: gurghet ruslankonev

repo: gurghet/vue-smart-table


text:
Add some more phoenix mix commands

I've added some other commands that i find useful.

Thank you @Tankard :)

authors: Tankard gusaiani

repo: gusaiani/elixir-oh-my-zsh


text:
Onde está os slides da aula 04?

Procurei os slides da aula 04 e não encontrei.

Como não ter essa dúvida.. kkk

Ops! Fazendo o curso hj e treinando... rsrsrs Saudações

kkkkk fala galera, tamo junto.

repo: gustavoguanabara/git-github


text:
Error if @jspm/generator is in dependency tree

It's similar to https://github.com/jspm/generator/issues/147.
The error occurs when @jspm/generator is in dependency graph and built using chomp jspm extension.
clearCache(); doesn't seem to work this time.
chomp build:error:html
  public/error.html invalidated
🞂 public/error.html
file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:1273
        throw new JspmError(`Unable to resolve package ${latestTarget.registry}:${latestTarget.name} to "${latestTarget.range}"${importedFrom(parentUrl)}`);
              ^

JspmError: Unable to resolve package npm:@babel/helpers to "^7.19.0" imported from https://ga.jspm.io/npm:@babel/core@7.19.0/lib/index.js
    at Resolver.resolveLatestTarget (file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:1273:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Installer.installTarget (file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:2179:24)
    at async TraceMap.resolve (file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:2606:27)
    at async TraceMap.visit (file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:2383:26)
    at async file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:2418:13
    at async Promise.all (index 13)
    at async TraceMap.visit (file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:2413:9)
    at async file:///Users/user/@jspm/jspm-generator-tests/node_modules/@jspm/generator/dist/generator-64b14857.js:2418:13
    at async Promise.all (index 6) {
  jspmError: true,
  code: undefined
}
x public/error.html [1.519082681s]
Unable to complete all tasks.

Thanks for posting, this was due to a build backlog. The backlog should clear this weekend, but for now this was fixed with a manual rebuild.

authors: fusionstrings guybedford

repo: guybedford/chomp-extensions


text:
getEffectiveUrl

How can I get the getEffectiveUrl URL in 6.0?

The on_stats request option can give you this information: http://docs.guzzlephp.org/en/latest/request-options.html#on-stats

repo: guzzle/guzzle


text:
New release

Hi,
Thanks a lot for this beautiful and legible theme.
Could you please release a new version? A released fix for #23 in PyPI would be great.
Thanks.

@mtdowling  Will there be a new release with the recent merged commits please? Thanks!

Ping!
Hello all, love guzzle, been using it for years in PHP.
Using python now at my current employer and would love to have this be the style of my internal sphinx docs. But we only import stable releases. Would it be possible to create a stable tag with the current set of commits?
Thanks!

authors: carlos-jenkins rnc vpassapera


text:
How to make spaces ?

Hello, for the theme on your website http://docs.guzzlephp.org/en/stable/ , i saw you spaced the entries of the 'table of contents'. When i use the template, my entries are on the  verry left of my screen(http://www.bilder-upload.eu/show.php?file=2c4e13-1504730710.png)
How do i add spaces there ?

This code section seems make it work, so closed.
.. toctree::
:maxdepth: 2
here


text:
Could not pass event PlayerJoinEvent to OldCombatMechanics v1.6.6

Info

Server version: paper spigot 1.12.2
OldCombatMechanics version: 1.6.6
Server log file:
[04:43:16] [Server thread/ERROR]: Could not pass event PlayerJoinEvent to OldCombatMechanics v1.6.6
org.bukkit.event.EventException: null
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[Paper-1508.jar:git-Paper-1508]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[Paper-1508.jar:git-Paper-1508]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[Paper-1508.jar:git-Paper-1508]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:527) ~[Paper-1508.jar:git-Paper-1508]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:512) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.PlayerList.onPlayerJoin(PlayerList.java:370) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.PlayerList.a(PlayerList.java:183) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.LoginListener.b(LoginListener.java:178) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.LoginListener.e(LoginListener.java:68) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:255) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:150) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:947) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:773) ~[Paper-1508.jar:git-Paper-1508]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) ~[Paper-1508.jar:git-Paper-1508]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
Caused by: java.lang.RuntimeException: java.util.NoSuchElementException: packet_handler
at gvlfm78.plugin.OldCombatMechanics.utilities.packet.PacketInjector.(PacketInjector.java:43) ~[?:?]
at gvlfm78.plugin.OldCombatMechanics.utilities.packet.PacketManager.addListener(PacketManager.java:73) ~[?:?]
at gvlfm78.plugin.OldCombatMechanics.module.ModulePlayerCollisions.onPlayerLogin(ModulePlayerCollisions.java:31) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor44.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[Paper-1508.jar:git-Paper-1508]
... 15 more
Caused by: java.util.NoSuchElementException: packet_handler
at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1119) ~[Paper-1508.jar:git-Paper-1508]
at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:260) ~[Paper-1508.jar:git-Paper-1508]
at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:249) ~[Paper-1508.jar:git-Paper-1508]
at com.comphenix.protocol.injector.netty.PipelineProxy.addBefore(PipelineProxy.java:66) ~[?:?]
at com.comphenix.protocol.injector.netty.ChannelInjector$3$1.addBefore(ChannelInjector.java:274) ~[?:?]
at gvlfm78.plugin.OldCombatMechanics.utilities.packet.PacketInjector.attach(PacketInjector.java:69) ~[?:?]
at gvlfm78.plugin.OldCombatMechanics.utilities.packet.PacketInjector.(PacketInjector.java:41) ~[?:?]
at gvlfm78.plugin.OldCombatMechanics.utilities.packet.PacketManager.addListener(PacketManager.java:73) ~[?:?]
at gvlfm78.plugin.OldCombatMechanics.module.ModulePlayerCollisions.onPlayerLogin(ModulePlayerCollisions.java:31) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor44.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[Paper-1508.jar:git-Paper-1508]
... 15 more
OldCombatMechanics config file:

Problem Description

can you fix this error on console?  Could not pass event PlayerJoinEvent to OldCombatMechanics v1.6.6

Can I get a list of all plugins and the output of /version?

private plugin sorry

Huh? That doesn't mean that you can post the server version and a list of plugins (names are rarely that private, or you blur it out), but in order to properly judge the problem I need to know about any other plugin that might modify the netty side of things and your exact server version.
You can also consider this ticket solved and live with the error, but that sounds like an inconvenient solution to me :)

license: unlicense


text:
[Feature] Color Zaishen Quest Markers

My idea is, if the character has already finished  for example the current daily zaishen mission in NM and HM, to color the exklamation mark not in green, but in gray instead.
So i can directly see, i dont have to do this for gwamm.
Yes i know i could look it up in the completion module, but this would be just a cool QOL  feature.

Also implement highlighting on the daily quests window - in the proposed state its only relevant when you're in an outpost with the daily quest givers, which would be a bit niche

lol why would you park your characters anywhere if you're a casual player - I check character completion and the daily quests window if I want a bit of down time playing the game

We can't change the colour of the overhead markers, but we'll shelf this until you've had a play with the changes to the daily quest window

Thanks for adding this.

repo: gwdevhub/GWToolboxpp


text:
类似于消息签名的功能，来验证用户的权限

现状
目前scatter在登录方面，大多数入口都会放宽要求，不会要求用户输入密码，这已经是常态。
我相信这也将会是 GScatter 未来的常态，虽然现在已经如此了。
未来
基于这样的应用场景，更需要一个类似于消息签名的功能，来满足DAPP检验使用者是否真实的持有私钥。
以保证进入的用户拥有足够的权限。

close 77b96f9d343975e7ef9eeab063fc3f66f65138ad
文档见这里 https://github.com/gxchain/gscatter-js/blob/master/README-cn.md#签名

authors: DophinL chenluyong

repo: gxchain/GScatter


text:
img_max_width_100

@gyorb switching this to 100% will mobile-optimize the images.

I've updated the commit message and extended the changelog in #34
Thanks for the fix!

authors: gyorb tkjef

repo: gyorb/hugo-dusk


text:
Color for unfocused item of SelectView

Question
Problem description
I'm using Cursive in fui and got this issue about default color for unfocused item in SelectView
https://github.com/xliiv/fui/issues/42
which looks like this:

Should this be changed in cursive or in fui?
Environment

Operating system: Fedora release 27
Backend used: ncurses (the default one)
Current locale

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Cursive version: master

Hi!
SelectView uses the Highlight color when it's focused, and the Highlight_Inactive when it's not focused.
This usually makes sense, as SelectView are mostly used when they're focused.
You can change the theme for a more distinctive color if you prefer, but then it would apply to the entire application.
There's currently no support for partial themes, where a theme would only apply to some views. If that's something you need, it shouldn't be too hard to add.

I hoped that you would get convinced to change Highlight_Inactive to Light(Black) or something. ;)
But if i have to change it in fui, that's fine.
Thanks for exhausting answer :)

The default theme tries to reproduce the look of existing tools like nmtui, but the theme is configurable exactly to meet the need of different applications.

Ok I got it.. I'm creating an issue about color change in nmtui project, THEN we'll change cursive's pallet :+1:
just kidding.. :wink:
Overriding default theme works perfect. :)

authors: gyscos xliiv

repo: gyscos/Cursive


text:
🛑 Undertale社区维基 - UTCWIKI is down

In 0e50b55, Undertale社区维基 - UTCWIKI (https://utcwiki.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Undertale社区维基 - UTCWIKI is back up in 614f27b after 10 minutes.

repo: gzombiejun/upptime


text:
🛑 Undertale社区档案馆 - UTCARC is down

In f8a2951, Undertale社区档案馆 - UTCARC (https://arc.utcwiki.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Undertale社区档案馆 - UTCARC is back up in 616b535 after 13 minutes.


text:
takipçilerini engelle

yazarların (trollerin) takipçilerini profillerindeki üç noktadan da engelleme özelliği getirilebilir (bkz: medya). Bunun yanı sıra aynı anda hem başlık hem de kişi engelleme veya trollün takipçilerinin her biri için başlık da engelleme özelliği yapılıyorsa yapılabilir. Detaylara çok hakim değilim, sadece görüşümü paylaşmak istedim belki olur diye.

Merhaba, yazar profiline takipçilerini engelle özelliği gelmesi gerekiyor, şu an yapılacaklar listemde. diğer isteğinizi anlayamadım. zaten herhangi bir engel işlemi (engelle veya sessize al) + başlıklarını engelle şeklinde gerçekleşiyor. engelle veya sessize al seçeneği ise ayarlarda mevcut.

v2.6 ile yazarların profil sayfalarına takipçilerini engelle butonu eklendi.

authors: Spica-Suzuki h-enes-simsek

repo: h-enes-simsek/EksiEngel


text:
How can we create and manage custom taxonomies for all content types.

Summary
I can see "contributor" tag appearing for blog posts. What I would like to see is similar mechanism to add more custom taxonomies across the site including docs.
Basic example
antora-default-ui-hugo-theme.
Motivation
Why are we doing this? What use cases does it support? What is the expected outcome?

Categories and tags for blog pages will be covered with https://github.com/h-enk/doks/issues/501
I don't think categories and tags (or other taxonomies) for documentation pages is what I would want for Doks. I think (sub)sections are more appropriate (see e.g. the Gatsby docs) — and that's covered for with Doks v0.4.0

authors: adarshdli h-enk

repo: h-enk/doks


text:
feat(#141): embeddings from mcw

closes #141

PR-Codex overview
This PR updates the handling of data related to repositories by changing the column name from top to mcw and updating the associated CSV file for testing. It reflects a shift in the data structure used in the embedding process.
Detailed summary

Renamed embed.csv to to-embed.csv.
Updated the file path in test_embed.py to reference to-embed.csv.
Changed the DataFrame column from top to mcw in extract.py.
Updated the embedding process to use mcw instead of top in embed.py.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@rultor merge

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here.

@rultor merge

@h1alexbel Done! FYI, the full log is here (took me 9min).

@rultor release, tag is 0.0.4

@rultor release, tag is 0.0.4

@h1alexbel OK, I will release it now. Please check the progress here.

@rultor release, tag is 0.0.4

@h1alexbel Done! FYI, the full log is here (took me 16min).


text:
[CODE IMPROVEMENT] Improve mask_prompt_labels

🔧 Proposed code refactoring
When setting mask_prompt_labels, we are currently only unmasking the last answer in a chain.
However, we should probably unmask all answers in the chain, specifically when setting limit_chained_samples.

my mistake, we already do it correctly


text:
tooltips

adds tooltips to all experiment settings
closes #36

Thanks!
The following tooltips are missing:

Validation Dataframe
Sync Batch Normalization
Use Fsdp

Shall we remove the sync BN? Not too useful for Transformers I guess.
And shall we also have some sort of developer guide at some point that one needs to add this tooltip etc. But not too important at this point.

Thank you for the review, I removed BN sync and added the two missing tooltips.
If a tooltip doesn't exist, it will just not be shown in the UI, so I don't think that it is super important to have a developer guide for this matter.


text:
consider improved memory handling for 8-bit

https://github.com/lm-sys/FastChat/pull/566/files

assume updates to trans/bitsandbytes improved


text:
PO-UCT rollout not terminated after reaching goal state

Hi,
In POMCP, the rollout terminates when either maximum depth or a goal state is reached. For a reference, please see line 327 of mcts.cpp.
I wonder if you need a check at the end of the while loop in po_uct.rollout
if state.terminal:
    break

To reproduce the bug, please create a RockSample(1, 0), change one of the default arguments of POMCP, max_depth=10000.
It is probably not a severe bug for your particular implementation of RSRewardModel.sample in terms of getting the correct values because transitioning into exit area again after already in the exit area receives 0 reward. Also in the case where state space is large and max_depth is small, max_depth is likely to be reached before a goal state. But it is nice to not have to run many iterations of rollouts when it is not necessary, and possibly important for a different reward implementation.
Thank you!

Thanks for the report.
What's the difference between terminating during PO-UCT rollout versus having a reward model that only returns 0 reward after reaching the terminal state?
I didn't include that in the PO-UCT because it's not always the case that there is a terminal state in POMDPs (it's not part of the standard definition). You may have terminal states in some domains, like rock sample, but for domains like Tiger, the domain description explicitly says that after you open the door, the game resets (instead of terminates).

If you desire the behavior of terminating rollout after reaching terminal state, I think right now you could create a child class of POUCT and implement this behavior for your domain.

authors: jasonxyliu zkytony


text:
Server and client coexistance

I'm working on porting an existing project that creates a client, subscribes to services from two different BLE servers and then combines the two services on it's own (single) BLE server. Both the NimBLE Client and the Server work well separately however if I try to run both the client and server at the same time I get a random kernel panic on the esp32. I've double checked that I'm not initializing the BLEdevice twice.
Interestingly it doesn't crash if i start the server before the client (although not stable) but it causes a kernel panic immediately on the following line if a client previously is started and device connected.
NimBLEServer *pServer = BLEDevice::createServer();
I was working on this late last night. I'll try again this morning first by increasing the NimBLE stack size.
Anyone else had luck with client and server coexistance with NimBLE on arduino ESP32 yet?
Thanks again to h2zero! So far this library looks awesome!

Yep, I have a similar project and it works without problems. You'll need two clients though, one per remote server!

Thanks! Good to know! I discovered I have some issues with my Client setup that I think are the root of the issue.

authors: doudar elguiri


text:
Allow only certain bonded client to connect to NimBLEServer. Whitelist in advertising does not work for already bonded peers

Hi, first of all thanks a lot for this library! So much better than the bluedroid based library. Solved a lot of issues.
I want an ESP32 to act as a server, to be precise as an HID bluetooth keyboard.
I need to connect to different clients (in my case a FireTV and an AppleTV) and to switch the connection to them at runtime. Only one should be connected at the same time.
I am able to pair and bond both of them. One after the other. In the list of bonded peers I have two peers afterwards.
Remark: It is possible to connect both of them at the same time, if advertising is not stopped after the first connect. But it does not make sense because both devices would receive the same keyboard keys. I cannot force certain keys to be send to a certain peer.
So to achieve switching between the two peers, I tried to:

NimBLEDevice::getServer()->disconnect(...)  // the currently connected peer
add the other device to the whitelist (AppleTV or FireTV) and restart advertising with advertising->setScanFilter(true, true);

The whitelist filter works in principle (bonding is only possible based on the whitelist). But if a client is already bonded, it can reconnect no matter if there is a whitelist set in advertising or not.
So how can I force only a certain bonded client to connect to the NimBLEServer?
I tried to pair the HID without bonding, NimBLEDevice::setSecurityAuth(false, false, false);, but when doing so, reconnects completely fail. It seems that keyboards always need to be bonded, not only to be paired.

This should now be resolved in the master branch, use the new onIdentity client and server callback to know when you can store the ID address and add it to the whitelist.

@h2zero Thanks for the hint that the new onIdentity callback was introduced.
Could you please give me some advice on how to use this new callback?
I pair the ESP32 as a HID to a client, let's say a Windows machine. My server callback onIdentity and also the default callback (if I don't provide my own one) is never called. That's because the event BLE_GAP_EVENT_IDENTITY_RESOLVED never fires.
But even if it fired, what should I do in the callback? My problem is, that if a client connects for the first time, it is automatically added to the list of bonded peers. And whenever I start advertising again (with a whitelist), the whitelist is not used if an already bonded client connects. The whitelist only works for not already bonded clients. How does the new callback help here?

The use case for this callback is when bonding with devices that use a random resolvable address and you want to add the id address to the whitelist. The onAuthenticationComplete callback did not provide the correct identity address so adding it to the whitelist there wouldn't have the desired effect.
To answer your question though, it doesn't help your case please ignore my previous comment as I thought this was a different issue and didn't read it again.
Have you tried clearing the whitelist and then adding the device you want? Alternatively you could try using directed advertising.

Directed advertising sounds good. I tried this:
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
When doing so, a bonded client does not reconnect at all. No matter if I use a whitelist or not.
How do I tell the directed advertising to which client the advertising should be sent?
BTW, clearing the whitelist of course would work, but this is not want I need. I need two clients bonded at the same time. I need to switch the connection between these two bonded clients at runtime.
I can successfully bond two clients. I simply power off the first one while the second one gets bonded.
When starting advertising with two bonded clients, it is random which one connects first. I need to control which of the two bonded clients connects to the server.

What I meant was you could just change the whitelist before advertising to have one or the other device in it instead of both.
Directed advertising sadly does not have an API but you can use custom data like so:
// 0x17 = public address, change to 0x18 for random, 0x11 - 0x66 = address
char directedAdv[8] = {0x17, 0x06, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66};
NimBLEAdvertisementData data;
data.addData(directedAdv, sizeof(directedAdv));
advertising->setAdvertisementData(data);
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
advertising->start();

Thanks for the snippet. I tried it, with the following result:
D NimBLEAdvertising: >> Advertising start: customAdvData: 1, customScanResponseData: 0
primary service
           uuid 0x1800
         handle 1
     end_handle 5
characteristic
           uuid 0x2a00
...
E NimBLEAdvertising: Unable to advertise - Duration too long
D NimBLEAdvertising: << Advertising start

I think the Unable to advertise - Duration too long should not be there. At least the already bonded client does not reconnect.
Do you have any idea what could have gone wrong?

I think the duration is limited to 2 seconds for directed advertising, so you would have to restart it every time it ends with that duration.

Got it working. But not with your snippet. I think it cannot work.
Unable to advertise - Duration too long is misleading. This is not the reason. The message appears immediatly, no waiting time at all.
Why it is not working: when calling NimBLEAdvertising::start(), this line is called. In the next line, since dirAddr == nullptr, peerAddr will be NULL when calling ble_gap_adv_start
In ble_gap_adv_start this line is executed, with direct_addr being NULL.
In ble_gap_adv_validate, because of this line, the result is BLE_HS_EINVAL.
So for directed advertising to work, you must provide the peer address when calling NimBLEAdvertising::start(), like in this example:
// either public address
NimBLEAddress directedAddress = NimBLEAddress("11:22:33.44:55:66", BLE_ADDR_PUBLIC);
// or in case of a random address
//NimBLEAddress directedAddress = NimBLEAddress("11:22:33.44:55:66", BLE_ADDR_RANDOM);
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
advertising->start(BLE_HS_FOREVER, nullptr, &directedAddress);

So thanks for your support, for me this is now working. I tested it with public and random addresses.
I can connect and bond several devices - one after each other, turning the already bonded devices off while bonding the next one.
With directed advertising I can connect exactly to the device I want to connect to. Switching the connection is very fast.

Glad you got it working, I completely forgot about that parameter being added to advertising start call 👍

The directed address should be the static id address of the device, which is what is stored when bonded.

If you are not sure which is the static id address, you can use
NimBLEConnInfo connInfo = BLEDevice::getServer()->getPeerIDInfo(0);
Serial.println(BLEAddress(connInfo.getAddress()).toString().c_str());

or
Serial.println(BLEDevice::getBondedAddress(0).toString().c_str());

(assuming that you have only one device bonded and connected).
Then this should work
directedAddress = NimBLEAddress("11:22:33.44:55:66", BLE_ADDR_PUBLIC);
advertising->setScanFilter(false, false);
advertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
advertising->start(BLE_HS_FOREVER, nullptr, &directedAddress);

But I also struggled with direct advertisement to devices with random addresses.
To be honest, I can't remember exactly

if it finally worked
or if I had to tell the mobile phone to not use random addresses

I believe directed advertising worked even if the phone used RPA.
But I just tried to repeat the test and was not successfull.
Since phones are not my use case, but only media devices which are not using RPA, I don't have a lot of experience with devices using RPA.

OK I did a few more tests with different devices and can see a pattern..
If the static address in your check above MATCHES the ID address (BLEAddress(connInfo.getIdAddress()).toString().c_str()), then we know the device is NOT using RPA.
An Android TV device with no RPA (Id address == address), works just fine with direct advertising.
An Android phone with RPA (Id address != address), is causing issues. Switching the directed address to BLE_ADDR_RANDOM doesn't seem to work for the phone (at least the one I tried).
I looked into some other Bluetooth API's that also support direct advertising and saw Zephyr - they 2 different directed advertising modes: Zephyr. Does that suggest there's some else lower in stack that needs to support this?

It would t make sense to direct advertising to an RPA because it could change at any time, most phones change their address every 15 minutes.
I think this may be resolved in the master branch which provides a callback when the identity address is received.

Another detail: it seems only 2 bonds can be saved in the NVS (I'm using an ESP32). If I bond the third peer, one of the older two is deleted.
I saw a lot uses of "BLE_STORE_MAX_BONDS" in the code, but I cannot find where it is defined or where it can be changed.
@h2zero could you please help out?

@rac146 which version of NimBLE are you using? Currently for me directed advertising only works with master branch, not with 1.4.2 ...

I've been using master branch..

I saw a lot uses of "BLE_STORE_MAX_BONDS" in the code, but I cannot find where it is defined or where it can be changed.
@h2zero could you please help out?

https://github.com/h2zero/NimBLE-Arduino/blob/f68bb5f9607c33021ce213c4afa0e2cf7280cc72/src/nimconfig.h#L120
If you're using the master branch you should obtain the ID address in this new callback:
https://github.com/h2zero/NimBLE-Arduino/blob/f68bb5f9607c33021ce213c4afa0e2cf7280cc72/src/NimBLEServer.h#L207

I saw a lot uses of "BLE_STORE_MAX_BONDS" in the code, but I cannot find where it is defined or where it can be changed.
@h2zero could you please help out?

https://github.com/h2zero/NimBLE-Arduino/blob/f68bb5f9607c33021ce213c4afa0e2cf7280cc72/src/nimconfig.h#L120

@h2zero thanks for pointing me to // #define CONFIG_BT_NIMBLE_MAX_BONDS 3
It turned out that this was not the limiting factor, since only 2 bonds have been stored.
In my case it seems that I have 4 CCCDs, so each bond takes 4 CCCDs.
Default is // #define CONFIG_BT_NIMBLE_MAX_CCCDS 8
If I raise the maximum numbers of CCCDs to 12, I can store up to 3 bonds.

I've been using master branch..

@rac146 Do you think you could repeat the test with version 1.4.2, just to be sure that direct advertising is really not working in the latest official release? Your code should almost stay the same. Only the callbacks for onConnect and onDisconnect changed.
In version 2.0.0 (master) you get NimBLEConnInfo& connInfo in these callbacks as parameters.
In version 1.4.2 you can get the same information inside the callback with NimBLEConnInfo connInfo = pServer->getPeerInfo(0);
If I understand everything correctly, the situation is:

NimBLE version
direct advertising for public addresses
direct advertising for random addresses

1.4.2
not working
not working

2.0.0 (master)
working
not working

Unfortunately I cannot switch in my published project to the master branch, as long as there are still breaking changes. I ran into at least one between March and October. That's totally fine for a master branch, but I cannot use this in a published project which could break when the NimBLE master changed.

So apologies here - I've been running the esp-nimble-cpp branch, as I'm building an ESP-IDF project. I know the branches are similar, but might not give you the answer you're looking for in regards to the NimBLE-Arduino branch.
Here's the table as it stands, we can fill in as we test.. I'll update this with my esp-nimble-cpp 1.4.1 findings

NimBLE version
direct advertising for public addresses
direct advertising for random addresses

NimBLE-Arduino 1.42
?
?

NimBLE-Arduino master
Assuming works
?

NimBLE-ESP 1.41
?
?

NimBLE-ESP master
YES
NO

🗙from my posting above means NO. So with NimBLE-Arduino, only public addresses on master works. The three other combinations didn't work, at least in my tests.

@rac146 And I also have problems when reusing already bonded peers when going from 1.4.2 to 2.0.0 or vice versa.
See https://github.com/h2zero/NimBLE-Arduino/issues/740

I would like to reopen this issue, because direct advertisement only works in 2.0.0, not in 1.4.2
And in both versions, it does not work if a device uses private addresses.

Just dropping by to verify that directed advertising is not working with 1.4.2.

Just tested with iOS 17.6.1 and following code for directed advertising after bonding a device:
        fNimbleAdvertising->setScanFilter(false, false);
        fNimbleAdvertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
        NimBLEAddress directedAddress = NimBLEAddress(fBondedDevices[fBondedDeviceIndex].toString().c_str(), BLE_ADDR_PUBLIC);
        fNimbleAdvertising->startDirectedAdvertising(BLE_HS_FOREVER, nullptr, &directedAddress);

I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
D NimBLEDevice: >> setPower: 7 (type: 11)
D NimBLEDevice: << setPower
BLE stack initialization state: true
Server BLE address: C8:C9:A3:CA:14:22
Device BLE Pin: 060927
D NimBLEDevice: Setting bonding: 1, mitm: 1, sc: 1
D NimBLEDevice: >> setLocalMTU: 512
D NimBLEDevice: << setLocalMTU
D NimBLEServer: >> createService - 00002ffa-0000-1000-8000-00805f9b34fb
D NimBLEServer: << createService
ServiceHandler::addEncryptedCharacteristics() - Characteristics in service: [82c314b2-e53a-4d5e-b021-fc5887b4373f]
ServiceHandler::addEncryptedCharacteristics() - Characteristics in service: [3c5577d7-d182-482a-940a-7e5062441f43]
D NimBLEService: >> start(): Starting service: UUID: 00002ffa-0000-1000-8000-00805f9b34fb, handle: 0x0000
D NimBLEService: Adding 2 characteristics for service UUID: 00002ffa-0000-1000-8000-00805f9b34fb, handle: 0x0000
D NimBLEService: << start()
Initializing display controller
SSD1306 initialized properly...
Number of bonded devices: 1
Found bonded ble client with address:  106097662453008
Real voltage:      17.41 V
Is advertising: false
Is connected: false
Is bonded: false
Number of peer devices: 0
Ping value: 0
LedControl::update() - state: Init
DirectedAdvertiser::loadBondedDevices()
Loaded bonded device: 60:7e:c9:7b:65:10
D NimBLEAdvertising: >> setAdvertisementData
D NimBLEAdvertising: << setAdvertisementData
D NimBLEAdvertising: >> setScanResponseData
D NimBLEAdvertising: << setScanResponseData
DirectedAdvertiser::loadBondedDevices()
Loaded bonded device: 60:7e:c9:7b:65:10
DirectedAdvertiser::update() - switch from: State_Init to: State_Stopped
BluetoothController::update() - switch from: State_Init to: State_Disconnected
BluetoothController::update() - switch from: State_Disconnected to: State_Advertising
D NimBLEAdvertising: >> setScanFilter: scanRequestWhitelistOnly: 0, connectWhitelistOnly: 0
D NimBLEAdvertising: << setScanFilter
D NimBLEAdvertising: >> Advertising start: customAdvData: 1, customScanResponseData: 1
primary service
           uuid 0x1800
         handle 1
     end_handle 5
characteristic
           uuid 0x2a00
     def_handle 2
     val_handle 3
   min_key_size 0
          flags [READ]
characteristic
           uuid 0x2a01
     def_handle 4
     val_handle 5
   min_key_size 0
          flags [READ]
primary service
           uuid 0x1801
         handle 6
     end_handle 13
characteristic
           uuid 0x2a05
     def_handle 7
     val_handle 8
   min_key_size 0
          flags [INDICATE]
ccc descriptor
           uuid 0x2902
         handle 9
   min_key_size 0
          flags [READ|WRITE]
characteristic
           uuid 0x2b3a
     def_handle 10
     val_handle 11
   min_key_size 0
          flags [READ]
characteristic
           uuid 0x2b29
     def_handle 12
     val_handle 13
   min_key_size 0
          flags [READ|WRITE]
primary service
           uuid 00002ffa-0000-1000-8000-00805f9b34fb
         handle 14
     end_handle 20
characteristic
           uuid 82c314b2-e53a-4d5e-b021-fc5887b4373f
     def_handle 15
     val_handle 16
   min_key_size 0
          flags [READ|NOTIFY|INDICATE]
ccc descriptor
           uuid 0x2902
         handle 17
   min_key_size 0
          flags [READ|WRITE]
characteristic
           uuid 3c5577d7-d182-482a-940a-7e5062441f43
     def_handle 18
     val_handle 19
   min_key_size 0
          flags [READ|WRITE|NOTIFY|INDICATE|READ_ENC|READ_AUTHEN|WRITE_ENC|WRITE_AUTHEN]
ccc descriptor
           uuid 0x2902
         handle 20
   min_key_size 0
          flags [READ|WRITE]
D NimBLEAdvertising: << Advertising start
Directed Advertising to bonded device[0]: 60:7e:c9:7b:65:10

The result of this is, that my phone cannot even see my BLE server, let alone connect to it. I verified that the address used 60:7e:c9:7b:65:10 is indeed the BLE MAC Address of my iPhone.
Used master, commit: c3886723116e202a102900709a9cf00a4d434512
Currently at a loss as to what I should change/fix in my code.
Same code also does not work in 1.4.2 either.
If anyone has any suggestion, I'll be happy to test/try them out.

What devices are you using while testing this?

Processing az-delivery-devkit-v4 (platform: espressif32; board: az-delivery-devkit-v4; framework: arduino)
-------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/az-delivery-devkit-v4.html
PLATFORM: Espressif 32 (6.8.1) > AZ-Delivery ESP-32 Dev Kit C V4
HARDWARE: ESP32 240MHz, 520KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20017.0 (2.0.17)
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-mkfatfs @ 2.0.1
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 2.230.0 (2.30)
 - tool-openocd-esp32 @ 2.1100.20220706 (11.0)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Adafruit GFX Library @ 1.11.5
|-- Adafruit SSD1306 @ 2.5.7
|-- NimBLE-Arduino @ 2.0.0+sha.c388672
|-- googletest @ 1.15.2
|-- SPI @ 2.0.0
|-- Wire @ 2.0.0
Building in debug mode
Retrieving maximum program size .pio/build/az-delivery-devkit-v4/firmware.elf
Checking size .pio/build/az-delivery-devkit-v4/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   9.3% (used 49612 bytes from 532480 bytes)
Flash: [=====     ]  48.1% (used 946457 bytes from 1966080 bytes)
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: /dev/ttyUSB0
Uploading .pio/build/az-delivery-devkit-v4/firmware.bin
esptool.py v4.5.1
Serial port /dev/ttyUSB0
Connecting......
Chip is ESP32-D0WDQ6 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: c8:c9:a3:ca:14:20
Uploading stub...
Running stub...
Stub running...

And my iPhoneSE ( 2020 ) with iOS 17.6.1.

Is the address you are directing to the current random private address of the phone or is it the ID address?
The original esp32 doesn't have controller based privacy so it is limited to it's ability to resolve addresses in the host. If you try this code on a esp32c3 or esp32s3 does it work?

@h2zero thanks for the quick responses. The address I am using I get like this:
    void DirectedAdvertiser::loadBondedDevices()
    {
        std::cout << "DirectedAdvertiser::loadBondedDevices()" << std::endl;
        std::lock_guard<std::mutex> lock(fMtx);
        fCurrentNumOfBondedDevices = NimBLEDevice::getNumBonds();
        for (int i = 0; i < fCurrentNumOfBondedDevices; i++)
        {
            NimBLEAddress address = NimBLEDevice::getBondedAddress(i);
            if (address != NimBLEAddress())
            {
                fBondedDevices.push_back(address);
                std::cout << "Loaded bonded device: " << address.toString().c_str() << std::endl;
            }
        }
        //start from first device again
        fBondedDeviceIndex = 0U;
    }

        fNimbleAdvertising->setScanFilter(false, false);
        fNimbleAdvertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
        NimBLEAddress directedAddress = NimBLEAddress(fBondedDevices[fBondedDeviceIndex].toString().c_str(), BLE_ADDR_PUBLIC);
        fNimbleAdvertising->startDirectedAdvertising(BLE_HS_FOREVER, nullptr, &directedAddress);

The idea is, to only advertise to previously bonded devices. So I am not quite sure if this is an RPA or the ID Address. That said, I checked it and it is the MAC Address of the BLE of my iPhone ( if that makes any sense ).
Regarding the other question. I have a C3 lying around. Will test with that and get back to you asap.

@sanastasiou thanks a lot for jumping in and testing.
I repeated the test with an ESP32-S3 and got the following interesting result. All tests were done with NimBLE 2.0.0.
So with an ESP32-S3, indeed advertising to a device using RPA works. But direct advertising to a "normal" device, which is not using RPA, does not work any longer ...

NimBLE version
device not using RPA (Windows)
device using RPA (Android)

ESP32, undirected
YES
YES

ESP32, directed
YES
NO

ESP32-S3, undirected
YES
YES

ESP32-S3, directed
NO
YES

@KlausMu thanks also for sharing your results. Here are my results:

board
peer using RPA (iOS 17.6.1)
peer using RPA (Android 13)

ESP32, undirected
YES
YES

ESP32, directed
NO
NO

ESP32-C3, undirected
YES
YES

ESP32-C3, directed
NO
NO

Using master version of Nimble commit c3886723116e202a102900709a9cf00a4d434512 and platform = espressif32 @ ^6.5.0  ; Latest stable platform version
Bonding with undirected communication(s) works as before. After bonding directed advertising is done using the bonded address.
The peer devices are unable to see the ESP32-C3 unfortunately.
@KlausMu do you do something else as this to get directed advertising work on your S3?
void DirectedAdvertiser::loadBondedDevices()
{
    std::cout << "DirectedAdvertiser::loadBondedDevices()" << std::endl;
    std::lock_guard<std::mutex> lock(fMtx);
    fCurrentNumOfBondedDevices = NimBLEDevice::getNumBonds();
    for (int i = 0; i < fCurrentNumOfBondedDevices; i++)
    {
        NimBLEAddress address = NimBLEDevice::getBondedAddress(i);
        if (address != NimBLEAddress())
        {
            fBondedDevices.push_back(address);
            std::cout << "Loaded bonded device: " << address.toString().c_str() << std::endl;
        }
    }
    //start from first device again
    fBondedDeviceIndex = 0U;
}

    fNimbleAdvertising->setScanFilter(false, false);
    fNimbleAdvertising->setAdvertisementType(BLE_GAP_CONN_MODE_DIR);
    NimBLEAddress directedAddress = NimBLEAddress(fBondedDevices[fBondedDeviceIndex].toString().c_str(), BLE_ADDR_PUBLIC);
    fNimbleAdvertising->startDirectedAdvertising(BLE_HS_FOREVER, nullptr, &directedAddress);

Do you use the new onIdentity callback somehow? I cannot find out why my code doesn't work at all. Would you be able to paste a minimal amount of code that works for directed advertising?
@h2zero my C3 device is this one by the way:

[env:seeed_xiao_esp32c3]
extends = env
board = seeed_xiao_esp32c3
board_build.mcu = esp32c3
board_build.f_cpu = 160000000L
build_flags =
    ${env.build_flags}
    -D LED_PIN_GPIO=8
	-D LED_PAIRING_PIN_GPIO=9
	-D PAIRING_SWITCH_PIN_GPIO=10
	-D BATTERY_VOLTAGE_INPUT_PIN_GPIO=2
	-D ARDUINO_USB_MODE=1
	-D ARDUINO_USB_CDC_ON_BOOT=1
	-D SDA_GPIO_I2C_PIN=6
	-D SCL_GPIO_I2C_PIN=7
monitor_port = /dev/ttyACM0        ; Adjust this for your OS (Windows: COMx)
upload_port = /dev/ttyACM0         ; Adjust this for your OS (Windows: COMx)
debug_tool = esp-builtin
debug_init_break = tbreak setup
upload_speed = 921600

https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/
I have logs too but they are identical to the ones I already posted. Let me know if I can help in any way.

@sanastasiou
I used the latest versions of NimBLE and platform-espressif32 from yesterday (11-03-2024) (have been freshly pulled from Github by PlatformIO).
As you did, I am getting the address from the already bonded peers.
I am using the new onIdentity callback, but only for informational purposes in my log messages, not for using this information for the direct advertisement.
And I am using the exact four lines of code for starting the advertisement as you posted here.
My example is a more complex one, since I am using the ESP32 as a BLE keyboard, and the overhead for the definition of the BLE keyboard is quite big.
So I am not sure on how to provide a minimal example. Is this even possible? What is the most simple example that could be used to bond the ESP32 with e.g. Windows or Android?
I could try to create such an example if you point me into the right direction. It seems in the examples folder of NimBLE there is no such simple example.
My ESP32-S3 device definition is
[env:esp32-s3-devkitc-1]
board = esp32-s3-devkitc-1
platform = espressif32
framework = arduino
build_flags =
	-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
upload_speed = 921600
monitor_speed = 115200

Hi @KlausMu thanks for the reply. No need to provide a bonding example. I am sure that actually works also in my case, it works at least for undirected advertisement when using encrypted attributes and never ask to rebond so I think that's fine.
So either my C3 is not supported/broken in some way..  or I don't know what.  Also is the bonded Address the MAC Address of the peer device in your case?
How do u check if the directed advertisement is working? I am using the "Light Blue" app on my smartphones. Is there some other way?

Also is the bonded Address the MAC Address of the peer device in your case?

Correct, it is the bluetooth MAC address of the peer device.

How do u check if the directed advertisement is working? I am using the "Light Blue" app on my smartphones. Is there some other way?

I can see if the bonded peer reconnects. In the list of bonded peers both Windows and Android show which of the known (bonded) devices are connected and which not. When starting a direct adv. to Windows, Windows instantly connects when using an ESP32, but not with an ESP32-S3. With Android it is exactly the other way around. Android ignores an ESP32, but connects to an ESP32-S3.

@KlausMu thanks again for the info! So I am guessing there is some systematic error here depending on which HW is used and also which SW stack is used against it. For me it's becoming a headache because I am developing an app which has to be as secure as possible and the best way to do that is to only connect with previously bonded devices and make bonding possible only via physical access to the device. Perhaps @h2zero can shed some light. In the meantime I'll buy an S3 and try with that as well.
Thanks again!

@h2zero tried with BLE_ADDR_RANDOM. Still invisible to my phones. Will try deleting everything and rebonding.

Can you provide the specific address?

@h2zero I tried following:

Deleting all bonded devices
Rebonding -> works
Changing both Android/Ios to BLE_ADDR_RANDOM -> did not work
Changed ad duration to 2000ms and switch over both bonded devices -> invisible to both ( I see both MAC addresses in the console alternative for 2s each )

What do u mean by specific address? Like const auto dir_addr = NimBLEAddress("60:7e:c9:7b:65:10"); ?

        static auto dir_addr = NimBLEAddress("60:7e:c9:7b:65:10");
        fNimbleAdvertising->startDirectedAdvertising(AD_DURATION, [this](NimBLEAdvertising* pAdvertising){
            this->onAdvertisementStopped(pAdvertising);
        }, &dir_addr);

No change. Also my config is like this:
platform = espressif32 @ ^6.9.0  ; Latest stable platform version
framework = arduino
lib_deps =
	https://github.com/h2zero/NimBLE-Arduino.git#c3886723116e202a102900709a9cf00a4d434512

I'll see what I can find later this week, hopefully there is something easy to fix.

I believe I have found the cause, and it is not an issue with this library. Basically it comes down to lack of support for directed advertising by some device (all Apple devices for sure). Take a read of this: https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf specifically page 236.

Interesting. At least this gives an explanation for iOS.
But why does direct advertisement from ESP32 to Windows work with 2.0.0 (and is indeed really reliable) and not with 1.4.2?
Why does it not work at all from ESP32-S3 to Windows (not with 2.0.0 and not with 1.4.2)?
And why does it sometimes work with Android?
It's a mystery ...

Still investigating, using this for testing:
#include <NimBLEDevice.h>

class serverCB : public NimBLEServerCallbacks {
  void onConnect(NimBLEServer* pServer, ble_gap_conn_desc* desc) {
    Serial.print("Client address: ");
    Serial.println(NimBLEAddress(desc->peer_ota_addr).toString().c_str());
  }

  void onDisconnect(NimBLEServer* pServer) {
    Serial.println("Client disconnected - start advertising");
    if (NimBLEDevice::getNumBonds()) {
      NimBLEAddress baddr = NimBLEDevice::getBondedAddress(0);
      Serial.printf("Starting advertising with bonded address %s\n", baddr.toString().c_str());
      pServer->getAdvertising()->setAdvertisementType(1);
      pServer->getAdvertising()->start(0 ,nullptr, &baddr);
    } else {
      Serial.println("starting normal advertising");
      pServer->getAdvertising()->setAdvertisementType(2);
      pServer->getAdvertising()->start();
    }
  }
};

void setup() {
  Serial.begin(115200);
  Serial.println("Starting NimBLE Server");
  NimBLEDevice::init("NimBLE");
  NimBLEDevice::setSecurityAuth(true, true, true);
  NimBLEDevice::setSecurityPasskey(123456);
  NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY);
  NimBLEServer *pServer = NimBLEDevice::createServer();
  pServer->setCallbacks(new serverCB());
  pServer->advertiseOnDisconnect(false);
  NimBLEService *pService = pServer->createService("ABCD");
  NimBLECharacteristic *pNonSecureCharacteristic = pService->createCharacteristic("1234", NIMBLE_PROPERTY::READ );
  NimBLECharacteristic *pSecureCharacteristic = pService->createCharacteristic("1235", NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::READ_ENC | NIMBLE_PROPERTY::READ_AUTHEN);

  pService->start();
  pNonSecureCharacteristic->setValue("Hello Non Secure BLE");
  pSecureCharacteristic->setValue("Hello Secure BLE");

  NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
  if (NimBLEDevice::getNumBonds()) {
    NimBLEAddress baddr = NimBLEDevice::getBondedAddress(0);
    Serial.printf("Starting advertising with bonded address %s\n", baddr.toString().c_str());
    pServer->getAdvertising()->setAdvertisementType(1);
    pAdvertising->start(0 ,nullptr, &baddr);
  } else {
    pAdvertising->addServiceUUID("ABCD");
    Serial.println("Starting normal advertising");
    pServer->getAdvertising()->setAdvertisementType(2);
    pAdvertising->start();
  }
}

void loop() {
}

If you would like to use this for your own testing please do and report back your findings. Don't bother trying against apple devices though 😄.
I have verified with a sniffer that this does indeed advertise directed to the address provided on an esp32 dev board using release v1.4.2.

Hm, ok so assuming iOS doesn't support this and whitelisting is broken in ESP32 completely plus switching on / off encrypted attributes on the fly also has issues I see no way to provide truly secure communications between ESP and all kinds of smartphones.
So I am guessing time to switch ECU on my side. But still thanks a lot for all your efforts @h2zero and @KlausMu !

@sanastasiou Yes, the esp32 is not an option for your purposes and I would suggest a c3 or s3 variant.

@h2zero thanks, is whitelisting supposed to be working in S3/C3 ?

Yes @sanastasiou, they have controller based privacy and can manage the RPA's correctly.

Another interesting find: https://devzone.nordicsemi.com/f/nordic-q-a/42111/android-and-directed-advertising

Just rewrote the code and tested with C3 device.
Works with iOS perfectly.
Does not work with Android. Android does not see the device after the bonded address is added to the whitelist. Without whitelist everything works. With active whitelist nothing works for android.
As usual used master branch of the library plus latest espressiff/arduino versions.
Can provide logs if you're interested.

Hm, after doing a reset on the ECU it works with both devices. Investigating further.

So found the Android issue.. During bonding a check is done to see if the device has bonded already in the authentication callback.
This code which works in 1.4.2 now fails:
            const auto peerDevices = fPServer->getPeerDevices();
            std::cout << "ServiceHandler::isConnectedDeviceBonded() - Number of peer devices: " << peerDevices.size() << std::endl;
            const auto isBonded = ((fPServer->getConnectedCount() == 1U) && (peerDevices.size() == 1U) && fPServer->getPeerInfo(peerDevices[0]).isBonded());

This is printed:
ServiceHandler::isConnectedDeviceBonded() - Number of peer devices: 1
E NimBLEServer: No peer at index 1

Although the bonding itself succeeds. After a reset the whitelist is populated with the bonded addresses and everything works fine. It just doesn't work exactly after bonding.. but I can work around this. In any case, it's inconsistent behavior that peer size is 1 but peer[0] doesn't exist.

Can you share more code details?

Sure. So in the server callbacks:
        void ServerCallbacks::onAuthenticationComplete(NimBLEConnInfo& connInfo)
        {
            const std::lock_guard<std::mutex> guard(fBleController.getMutex());
            const bool isBonded = (connInfo.isBonded());
            const bool isEncrypted = (connInfo.isEncrypted());
            const bool isAuthenticated = (connInfo.isAuthenticated());
            std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - encrypted: " << isEncrypted << std::endl;
            std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - authenticated: " << isAuthenticated << std::endl;
            std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - bonded: " << isBonded << std::endl;

            if(fBleController.isPairing())
            {
                /** Check that encryption was successful, if not we disconnect the client */
                if(!(isBonded && isEncrypted && isAuthenticated))
                {
                    std::cout << "Encrypt connection failed with client: " << connInfo.getAddress().toString() <<  std::endl;
                    return;
                }
                else
                {
                    //bug in stack, this returns false here..
                    //std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - bonded: " << NimBLEDevice::isBonded(connInfo.getIdAddress().toString()) << std::endl;
                    fBleController.expirePairingTimer();
                }
            }
            else
            {
                if(isBonded && isEncrypted && isAuthenticated)
                {
                    std::cout << std::boolalpha << "ServerCallbacks::onAuthenticationComplete() - Client with address: " << connInfo.getAddress().toString() << " is authenticated." << std::endl;
                }
                else
                {
                    std::cout << "Attempted to authenticate while not pairing -> reject connection." << std::endl;
                    NimBLEDevice::getServer()->disconnect(connInfo.getConnHandle());
                    return;
                }
            }
        }

When this is true and we are bonding for the first time there is no way to actually check if the device has bonded outside of this function.
This used to work with the code above ( peer[0].isBonded ) with 1.4.2 but it now no longer works because for whatever reason size == 1 but peer[0] does not exist. Also disconnecting at this line: fBleController.expirePairingTimer(); before the authentication callback returns, results in the bonded device not being stored as bonded at all.
What I now do is, blindly accepting that a device has bonded when the authentication callback is called without looking at bonded devices / peer info at all. Tested that and it works fine.
I also have a question. When I bond with my Android phone and then disconnect I can see during scan the device and I can reconnect ( :heavy_check_mark:  ).
If I scan however with my unbonded iOS phone I still can see the device ( :x: ) but I cannot connect to it ( :heavy_check_mark: ).
I would have thought that when whitelisting for scan response and connect are both true, the device would be invisible to non whitelisted peers. Is that not the case? fNimbleAdvertising->setScanFilter(true, true);

So, what appears to happen is that callback is called before the bonded state is set for the peer in the stack, all good though, just check for authentication and or encryption. Whitelist does not prevent other devices from reporting them as seen, only prevents any connection attempt, which scan response is a pseudo connection, so it cannot get the data in the scan response and cannot connect. All devices can see your advertisements, BLE wouldn't work otherwise, but you can control the sensitive data, though not encrypted in the scan response.

Still investigating, using this for testing:
#include <NimBLEDevice.h>

class serverCB : public NimBLEServerCallbacks {
...

...
I have verified with a sniffer that this does indeed advertise directed to the address provided on an esp32 dev board using release v1.4.2.

I am not sure if this code snippet can reveal the problem. My test case was always

bond the ESP32 to Windows (can only work if the ESP32 behaves as something like keyboard, mouse, audio device, DLNA etc.) - no authentication is involved
disconnect the ESP32
start direct advertisement to this specific Windows machine

With your code snippet no available device at all shows up in Windows when trying to pair, so I cannot even bond the device.
As said earlier, Android and iOS are not really my use case, but of course I can contribute test results.
To me currently only devices not using RPA are relevant, like a Fire TV, NVIDIA shield or other such devices. But even with these there are currently some problems. I was not able to test all these devices until now. But only the combination ESP32 + Windows / 2.0.0 seems to be reliable until now, Android and iOS not.
What I am more afraid of:

why does ESP32 + Windows with NimBLE 1.4.2 not work?
why does ESP32-S3 + Windows does not work at all (neither 1.4.2 nor 2.0.0)

If there is anything I can do to provide more test results, please let me know. Currently I don't know what to do.

Just adding my 2 cents here for master branch.
Although whitelisting works with C3 with master I have observed following behavior.

Bond device
Start advertising with whitelist -> works
Bond other device and start advertising with whitelist -> works
Abruptly disconnect android device by e.g. power off of the device
Advertisement still works, but upon connection the peer device receives a broken service without any characteristics and cannot do anything.

I could reproduce the latter in master branch 100%. I switched back to 1.4.2 where the above scenario works perfectly without any issues. Imo master branch needs some work.

There are no changes in the master branch that would affect this as far as I can see.

Well I could reproduce it 100% tried several times. The exact same steps work flawlessly in 1.4.2. Also I am pretty sure something change from 1.4.2 to master regarding NV storage of bonds.
Having bonded devices stored into NV from master and going back to 1.4.2 results 100% reproducible exception during loading of bonds.

Could you please try with the release/1.5 branch? I wonder if this is a core issue.

Let's start with the bonds issue as that seems to be what changed with the master branch

Having bonded devices stored into NV from master and going back to 1.4.2 results 100% reproducible exception during loading of bonds.

In my tests, both directions did not work: going to master (silent failure) and going back to 1.4.2 (crash). please see this issue

Bond device
Start advertising with whitelist -> works
Bond other device and start advertising with whitelist -> works
Abruptly disconnect android device by e.g. power off of the device
Advertisement still works, but upon connection the peer device receives a broken service without any characteristics and cannot do anything.

I could reproduce the latter in master branch 100%. I switched back to 1.4.2 where the above scenario works perfectly without any issues. Imo master branch needs some work.

I am seeing this same broken behavior between a mac and iPhone on 1.4.2 and 1.4.3.


text:
Error -the programm looks for video2brain folder instead of lynda.com folder

Hi!
I've downloaded the Lynda.com desktop app (windows 7) and tried to see if I can decrypt the files.
The problem is that the decryptor is looking for the video2brain app and not Lynda.com app as can be seen in the error below.
Did I do something wrong? (at the lynda.com directory I have Lynda.com desktop app and not video2brain desktop app, as the error pointed  out)
E:\Downloads\Lynda_v1.2>LyndaDecryptor /D "D:\Lynda\ldc_dl_courses\148580" /DB "
C:\Users\USERNAME\AppData\Local\lynda.com\Lynda.com Desktop App\db.sqlite" /OUT
"D:\Lynda\out"
[ARGS] Changing mode to Folder decryption!
[START] Init Decryptor...
[START] Decryptor successful initalized!
[DB] Creating db connection...
[START] Error occured: Could not find a part of the path 'C:\Users\MaxBass\AppDa
ta\Local\lynda.com\video2brain Desktop App'.
Usage (Directory):   LyndaDecryptor /D PATH_TO_FOLDER [OPTIONS]
Usage (File): LyndaDecryptor /F ENCRYPTED_FILE   DECRYPTED_FILE [OPTIONS]
Flags:
/D      Source files are located in a folder.
/F      Source and Destination file are specified.
/DB     Search for Database or specify the location on your system.
/RM     Removes all files after decryption is complete.
/OUT    Specifies an output directory instead of using default directory
.
Press any key to exit the program...

I've tried to copy the Lynda.com Desktop app and renamed it into "video2brain Desktop app", it passed that phase but threw another error. What am I missing?
E:\Downloads\Lynda_v1.2>LyndaDecryptor /D "D:\Lynda\ldc_dl_courses\148580" /DB "
C:\Users\USERNAME\AppData\Local\lynda.com\Lynda.com Desktop App\db.sqlite" /OUT
"D:\Lynda\out"
[ARGS] Changing mode to Folder decryption!
[START] Init Decryptor...
[START] Decryptor successful initalized!
[DB] Creating db connection...
[DB] DB successfully connected and opened!
Press any key to exit the program...
Unhandled Exception: System.InvalidCastException: Specified cast is not valid.
at System.Data.SQLite.SQLiteDataReader.VerifyType(Int32 i, DbType typ)
at System.Data.SQLite.SQLiteDataReader.GetString(Int32 i)
at LyndaDecryptor.Program.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.b__1(Ob
ject state)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object sta
te)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionCo
ntext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C
ontextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWor
kItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
E:\Downloads\Lynda_v1.2>


text:
Moving domain to ghpages

cloudflare is set up but pointing via CNAME to github pages.
https://mothereffinganimatedgif.com/
if you see saveasbro issues in the console then it hasn't been updated. But i THINK i have the configuration of everything set up... just waiting for propagation..

nice. I was going to suggest moving this site to HTTPS...
The only console error I see is that its missing a favicon so will open a separate issue for that.

yup!
i think the propagation finished now. we good!

authors: coliff paulirish


text:
feature/HFP-3844-more-media-types-in-image-choice

feat: Add audio and video as choice

Nesting in SCSS

authors: Gwenillia MatsJensen


text:
Differences from spf13/afero

I'm curious what this brings to the table that https://github.com/spf13/afero does not have?

Afero takes a holistic interface approach to file systems, for the most part. In other words, your own FS must implement all of the different file and filesystem operations in order to be used. HackpadFS gives you more flexibility by only requiring implementations use small, composable interfaces. The interop with io/fs is improved as a result.
It also lacked consistency in behavior and had a few game-breaking bugs when it was first pulled into Hackpad. I actually reached out with bug fixes and also offered to improve things, though they had a different plan for the project. HackpadFS adds the shared test suite that was missing from afero.

https://github.com/fclairamb/afero-s3 might be interesting you this project
It allows you to read and write to s3 from what i can see.

authors: JohnStarich gedw99 ghostsquad

repo: hack-pad/hackpadfs


text:
Add className props if havent added

should be automatically passed to styled components if we do {...props}

add tests to test for them

this is for styled jsx

primer doesn't work with styled-jsx so i think its a problem with styled-compoennts and styled-jsx. I guess you cant use the two together? maybe theres a work around but this isn't really a bug anymore


text:
Ensure that Packrat is used at all of the meetings this week

Meetings this week, per the club schedule calendar by @hellyeah:
Goal:

[ ] 3:15PM PDT Thursday, San Leandro High School (Jiahao)
[ ] 3:30PM PDT Thursday, Lowell High School (Teagan)

Stretch:

[ ] 11:30AM PDT Monday, Cherry Hill East (Bogdan)
[ ] 4:00PM PDT Tuesday, USC Hybrid School (Gemma)
[ ] 10:30PM PDT Tuesday, Glenaeon Rudolf Steiner School (Harrison)
[ ] 11:30PM PDT Wednesday, Cherry Hill East (Bogdan)
[ ] 12:30PM PDT Friday, Ravenwood High School (Tejas)

@zachlatta Is there some way I can get access to the live version of packrat? It would make it much easier for me to see what's going on.

@MaxWofford isn't it deployed to https://labs.hackedu.us/ currently?

@ZucchiniZe I'd like to see what clubs we've been getting responses in.

@MaxWofford I don't think we even got a response from Bogdan's club this week.

Replaced by #207

authors: MaxWofford ZucchiniZe hellyeah zachlatta

repo: hackedu/meta


text:
Preferences form doesn't allow keyboard navigation

It would be nice if the preferences form allowed standard keyboard navigation, like tabbing between fields and submitting with return.

I'm totally open to this.

authors: steveklabnik wasnotrice

repo: hacketyhack/hacketyhack


text:
수정 필요

https://github.com/haedal-uni/haedal-uni.github.io/blob/e63733cb5c43665bbfd6943effcf70852e261432/_config.yml#L199
97kim 무엇? haedal-uni로 바꾸세욧!

제 리포지토리에 온단 말이에욧!

바꿨습니닿😄


text:
不能使用0301版本

在chatbox切换到0301响应失败，只能使用默认的gpt3.5-turbo，opencat同样的情况

我也是这样。只能使用gpt3.5-turbo

好像今天用突然不行了？配置没动

@Tsuizen @jinppppp 需要增加对应的mapper:
const mapper = {
     'gpt-3.5-turbo': 'gpt3',
     'gpt-4': 'gpt4'
   };

增加gpt-3.5-turbo-0301的映射
const mapper = {
     'gpt-3.5-turbo': 'gpt3',
      'gpt-3.5-turbo-0301': 'gpt3-0301',
     'gpt-4': 'gpt4'
   };

gpt3-0301  改为你azure 这个模型的deploy name

好像今天用突然不行了？配置没动

那一部分不行了, 我自己一直在用 未发现问题

@haibbo 感谢，已经可以使用了，其实这里映射的就是0301，和客户端选择的模型没有关系吧。

看了下，是因为我自己的 Azure OpenAI 被停用了，而且不能重新激活……

@peizh 你好，请问会因为什么而被封？有告诉你理由吗

authors: Tsuizen abrahamgreyson haibbo jinppppp peizh

repo: haibbo/cf-openai-azure-proxy


text:
ReplacePixels can allocate too much memory

@Essial (OpenDiablo2 team) reported. This happens on macOS but I think this happens everywhere.

With examples/noise:
(pprof) top
Showing nodes accounting for 656.01kB, 100% of 656.01kB total
Showing top 10 nodes out of 16
      flat  flat%   sum%        cum   cum%
     624kB 95.12% 95.12%      624kB 95.12%  github.com/hajimehoshi/ebiten/v2/internal/atlas.(*Image).replacePixels
   32.01kB  4.88%   100%    32.01kB  4.88%  github.com/hajimehoshi/ebiten/v2/internal/graphics.(*verticesBackend).slice
         0     0%   100%    32.01kB  4.88%  github.com/hajimehoshi/ebiten/v2.(*Image).Clear (inline)
         0     0%   100%    32.01kB  4.88%  github.com/hajimehoshi/ebiten/v2.(*Image).DrawImage
         0     0%   100%    32.01kB  4.88%  github.com/hajimehoshi/ebiten/v2.(*Image).Fill
         0     0%   100%      624kB 95.12%  github.com/hajimehoshi/ebiten/v2.(*Image).ReplacePixels
         0     0%   100%      624kB 95.12%  github.com/hajimehoshi/ebiten/v2.(*imageDumperGame).Draw
         0     0%   100%   656.01kB   100%  github.com/hajimehoshi/ebiten/v2.(*uiContext).Update
         0     0%   100%   656.01kB   100%  github.com/hajimehoshi/ebiten/v2.(*uiContext).update
         0     0%   100%      624kB 95.12%  github.com/hajimehoshi/ebiten/v2/internal/atlas.(*Image).ReplacePixels
(pprof) list replacePixels
Total: 656.01kB
ROUTINE ======================== github.com/hajimehoshi/ebiten/v2/internal/atlas.(*Image).replacePixels in /Users/hajimehoshi/ebiten/internal/atlas/image.go
     624kB      624kB (flat, cum) 95.12% of Total
         .          .    485:   if l := 4 * ow * oh; len(pix) != l {
         .          .    486:           panic(fmt.Sprintf("atlas: len(p) must be %d but %d", l, len(pix)))
         .          .    487:   }
         .          .    488:
         .          .    489:   // Add a padding around the image.
     624kB      624kB    490:   pixb := make([]byte, 4*w*h)
         .          .    491:   for j := 0; j < oh; j++ {
         .          .    492:           copy(pixb[4*((j+paddingSize)*w+paddingSize):], pix[4*j*ow:4*(j+1)*ow])
         .          .    493:   }
         .          .    494:
         .          .    495:   i.backend.restorable.ReplacePixels(pixb, x, y, w, h)

repo: hajimehoshi/ebiten


text:
examples/gamepad: Crash with PS1 controller on Linux

Connect a PS1 controller with Elecom's converter (JC-PS102USV)
Run examples/gamepad

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x500e9f]

goroutine 54 [running]:
github.com/hajimehoshi/ebiten/v2/internal/gamepaddb.IsButtonPressed({0xc00046a080, 0x20}, 0x7f8c4987a868, {0x6a8c08, 0xc00010a900})
	/home/hajimehoshi/ebiten/internal/gamepaddb/gamepaddb.go:447 +0xff
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*Input).IsStandardGamepadButtonPressed(0x815310, 0x0, 0x1)
	/home/hajimehoshi/ebiten/internal/uidriver/glfw/input.go:410 +0x13d
github.com/hajimehoshi/ebiten/v2.IsStandardGamepadButtonPressed(0x61bdc0, 0xc00042f470)
	/home/hajimehoshi/ebiten/input.go:237 +0x43
github.com/hajimehoshi/ebiten/v2/inpututil.(*inputState).update(0x895cc0)
	/home/hajimehoshi/ebiten/inpututil/inpututil.go:156 +0xc5f
github.com/hajimehoshi/ebiten/v2/inpututil.init.0.func1()
	/home/hajimehoshi/ebiten/inpututil/inpututil.go:75 +0x25
github.com/hajimehoshi/ebiten/v2/internal/hooks.RunBeforeUpdateHooks()
	/home/hajimehoshi/ebiten/internal/hooks/hooks.go:38 +0xc7
github.com/hajimehoshi/ebiten/v2.(*uiContext).updateFrameImpl(0x8958e0, 0x1)
	/home/hajimehoshi/ebiten/uicontext.go:184 +0xaf
github.com/hajimehoshi/ebiten/v2.(*uiContext).updateFrame(0x8958e0, 0x0)
	/home/hajimehoshi/ebiten/uicontext.go:159 +0x86
github.com/hajimehoshi/ebiten/v2.(*uiContext).UpdateFrame(0xc000012030)
	/home/hajimehoshi/ebiten/uicontext.go:138 +0x32
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*UserInterface).loop(0x8151e0)
	/home/hajimehoshi/ebiten/internal/uidriver/glfw/ui.go:1064 +0x1f7
github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*UserInterface).Run.func1()
	/home/hajimehoshi/ebiten/internal/uidriver/glfw/run_notsinglethread.go:53 +0xe6
created by github.com/hajimehoshi/ebiten/v2/internal/uidriver/glfw.(*UserInterface).Run
	/home/hajimehoshi/ebiten/internal/uidriver/glfw/run_notsinglethread.go:37 +0x19d

This happens as of 2.2.


text:
fatalpanic when ebitengine application is re-awakened by Mac OS from sleep

Ebitengine Version
2.5.0-alpha.11
Operating System

[ ] Windows
[X] macOS
[ ] Linux
[ ] FreeBSD
[ ] OpenBSD
[ ] Android
[ ] iOS
[ ] Nintendo Switch
[ ] Xbox
[ ] Web Browsers

Go Version (go version)
go1.19.4 darwin/amd64
What steps will reproduce the problem?
Start the ebitengine main loop on MacBook with Retina Display.
Let the Mac go to sleep while the application is running and the awaken the Mac again.
What is the expected result?
No crash.
What happens instead?
A crash, presumably because the devicescalefactor is reported wrong.
Anything else you feel useful to add?
Yes, here is a screenshot of the stacktrace and debug session that opened up in my IDE after resuming work.

Thanks. I'll take a look.

No, a built-in laptop display. However I also have an external low-dpi display connected via HDMI as a second screen? Maybe that's part of the issue?
I also have only experienced this issue once after wake-up (since I don't usually leave my application running) so this was only my best guess. I will do further tests and report back.

Ok, I am sorry. You are right. That's not the trigger. I just tried closing my Macbook and it even disconnecting the second screen. All working fine. It's a mystery then, to me.
It first appeared when I got back to my machine after it went to sleep. That's why I thought it would be that. Obviously I am wrong. If it happens again, I will try to provide a way to reproduce it for real.

I am still experiencing this on v.2.6.0-alpha
Runtime throws: "unexpected signal during runtime execution"
Stack Trace
runtime.throw (panic.go:1040) runtime
runtime.sigpanic (signal_unix.go:821) runtime
?:0
C.glfwGetMonitorContentScale (monitor.c:388)
/tmp/go-build/cgo-gcc-prolog:146
runtime.asmcgocall (asm_amd64.s:848) runtime
/tmp/go-build/cgo-gcc-prolog:139
_cgo_gotypes.go:1036
glfw.(*Monitor).GetContentScale.func1 (monitor.go:118) github.com/go-gl/glfw/v3.3/glfw
glfw.(*Monitor).GetContentScale (monitor.go:118) github.com/go-gl/glfw/v3.3/glfw
glfw.(*Monitor).GetContentScale (glfw_notwindows.go:74) github.com/hajimehoshi/ebiten/v2/internal/glfw
devicescale.impl (impl_desktop.go:41) github.com/hajimehoshi/ebiten/v2/internal/devicescale
devicescale.GetAt (devicescale.go:38) github.com/hajimehoshi/ebiten/v2/internal/devicescale
ui.(*userInterfaceImpl).deviceScaleFactor (ui_glfw.go:658) github.com/hajimehoshi/ebiten/v2/internal/ui
ui.(*userInterfaceImpl).updateInputState (input_glfw.go:64) github.com/hajimehoshi/ebiten/v2/internal/ui
ui.(*userInterfaceImpl).update (ui_glfw.go:1018) github.com/hajimehoshi/ebiten/v2/internal/ui
ui.(*userInterfaceImpl).updateGame.func1 (ui_glfw.go:1069) github.com/hajimehoshi/ebiten/v2/internal/ui
thread.(*NoopThread).Call (thread.go:83) github.com/hajimehoshi/ebiten/v2/internal/thread
ui.(*userInterfaceImpl).updateGame (ui_glfw.go:1068) github.com/hajimehoshi/ebiten/v2/internal/ui
ui.(*userInterfaceImpl).loopGame (ui_glfw.go:1043) github.com/hajimehoshi/ebiten/v2/internal/ui
ui.(*userInterfaceImpl).Run (run_glfw_singlethread.go:39) github.com/hajimehoshi/ebiten/v2/internal/ui
ebiten.RunGameWithOptions (run.go:305) github.com/hajimehoshi/ebiten/v2
main.main (main.go:182) main
runtime.main (proc.go:250) runtime
runtime.goexit (asm_amd64.s:1598) runtime
 - Async Stack Trace
<autogenerated>:2

So how can we reproduce this?

authors: hajimehoshi memmaker