Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize BLE iterator on Matter glib context #26540

Merged
merged 1 commit into from
May 12, 2023

Conversation

arkq
Copy link
Contributor

@arkq arkq commented May 12, 2023

Problem

After changes in #25960 BLE iterator in Python binding crashes on VerifyOrDie(g_main_context_get_thread_default() != nullptr) assert.

Changes

Initialize BLE iterator on dedicated Matter glilb context.

Testing

./scripts/build_python.sh --install_wheel build-env -d true
gdb --args python3 .environment/pigweed-venv/bin/chip-repl
> run
In [1]: import chip.ble
In [2]: d = chip.ble.DiscoverSync(timeoutMs=2000)
In [3]: for x in d: print(f"Msg {x}")
[Thread 0x7fffed1fe640 (LWP 2903582) exited]
[New Thread 0x7fffed1fe640 (LWP 2903612)]
[New Thread 0x7fffec8fd640 (LWP 2903614)]

[New Thread 0x7fffd7fff640 (LWP 2903637)]
In [4]:

This fixes Python bindings after changes in 0ada46a.
@arkq
Copy link
Contributor Author

arkq commented May 12, 2023

@tehampson please verify on your side.

@github-actions
Copy link

PR #26540: Size comparison from a3b4005 to ed69a46

Decreases (1 build for cc32xx)
platform target config section a3b4005 ed69a46 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19678442 19678441 -1 -0.0
Full report (1 build for cc32xx)
platform target config section a3b4005 ed69a46 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 605018 605018 0 0.0
(read/write) 204164 204164 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197576 197576 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 958615 958615 0 0.0
.debug_aranges 101232 101232 0 0.0
.debug_frame 342084 342084 0 0.0
.debug_info 19678442 19678441 -1 -0.0
.debug_line 2673606 2673606 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1491157 1491157 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94412 94412 0 0.0
.debug_str 3131974 3131974 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104322 104322 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 483172 483172 0 0.0
.symtab 287232 287232 0 0.0
.text 498572 498572 0 0.0

Copy link
Contributor

@tehampson tehampson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. It is working for me!

@andy31415
Copy link
Contributor

fast track: crash hotfix, linux specific.

@andy31415 andy31415 merged commit 8027765 into project-chip:master May 12, 2023
@arkq arkq deleted the fix-chip-repl-ble branch May 12, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants