Hangs

Hi there,
I have noticed, that ble periodically hangs and stops sending information from a device (I run it with allowDup=true). I.e. it sends adv for some period (e.g. 20 seconds) and then stops.
The time when it hangs not constant. It may hangs in 30 seconds or in 1-2 minutes. Or later. But in average it's 5 minutes.
System
Fedora 25 Kernel 4.9.12
go version go1.7.5 linux/amd64
Here is a code
https://github.com/blent/beagle/blob/master/src/core/discovery/devices/device-ble.go#L58
Channel is buffered and its buffer size is 500. Most of peripherals get filtered by if statement. So, it's not the case of full channel.

Here is some more information.
I killed my hanged process with kill -ABRT and got a trace of all goroutines.
Here is the list of goroutines from BLE pacakge:
goroutine 7 [syscall, 7 minutes]:
syscall.Syscall(0x0, 0x3, 0xc4201b5000, 0x1000, 0x0, 0x100000000001000, 0xc42003fea8)
	/usr/lib/golang/src/syscall/asm_linux_amd64.s:18 +0x5
github.com/blent/beagle/vendor/golang.org/x/sys/unix.read(0x3, 0xc4201b5000, 0x1000, 0x1000, 0x7bf182, 0xc42003feb8, 0xc42003fec8)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go:803 +0x55
github.com/blent/beagle/vendor/golang.org/x/sys/unix.Read(0x3, 0xc4201b5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/golang.org/x/sys/unix/syscall_unix.go:113 +0x49
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/socket.(*Socket).Read(0xc42016b8e0, 0xc4201b5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/socket/socket.go:129 +0x119
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci.(*HCI).sktLoop(0xc420138180)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/hci.go:267 +0xe1
created by github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci.(*HCI).Init
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/hci.go:146 +0x5fd

goroutine 34 [select, 7 minutes]:
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci.(*HCI).Accept(0xc420138180, 0x0, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/gap.go:141 +0x1c4
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux.NewDevice.func1(0xc420138180, 0x203, 0xc4202141e0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/device.go:38 +0x4b
created by github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux.NewDevice
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/device.go:58 +0x19c

goroutine 39 [chan receive (nil chan), 7 minutes]:
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux.(*Device).Scan(0xc42020c5c0, 0xe4dde0, 0xc420012338, 0x418001, 0xc42024a000, 0x95d3c0, 0x1)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/device.go:149 +0xa7
github.com/blent/beagle/vendor/github.com/currantlabs/ble.Scan(0xe4dde0, 0xc420012338, 0x1, 0xc42024a000, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/gatt.go:93 +0x1d6
github.com/blent/beagle/src/core/discovery/devices.(*BleDevice).start(0xc420210ae0, 0xe4dde0, 0xc420012338, 0xc42020f380, 0xc42020f3e0)
	/home/tvoronov/Work/src/github.com/blent/beagle/src/core/discovery/devices/device-ble.go:84 +0x8b
created by github.com/blent/beagle/src/core/discovery/devices.(*BleDevice).Scan
	/home/tvoronov/Work/src/github.com/blent/beagle/src/core/discovery/devices/device-ble.go:51 +0xbf

I think the problem is here, since it's the only place where it may hang.
https://github.com/currantlabs/ble/blob/master/linux/hci/socket/socket.go#L129
The question is - how to debug ?

Tested on C.H.I.P. with Debian 8 - same result.

Hi @ziflex not sure about your specific issue, but I was unable to get CHIP working with ble package at all: https://github.com/currantlabs/ble/issues/28

@deadprogram weird. on my CHIP it works, but wit the same issue that I described above.
But I compiled my app on CHIP itself. How did you compile it ?

I do not think it matters where you compile, so much as which kernel you are running? what is the output for you when you run uname -aon your CHIP?

@deadprogram
Linux chip 4.4.13-ntc-mlc #1 SMP Tue Dec 6 21:38:00 UTC 2016 armv7l GNU/Linux

@ziflex I was trying to use the built-in BLE adaptor, not an external one.

Ok, I tried to use laptop' builtin BLE adapter and looks like it works stable.
So, not sure, whether it's problem of hardware or the library.
P.s. btw, comparatively to paypal/gatt, this lib consumes much less memory.

Upd: Tried to run with laptop' builtin adapter and result is much better - it lasted longer. Almost 16 minutes.
App was running for 26 minutes, 8 of them it hanged:
goroutine 7 [syscall, 8 minutes]:
syscall.Syscall(0x0, 0x3, 0xc4201b5000, 0x1000, 0x0, 0x100000000001000, 0xc42003bea8)
	/usr/lib/golang/src/syscall/asm_linux_amd64.s:18 +0x5
github.com/blent/beagle/vendor/golang.org/x/sys/unix.read(0x3, 0xc4201b5000, 0x1000, 0x1000, 0x7bf9c2, 0xc42003beb8, 0xc42003bec8)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go:803 +0x55
github.com/blent/beagle/vendor/golang.org/x/sys/unix.Read(0x3, 0xc4201b5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/golang.org/x/sys/unix/syscall_unix.go:113 +0x49
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/socket.(*Socket).Read(0xc42016d900, 0xc4201b5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/socket/socket.go:129 +0x119
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci.(*HCI).sktLoop(0xc42013a180)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/hci.go:267 +0xe1
created by github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci.(*HCI).Init
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/hci.go:146 +0x5fd

goroutine 34 [select, 26 minutes]:
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci.(*HCI).Accept(0xc42013a180, 0x0, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/hci/gap.go:141 +0x1c4
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux.NewDevice.func1(0xc42013a180, 0x203, 0xc4202261b0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/device.go:38 +0x4b
created by github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux.NewDevice
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/device.go:58 +0x19c

goroutine 39 [chan receive (nil chan), 26 minutes]:
github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux.(*Device).Scan(0xc420210500, 0xe4ede0, 0xc42000c358, 0x418001, 0xc420252000, 0x984920, 0x1)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/linux/device.go:149 +0xa7
github.com/blent/beagle/vendor/github.com/currantlabs/ble.Scan(0xe4ede0, 0xc42000c358, 0x1, 0xc420252000, 0x0, 0x0, 0x0)
	/home/tvoronov/Work/src/github.com/blent/beagle/vendor/github.com/currantlabs/ble/gatt.go:93 +0x1d6
github.com/blent/beagle/src/core/discovery/devices.(*BleDevice).start(0xc4202069e0, 0xe4ede0, 0xc42000c358, 0xc4202052c0, 0xc420205320)
	/home/tvoronov/Work/src/github.com/blent/beagle/src/core/discovery/devices/device-ble.go:84 +0xe5
created by github.com/blent/beagle/src/core/discovery/devices.(*BleDevice).Scan
	/home/tvoronov/Work/src/github.com/blent/beagle/src/core/discovery/devices/device-ble.go:52 +0xbf

Now I start thinking that probably it's a hardware issue.
@deadprogram does ble work on non-CHIP machine ?

On OS X it works very stable. Without any hangs.

Ok, I'm narrowing down the possible cause of the issue.
I have tested the lib on another Linux machine and it has the same issue - after some period of time it stops receiving information from a device.
I may try it once on Ubuntu (this machine was running Fedora as well). But my guess is that it's an issue of BlueZ.

Hi @ziflex while debugging https://github.com/currantlabs/ble/issues/34 I have tracked down the problem when attempting to connect to the second peripheral to blocking on the very same unix.Read() call.
Anyone else trying this, or running into the same kind of issues? Let's combine forces to try to find a solution!

@deadprogram which version of BlueZ are you using?

@ziflex should the version of BLueZ matter? I do not think there is any dependency between ble and BlueZ, since ble takes direct control of the HCI adaptor.
In any case:
$ bluetoothd -v
5.37

@deadprogram yeah, you are right. I have notice that I don't have BlueZ on my machine anymore. And now I'm wondering, could it be a reason of hangs that I have experienced? Try to remove it. Maybe there are conflicts when BlueZ tries to get control of the HCI.

Once ble takes control over the HCI adaptor, nothing else can access it. In fact, once I run ble I have to reboot my machine to free up the adaptor for bluez. I do not think the problem is related to that.
So I think there is the same symptom, but perhaps different root causes here. While searching thru what Noble does, I found this code that might be specific to your particular timeout issue:
https://github.com/sandeepmistry/node-bluetooth-hci-socket/commit/c5d7f8455a33d1da3ccd3915dc20a32f38c91182
More info on this bug here: https://github.com/sandeepmistry/noble/issues/242
In my case, I am never able to establish the second simultaneous connection.

@deadprogram I will try to recreate the issue again this weekend.

@deadprogram what's your current kernel version ?

Hi @ziflex
$ uname -r
4.4.0-78-generic

@deadprogram on my Fedora 25 I have this version
sh 4.10.15-200.fc25.x86_64
The situation has been improved, but it still hangs. Originally, I thought  it's gone, but the time before it hangs just has changed.

That what leads to wonder about the opening of the extra socket as Noble does? That would appear to be intended to address your specific issue.

@deadprogram sounds like a dirty hack.
wondering how other BLE solutions handle this.

Several of the other BLE libs use BlueZ, so we have to go spelunking thru that code to know for sure.
But I personally recommend that we do what https://github.com/sandeepmistry/noble does, since the maintainer of that project is quite active and knowledgeable.

@deadprogram we may try. But looks like Noble has BlueZ as a dependency as well.
https://github.com/sandeepmistry/noble#ubuntudebianraspbian

I suppose I was mistaken. When I looked thru https://github.com/sandeepmistry/node-bluetooth-hci-socket I did not notice any dependency.

@deadprogram @ziflex Did you find a solution to this? I'm not sure I have the same thing, but I try to scan my bluetooth scale using a Pi Zero W (with BLE onboard). First I made an eternal loop to scan for the scale, and read the data if it was online. However, I noticed that the loop would stop working after some time (usually it worked for at least half an hour, sometimes even several hours, before hanging in the scan).
This sounds similar to your issue?
This is the core part (specific commit for future reference in case this is solved): bluetooth.go
I removed the for loop to prevent the hanging, and now run the binary every minute through crond (with a scan duration of about 50s). This works for a whole day (instead of about an hour).
The for loop in the code was from line 24 until the end of the func (line 64).
Any suggestions are welcome! While the solution with crond works, it would be much nicer and more efficient if this were an internal loop...

@jovandeginste For what its worth, I encountered a similar problem on a Pi 3.  The issue was not that a hang would occur after some duration of time scanning but rather that a scan would hang when starting to scan.  When the hang occurred, killing the process resulted in a trace of goroutines looked strangely similar to what has been previously shared in this issue.  Disabling BlueZ entirely on the Pi (and ensuring that the scanning is started only from a process run with significant privilege) seemed to resolve the problem.  Also, even after disabling BlueZ, it seemed as if even just a single failed attempt to start scanning from a process without sufficient privilege resulted in subsequent problems (i.e. a start scan hang in the future).  So I'd recommend always rebooting if accidentally attempting to start scanning non-root.
I realize this does explain the root cause of the problem, but I wanted to share the steps I took to mitigate the problem in the hopes that it helps others and/or leads to identifying the underlying cause.

@wcwynn You may be completely right about BlueZ. I have it installed because I had a Python script before that did the same thing, and I needed to debug bluetooth to get everything working. I will try disabling BlueZ entirely and test it for a while. I do believe it may be the "start scan" that hangs.
I did notice that, if my go-code was running and I started the python script  too, the go-code hung until killed.

@wcwynn It seems to have helped! I now changed some timing parameters since I missed some packets, but the code has not stopped since yesterday. Thanks for the hint!

@jovandeginste I'm currently don't have enough time to dig into this issue. But I have noticed, that it's more stable on the latest kernel.

@ziflex Ok cool! After changing more stuff, the code started hanging again. I'll check what could be the reason, maybe the timing is too short now?

Found some bugs due to my refactoring. Running the tests again (will take a while, of course)

... but it was still hanging afterwards. I've tweaked some of the timings again, let's see what happens now!


Grid-based mobile layout

As of commit dc1e1fb I've had a crack at a grid-based mobile layout. This first version is pretty naive: it changes the grid from 1fr 2fr (or whatever the proportions are) to a single-track 1fr column, and it positions both the narrative and sticky content on that one column. Then it sets z-index: 1 on the narrative content to ensure it's on top.
In practice, I imagine we'd have a slightly more complex (and perhaps more configurable) grid that includes gutters and maybe a few subdivisions so that you can still align overlaid narrative content to the left or right. Or perhaps the latter makes sense for 'tablet' sizing, with mobile going right down the middle.
One problem I'm seeing with this first test is that our figures don't seem to be shrinking down from their native width:

I've added a test down the bottom of the doc to compare against. Normally .quarto-figure > figure sets width: 100% and the img itself has max-width: 100%. But for some reason this isn't working now.
I was worried that maybe the poem-related and that this JS was forcing something to be wide. But it doesn't seem to be poem-related (I still see the problem if I remove those from the test). And when I click up through the DOM from the offending img, only it and the figure have a width set on them (all the others are greyed out, indicating they're set based on parent or children). So I'm a bit stumped.

Found the culprit here! It's the GraphViz diagram. It isn't wrapped in .quarto-figure and specifically has max-width: none set on it, so it stays at 672px wide, forcing the whole column out.
Have isolated and reproduced this issue at https://github.com/jimjam-slam/test-quarto-graphviz-sizing and filed it as https://github.com/quarto-dev/quarto-cli/issues/9249 😊 If it is by design, we can override it by specifying width: 100% !important on the figure if need be, but let's see if the Quarto folks change anything.

Ahh, I was wrong! I've added the workaround I described for GraphViz sizing in commit 80da14f. It works when the poems are removed, but when the poems are present they're pushing the width out. I need to put some JS debugging statements back in...

Adding a max-width to the poem mitigates but doesn't entirely fix the problem. There's still a bit too much room, and the horizontal positioning looks like it's happening based on the pre-overflow width rather than the actual width—I'll need to dip back into the JS to check that.
Also, although I've set max-width: 100svh, it should really only be that if the container is 100svh (as it currently is on mobile). On desktop, it would reflect the proportions of the grid (which could be complicated if we allow the user to configure that). Maybe a CSS variable is in order to control both—or using JS to manually calculate it. Yuck.

@andrewpbray Here's what I'm thinking in terms of grid-based layout configs.
It's really five basic layouts, with only one being possible at mobile width but up to all five available at desktop width.

The mechanism I'm thinking is that you either define the basic layout via classes or via YAML:
---
closeread:
  layout-tablet: overlay-right
  layout-desktop: sidebar-right
  # (no layout-mobile options)
---

:::{.cr-section .cr-tablet-overlayright}
:::

We could define the grid layouts for those classes in SCSS (and perhaps attach those classes in Lua to ones that have no other layout using the YAML options).
There are two ways you could do this:

Write grid tracks for all the possible layouts in one system, and then simply set the properties defining which tracks are actually used according to the class.
Write separate grid tracks for each class. Only the grid tracks that are actually used for any given section are available, and users can override the class directly if they want to customise (we could make the precise widths CSS or SCSS variables). I think this is my preference, but I'm happy to kick it around!

What do you think?

In the mean time, I still haven't fixed this horizontal space problem — I'm so stuck that I even tried rendering the poem as an SVG (which is its own can of worms and also nukes accessibility).
Even more frustrating is that I can't reproduce the original scaling problem in Safari with a simpler test case—the text looks absolutely fine blown up in a simple document:

I might need to walk away from this one and have another swing in a few days!

A quick video to demo the inconsistency of the scaling problem in Safari (it doesn't look too bad because I've shrunk the video down for GitHub's attachment sizes, but at actual screen size it's a lot worse):
https://github.com/qmd-lab/closeread/assets/6520659/8e959a40-c3f3-41fe-b7d1-0266bb913bd4

I've pushed one more change that uses a variable poem font size (based on screen width and height). It still breaks at some unusual landscape aspect ratios, but at more common ones it behaves much more (and lays out properly more often even when scrollbars do pop  in).
I'd love to get to the bottom of the Safari bug and ditch a lot of this extra complexity, but I'm also mindful of time 🤔

Some great ideas and puzzling bugs here - looking forward to chatting!

Okay, returning to the original intent of this PR: letting users specify a layout!

@andrewpbray Here's what I'm thinking in terms of grid-based layout configs.
It's really five basic layouts, with only one being possible at mobile width but up to all five available at desktop width.

The mechanism I'm thinking is that you either define the basic layout via classes or via YAML:
---
closeread:
  layout-tablet: overlay-right
  layout-desktop: sidebar-right
  # (no layout-mobile options)
---

I think the Lua function needs to place the document YAML options as classes on body, and then attributes or classes used on cr-section flow through to them on the HTML. So the CSS would be something like:
# this is less specific (0-1-1), so it applies by default...
body.cr-overlay-right-desktop {
  // layout here
}

# this is more specific (0-2-1), so it overrides any body option
body .cr-section.cr-overlay-right-desktop {
  // layout here
}

(CSS specificity calculator is useful for confirming this ahead of time!)
Since centre overlay is the only one supported by mobile, I would make that the default and then have the other options function on breakpoints going up from there (so you're only ever specifying layout or desktop layout).
Bootstrap breakpoints also function going up from a minimum width by default too, so that works (we could also use those breakpoints directly — ie. instead of -tablet and -desktop, it's -sm, -md, -lg, xl, xxl). So you might end up with something like:
@include media-breakpoint-up(lg) {
  .cr-overlay-right-lg {
    // overlay right code goes here
  }
}

// next breakpoint up goes here, so
// if you provide tablet and desktop ones,
// the desktop one overrides the tablet one at that width (i think)

Okay, the above isn't entirely working — for the overlay classes, I don't know how to calculate the space between narrative edge and sticky edge.
Maybe we just use separate grid tracks for the sidebar layouts, and all the overlay ones work as the mobile layout (overlay-center) and the sticky stack do: overlaid on one grid column, and then we margin/pad them to get the right effect.
So then for overlay layouts it becomes:

grid-column: 1
(narrative) margin-left, margin-right
(sticky col) margin-left, margin-right

While for sidebar layouts it becomes:

(narrative, sticky) grid-column: 1 or 2
(narrative, optional) margin-left, margin-right
(sticky col, optional) margin-left, margin-right

This is basically how the sidebar works currently!

I also just found out that you're supposed to set container-type on the parent when using container units and queries! That might help! 😅

Taking a look at this now... will have feedback in a couple hours...
:snail:

It could be that container-type is only used for container queries, not container units. I need to do a bit of reading on it myself!

While tinkering around with styling, I realized nytimes keeps their sidebar at a fixed width. Try widening and narrowing the window here:
https://www.nytimes.com/interactive/2022/03/06/books/auden-musee-des-beaux-arts.html

Closing in favour of #55!


Release v1.3.1

[x] Create a branch for the release branch release-v1.4.0 release-v1.3.1
[x] Update the dependencies. The dependabot PR backlog is not comprehensive and doesn't include transitive dependencies, and merging them one at a time tends to break things, so the best way to do this is manually with npm. commit 54a1db8a2d97754a6a0be9a54a74100133df284a
[x] Bump the intermineVersion in data-sources/intermine/api/index.ts if appropriate. N/A
[x] Update the base image version in the Dockerfile if necessary (this should be the most recent node LTS version) and do a test build and run of the Docker image on you local machine so you know if something is going to go off the rails before the automated build action on GitHub. N/A
[x] Update the GHCR image tag in compose.prod.yml to the imminent release version commit 9f43fd6dd34f5b7256e01bfb22202d2611f5a1c0
[x] Bump the "version" number in package.json. commit 9f43fd6dd34f5b7256e01bfb22202d2611f5a1c0
[x] Open a PR that merges the release branch into main. PR #151
[x] Merge the release PR after it passes testing and review.
[x] Tag a corresponding release on GitHub. This will trigger an automated Docker image build on GitHub. If the build succeeds it will be automatically published to GHCR.

v1.3.1 released!


When running with watch, assets fail to regenerate on save

If you are running any of the webpack scripts with watch enabled, the clean process wipes out assets, but does not replace the deleted files. If you add an image to the images folder, the new asset is picked up and placed in the assets folder, but the rest of the images are not transferred.
The only fix I've found so far is to disable the cleanStateWebpackAssets option, but this isn't optimal.

        new CleanWebpackPlugin({
            cleanOnceBeforeBuildPatterns: ['./wwwroot/dist', './wwwroot/assets'],
            cleanStaleWebpackAssets: false, // It's been removing all images, we want to leave those in place.
            root: ROOT
        }),

@JerrettDavis Thanks, I will add this


Comments Pagination

Orchard has no pagination support for blog comments.
This can be a problem in a situation where there is a big number of comments.
Another problem is that comments can be nested endlessly, making them unreadable after certain number of levels and making pagination more difficult.
Is there any plan to improve blogs to handle these problems?

No plans right now, but if you want to do it then there is one. You can also integrate something like Disqus. But I understand it has other constraints.
I assume we could provide some options to drive the rendering, but then it impacts theming and themes would have to support all these features ... or just ignore them.

in the mean time if disqus was an option you'd consider; i knocked up a module for it a while ago here - https://github.com/carlwoodhouse/Orchard.Cw.Disqus

@carlwoodhouse we will take a look to it, even if the idea was to insert a sort of pagination in pure orchard frontend comments. We will search for some suitable solutions, and we will post an update as soon as possibile.

I have been giving this issue a look, as well as how Reddit paginates comments as an example.
I have some ideas on how this can begin to be tackled, some of which may even not be breaking. However I have some doubts regarding the Position property of CommentPart, and how it is computed. (note that all the considerations here are related to my local tests using msSQL2012)
Let's suppose we have a content with the following comments:

commentA, with Position = 10.0
commentB, with Position = 20.0
commentC, with Position = 30.0

I reply to commentC: this creates commentC1, with Position 31.0, because in the Create method of CommentController no nextComment is found.
I reply again to commentC: this creates commentC2. Again this will have position 31.0, because no nextComment is found on the same level as commentC. This does not look 100% right to me, to be honest, but I can see it working anyway because we have other properties we can use to get the actual order of the replies (however, in CommentsPartDriver we are only ordering by Position).

Now for the fun bits....

I reply to commentB. This creates commentB1 with Position 15.0. The nextComment is commentC, but the previousComment, rather than being null, is commentB1 itself. Since it has just been created, its Position is at the default value of 0.0. The average between the two is then 15.0, rather than the expected value of 25.0. This looks wrong to me, even though it does not seem to give any issue that is evident on the front end. Indeed, fthe next reply to commentB will have previousComment = commentB1, so it will have increasing Position as would be expected.

Now I add a further top-level comment, called commentD. Its Position will be its own Id, e.g. 50.0.

Then I reply again to commentC. This creates commentC3, whose Position will be (50+31)/2 = 40.5: its previousComment is commentC2, and its nextComment is commentD.

I see no problem whatsoever with points 1 and 4 above.
I feel that point 2 is debatable.
Point 3 looks wrong to me in context of the other points, as well as by the apparent intention of the code.
Point 5 troubles me only in that it leads to a behaviour (regarding the values of Position) that is apparently different than what is given by point 3.
All of that is pretty easy to change around so that the Position value becomes unique for a comment, or at least to have that the Position of children is never computed as an average between the next Position and 0 (this is done by adding a check on the id in a single line). However, updating the Position for comments in db is going to be a bit tricky (mostly because of the interaction between points 3 and 5 above).
The main issue I have with the way position is computed (point 3) is that because of that I don't see a reliable way to get in a single shot all replies at all levels of a comment, but rather I have to get his replies, then their replies, then their replies...
If position were computed "correctly", all levels of reply to a comment would be those whose Position are greater than the comment's and smaller than nextComment's, and I think this could simplify things for pagination.


Executing main does not start anything

So basically running ./main after i built it leads to the following error:
panic: runtime error: cgo result has Go pointer
....

This is well known, we don't yet support Go 1.6 https://github.com/limetext/qml-go/issues/3
Make sure to join us on Gitter.im.

so you only support things below 1.6 ?

Not yet. We are working on support for it though.


use env() value is APP_ENV, show stable

Laravel Version
11.34.2
PHP Version
8.3.14
Database Driver & Version
No response
Description
in controller , echo
echo env('APP_ENV');

show 'stable'
Steps To Reproduce
laravel new project_name

Hi there,
Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.


Migration - Software and Versions

Pull Request summary:
Migration to Pydantic v2.
Description of changes:
versions_utils
software_action
partition_manager
Checklist:

[x] Make sure to run pre-commit before committing changes
[X] Make sure all checks have passed
[X] PR description is clear and comprehensive
[X] Mentioned the issue that this PR solves (if applicable)
[X] Make sure you test the changes

This issue was migrated from an old repository: https://github.com/CiscoDevNet/catalystwan/pull/454


Update to SDN5 / SD Kay

@jasperblues after the SF 5.0 SDN5.0 SD2.0 release next week, could you update this project too?

Sure

Hi @jasperblues. Has there been any work started on your side? Otherwise I can help and update it.

Hello @meistermeier. Not yet, unfortunately. If you're interested in helping that would be great.

@meistermeier Let me know if you work on it, ok? Otherwise I have some time on Sunday and Monday :)

That sounds great. I do not want to put stress on you ;) I think I won't accomplish this today but also have a look back here on Monday. So we can sync again if you have not started then.

@meistermeier Have at least built against a more recent Kotlin. Will come back to SDN5 asap.

@meistermeier conversion to SDN5 in progress

@meistermeier I updated to SDN5, however on the following:
@RelationshipEntity(type = "ACTED_IN")
class Role(@GraphId var id: Long? = null,
           @StartNode var person: Person,
           @EndNode var movie: Movie,
           var roles: ArrayList<String> = ArrayList()) {

    fun addRoleName(name: String) {
        this.roles.add(name)
    }

Changing @GraphId to @Id here causes breakages. Let's explore why - will post on the #ogm slack channel, and raise an issue if required.
https://github.com/neo4j-examples/movies-kotlin-spring-data-neo4j/blob/master/src/main/java/movies/spring/data/neo4j/domain/model/persistent/entities/Role.kt

As mentioned on slack before:
If @Id is used and its value gets not set manually @GeneratedValue must also be added to the field, to make use of the InternalIdStrategy.

Thanks @meistermeier. Update to SDN5 is complete - please can close this off whenever you're happy.


(request) Remove the Slide Sound

The sound is just pretty annoying😅... Maybe you could make it very subtle🤔

I'm not too happy with the current sliding either (nor balance loss for that matter). I'll rework them.
Need to add in a config system for this.
Maybe it'd work better if it's played when you run for extended periods of time, though usually it feels out of place. Especially when you get stuck on a block and it plays.
If you have any suggestions let me know. For now, when I get to it, I'll disable it by default.


Panel keeps on collapsing on touch of the views inside it (button)

Hi,
First of all, thanks for this one. =)
I just wanna ask, I tried running the Demo app included in the project and then added some buttons inside the sliding panel but I can't click on the buttons, but instead the panel keeps on hiding.
Am I missing something here?
Thanks and regards!

Hello,
mPanelLayout.setDragView(this.findViewById(R.id.ivPullUp));
This method is not working for me. I have tried to set my whole view as dragview still it's not working. Please update for same.


FC016 triggers when using Chef 12.5 custom resources

In the new custom resource format there is no need to specify a default action, but foodcritic alerts that one hasn't been declared.

I just got bit by this. Yes, the new custom resource says the first action listed is the default action. I'm going to need to turn this rule off in our code base. :neutral_face:.

You can turn it off with a .foodcritic file in the repo that contains ~FC016.  We need to fix the issue though

Thanks, @tas50. Done that already. Just adding my :+1:  that it shouldn't trigger when using new custom resources.

See also #370, there's probably more

This is fixed in 10.1.1


Embed patterns in JSON format

embed instrumentation patterns in JSON format to pass them to runtime side.

Coverage decreased (-1.7%) to 97.293% when pulling 37913f475a4b1273d1ce2ed5ef5a6ee1386a4364 on embed-patterns-as-json into 1535ee74ff68314ca1bedc36432f39ba3ce1c3d5 on master.


[Event Request / Application Refactoring] COD 396 - DoGetNextNo - allow to insert 'reserved' numbers

We face following challenge:
To avoid gaps in the posted sales / purchase documents, BC adds empty posted documents when deleting a document that had already a posted doc. no. assigned. Our financial consultant is not in favor of these 'empty' documents, so we decided to disable the creation of these documents via an extension. The no. that would have been used for the posted document is stored in a custom table and is to be re-used later on when assigning a new posted no.
Scenario:

Document nos '1 / 2 / 3 / 4 / 5' assigned
No. series 'Last Used' = '5'
Delete Document '3' > BC will create a posted doc. with No. '3' > This has been disabled
Creating a new document will get no. '6' > We would like to assign No. '3' instead (from a custom table)

To achieve the above, we added code in the 'DoGetNextNo' function in COD 396. Can you provide an event publisher to support migration to events?
...
IF ModifySeries THEN BEGIN
  //NVTBE/REQ2018-0570 Begin
  IF NOT DocumentNumbersToBeReused.GetNoTobeReused(NoSeriesLine."Series Code",NoSeriesLine."Line No.",NoSeriesLine."Last No. Used") THEN
  //NVTBE/REQ2018-0570 End
  >>> ADD EVENT HERE <<<
  NoSeriesLine.MODIFY
END ELSE
  LastNoSeriesLine := NoSeriesLine;

OnAfterGetNextNo3(NoSeriesLine);

EXIT(NoSeriesLine."Last No. Used");
...

Alternative: Application refactoring: The above solution is not the most elegant. It would be better if the below part of the 'DoGetNextNo' code could be moved to a 'CreateNextNo' function, with OnBeforeDoGetNextNo publisher and Handled pattern, so we could change the No. to be used. However, result should be returned via variable instead of "Last No. Used" (to avoid the value of "Last No. Used" to be updated to '3' instead of leaving it to '5' in the above scenario). Also 'ModifySeries' should be false in this case. (Not sure about the 'LastNoSeriesLine = NoSeriesLine' statement)
...
IF NoSeriesLine."Last No. Used" = '' THEN BEGIN
  IF NoErrorsOrWarnings AND (NoSeriesLine."Starting No." = '') THEN
    EXIT('');
  NoSeriesLine.TESTFIELD("Starting No.");
  NoSeriesLine."Last No. Used" := NoSeriesLine."Starting No.";
END ELSE
  IF NoSeriesLine."Increment-by No." <= 1 THEN
    NoSeriesLine."Last No. Used" := INCSTR(NoSeriesLine."Last No. Used")
  ELSE
    IncrementNoText(NoSeriesLine."Last No. Used",NoSeriesLine."Increment-by No.");
...

Open for any feedback / discussion!
PS: Please make sure solution is compatible with the future 'non-locking no. series' refactoring...

We already have event implemented in this place, actually in procedure ModifyNoSeriesLine:
local procedure ModifyNoSeriesLine(var NoSeriesLine: Record "No. Series Line")
var
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeModifyNoSeriesLine(NoSeriesLine, IsHandled);
    if IsHandled then
        exit;

    NoSeriesLine.Modify;
end;

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


Dev docker setup

This PR fixes Issue #11
see comments for details

@lackrobin How migrations will be managed? https://github.com/zerologin/zerologin/pull/14#discussion_r988770831

@Dolu89 Migration now runs on container startup, decoupled from the default build step


Home page

Breaking down long component and fixing errors with data rendering

Hey was working on changing some things to see if they work. Can pull if you want but it does change the functionality. Thought it was pushing to my forked branch so I didn't mess up or change anything on the main project.


Reverse the 50% question to ask about leadership duties

This adds a new question into the flow that asks if the user was in a leadership position. If they were, they are then asked if that took up more than half of their time. If they weren't, they are no longer asked about how much time they spent teaching eligible subjects.

 Implement reverse 50% question in application

Ah good spot. I think I agree. I'll make that change.


[camera] Camera 0.11+ API stops working  Activity io.flutter.embedding.android.FlutterActivity has leaked IntentReceiver io.flutter.plugins.camerax.DeviceOrientationManager

What package does this bug report belong to?
camera
What target platforms are you seeing this bug on?
Android
Have you already upgraded your packages?
Yes
Dependency versions
pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  async:
    dependency: transitive
    description:
      name: async
      sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
      url: "https://pub.dev"
    source: hosted
    version: "2.11.0"
  boolean_selector:
    dependency: transitive
    description:
      name: boolean_selector
      sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.1"
  camera:
    dependency: "direct main"
    description:
      name: camera
      sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167"
      url: "https://pub.dev"
    source: hosted
    version: "0.11.0+2"
  camera_android_camerax:
    dependency: transitive
    description:
      name: camera_android_camerax
      sha256: "7cd93578ad201dcc6bb5810451fb00d76a86bab9b68dceb68b8cbd7038ac5846"
      url: "https://pub.dev"
    source: hosted
    version: "0.6.8+3"
  camera_avfoundation:
    dependency: transitive
    description:
      name: camera_avfoundation
      sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655"
      url: "https://pub.dev"
    source: hosted
    version: "0.9.17+3"
  camera_platform_interface:
    dependency: transitive
    description:
      name: camera_platform_interface
      sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061
      url: "https://pub.dev"
    source: hosted
    version: "2.8.0"
  camera_web:
    dependency: transitive
    description:
      name: camera_web
      sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f"
      url: "https://pub.dev"
    source: hosted
    version: "0.3.5"
  characters:
    dependency: transitive
    description:
      name: characters
      sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
      url: "https://pub.dev"
    source: hosted
    version: "1.3.0"
  clock:
    dependency: transitive
    description:
      name: clock
      sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
      url: "https://pub.dev"
    source: hosted
    version: "1.1.1"
  collection:
    dependency: transitive
    description:
      name: collection
      sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
      url: "https://pub.dev"
    source: hosted
    version: "1.18.0"
  cross_file:
    dependency: transitive
    description:
      name: cross_file
      sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670"
      url: "https://pub.dev"
    source: hosted
    version: "0.3.4+2"
  csslib:
    dependency: transitive
    description:
      name: csslib
      sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb"
      url: "https://pub.dev"
    source: hosted
    version: "1.0.0"
  cupertino_icons:
    dependency: "direct main"
    description:
      name: cupertino_icons
      sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
      url: "https://pub.dev"
    source: hosted
    version: "1.0.8"
  fake_async:
    dependency: transitive
    description:
      name: fake_async
      sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
      url: "https://pub.dev"
    source: hosted
    version: "1.3.1"
  flutter:
    dependency: "direct main"
    description: flutter
    source: sdk
    version: "0.0.0"
  flutter_lints:
    dependency: "direct dev"
    description:
      name: flutter_lints
      sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
      url: "https://pub.dev"
    source: hosted
    version: "4.0.0"
  flutter_plugin_android_lifecycle:
    dependency: transitive
    description:
      name: flutter_plugin_android_lifecycle
      sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda"
      url: "https://pub.dev"
    source: hosted
    version: "2.0.22"
  flutter_test:
    dependency: "direct dev"
    description: flutter
    source: sdk
    version: "0.0.0"
  flutter_web_plugins:
    dependency: transitive
    description: flutter
    source: sdk
    version: "0.0.0"
  html:
    dependency: transitive
    description:
      name: html
      sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
      url: "https://pub.dev"
    source: hosted
    version: "0.15.4"
  leak_tracker:
    dependency: transitive
    description:
      name: leak_tracker
      sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
      url: "https://pub.dev"
    source: hosted
    version: "10.0.5"
  leak_tracker_flutter_testing:
    dependency: transitive
    description:
      name: leak_tracker_flutter_testing
      sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
      url: "https://pub.dev"
    source: hosted
    version: "3.0.5"
  leak_tracker_testing:
    dependency: transitive
    description:
      name: leak_tracker_testing
      sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
      url: "https://pub.dev"
    source: hosted
    version: "3.0.1"
  lints:
    dependency: transitive
    description:
      name: lints
      sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
      url: "https://pub.dev"
    source: hosted
    version: "4.0.0"
  matcher:
    dependency: transitive
    description:
      name: matcher
      sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
      url: "https://pub.dev"
    source: hosted
    version: "0.12.16+1"
  material_color_utilities:
    dependency: transitive
    description:
      name: material_color_utilities
      sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
      url: "https://pub.dev"
    source: hosted
    version: "0.11.1"
  meta:
    dependency: transitive
    description:
      name: meta
      sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
      url: "https://pub.dev"
    source: hosted
    version: "1.15.0"
  path:
    dependency: transitive
    description:
      name: path
      sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
      url: "https://pub.dev"
    source: hosted
    version: "1.9.0"
  plugin_platform_interface:
    dependency: transitive
    description:
      name: plugin_platform_interface
      sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.8"
  sky_engine:
    dependency: transitive
    description: flutter
    source: sdk
    version: "0.0.99"
  source_span:
    dependency: transitive
    description:
      name: source_span
      sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
      url: "https://pub.dev"
    source: hosted
    version: "1.10.0"
  stack_trace:
    dependency: transitive
    description:
      name: stack_trace
      sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
      url: "https://pub.dev"
    source: hosted
    version: "1.11.1"
  stream_channel:
    dependency: transitive
    description:
      name: stream_channel
      sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
      url: "https://pub.dev"
    source: hosted
    version: "2.1.2"
  stream_transform:
    dependency: transitive
    description:
      name: stream_transform
      sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.0"
  string_scanner:
    dependency: transitive
    description:
      name: string_scanner
      sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
      url: "https://pub.dev"
    source: hosted
    version: "1.2.0"
  term_glyph:
    dependency: transitive
    description:
      name: term_glyph
      sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
      url: "https://pub.dev"
    source: hosted
    version: "1.2.1"
  test_api:
    dependency: transitive
    description:
      name: test_api
      sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
      url: "https://pub.dev"
    source: hosted
    version: "0.7.2"
  vector_math:
    dependency: transitive
    description:
      name: vector_math
      sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
      url: "https://pub.dev"
    source: hosted
    version: "2.1.4"
  video_player:
    dependency: "direct main"
    description:
      name: video_player
      sha256: e30df0d226c4ef82e2c150ebf6834b3522cf3f654d8e2f9419d376cdc071425d
      url: "https://pub.dev"
    source: hosted
    version: "2.9.1"
  video_player_android:
    dependency: transitive
    description:
      name: video_player_android
      sha256: "38d8fe136c427abdce68b5e8c3c08ea29d7a794b453c7a51b12ecfad4aad9437"
      url: "https://pub.dev"
    source: hosted
    version: "2.7.3"
  video_player_avfoundation:
    dependency: transitive
    description:
      name: video_player_avfoundation
      sha256: d1e9a824f2b324000dc8fb2dcb2a3285b6c1c7c487521c63306cc5b394f68a7c
      url: "https://pub.dev"
    source: hosted
    version: "2.6.1"
  video_player_platform_interface:
    dependency: transitive
    description:
      name: video_player_platform_interface
      sha256: "236454725fafcacf98f0f39af0d7c7ab2ce84762e3b63f2cbb3ef9a7e0550bc6"
      url: "https://pub.dev"
    source: hosted
    version: "6.2.2"
  video_player_web:
    dependency: transitive
    description:
      name: video_player_web
      sha256: "6dcdd298136523eaf7dfc31abaf0dfba9aa8a8dbc96670e87e9d42b6f2caf774"
      url: "https://pub.dev"
    source: hosted
    version: "2.3.2"
  vm_service:
    dependency: transitive
    description:
      name: vm_service
      sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
      url: "https://pub.dev"
    source: hosted
    version: "14.2.5"
  web:
    dependency: transitive
    description:
      name: web
      sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
      url: "https://pub.dev"
    source: hosted
    version: "1.0.0"
sdks:
  dart: ">=3.5.3 <4.0.0"
  flutter: ">=3.24.0"

Steps to reproduce
Affected version camera: 0.11
Tested on camera 0.10.6 and no issue.

Open flutter page that use camera API using the cached flutter engine.

startActivity(
                FlutterActivity
                    .withCachedEngine(MyApplication.FLUTTER_ENGINE_ID)
                    .build(this)
            )

Close the flutter app
Reopen flutter app and recall camera API
Camera stops working, and error logs showing.

Expected results
Camera API should be usable when using cached flutter engine.
Actual results
Camera API not usable after the first app run.
Code sample
Code sample
I created example app to reproduce the issue https://github.com/josephmangmang/Camera-Test-Module

Screenshots or Videos

Screenshots / Video demonstration

Logs
When using camera api for the first time after app launch and until closing the app
Logs

2024-09-21 19:44:12.056  9295-9321  flutter                 com.mt.cameratest                    I  Method channel handler called with method: openCamera
2024-09-21 19:44:12.091  9295-9295  m.mt.camerates          com.mt.cameratest                    W  Accessing hidden method Landroid/view/accessibility/AccessibilityNodeInfo;->getSourceNodeId()J (greylist,test-api, reflection, allowed)
2024-09-21 19:44:12.091  9295-9295  m.mt.camerates          com.mt.cameratest                    W  Accessing hidden method Landroid/view/accessibility/AccessibilityRecord;->getSourceNodeId()J (greylist, reflection, allowed)
2024-09-21 19:44:12.091  9295-9295  m.mt.camerates          com.mt.cameratest                    W  Accessing hidden field Landroid/view/accessibility/AccessibilityNodeInfo;->mChildNodeIds:Landroid/util/LongArray; (greylist, reflection, allowed)
2024-09-21 19:44:12.091  9295-9295  m.mt.camerates          com.mt.cameratest                    W  Accessing hidden method Landroid/util/LongArray;->get(I)J (greylist, reflection, allowed)
2024-09-21 19:44:12.126  9295-9321  flutter                 com.mt.cameratest                    I  Getting available cameras...
2024-09-21 19:44:12.142  9295-9322  HostConnection          com.mt.cameratest                    D  HostConnection::get() New Host Connection established 0xb4000077f51aa650, tid 9322
2024-09-21 19:44:12.143  9295-9322  HostConnection          com.mt.cameratest                    D  HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
2024-09-21 19:44:12.144  9295-9322  EGL_emulation           com.mt.cameratest                    D  eglMakeCurrent: 0xb4000077e52101b0: ver 3 0 (tinfo 0xb4000077851e55e0) (first time)
2024-09-21 19:44:12.182  9295-9322  EGL_emulation           com.mt.cameratest                    D  eglCreateContext: 0xb4000077e52131d0: maj 3 min 0 rcv 3
2024-09-21 19:44:12.225  9295-9295  m.mt.camerates          com.mt.cameratest                    W  Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (greylist, linking, allowed)
2024-09-21 19:44:12.225  9295-9295  m.mt.camerates          com.mt.cameratest                    W  Accessing hidden method Landroid/app/ActivityThread;->getActivity(Landroid/os/IBinder;)Landroid/app/Activity; (greylist, linking, allowed)
2024-09-21 19:44:12.225  9295-9351  ProfileInstaller        com.mt.cameratest                    D  Installing profile for com.mt.cameratest
2024-09-21 19:44:12.229  9295-9350  CameraManagerGlobal     com.mt.cameratest                    I  Connecting to camera service
2024-09-21 19:44:12.240  9295-9350  CameraRepository        com.mt.cameratest                    D  Added camera: 0
2024-09-21 19:44:12.246  9295-9350  Camera2CameraInfo       com.mt.cameratest                    I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_3
2024-09-21 19:44:12.247  9295-9350  CameraRepository        com.mt.cameratest                    D  Added camera: 1
2024-09-21 19:44:12.248  9295-9350  Camera2CameraInfo       com.mt.cameratest                    I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_FULL
2024-09-21 19:44:12.248  9295-9350  CameraValidator         com.mt.cameratest                    D  Verifying camera lens facing on emulator_arm64, lensFacingInteger: null
2024-09-21 19:44:12.312  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:12.364  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=270, isOppositeFacing=false, result=270
2024-09-21 19:44:12.365  9295-9321  flutter                 com.mt.cameratest                    I  Available cameras: [CameraDescription(Camera 0, CameraLensDirection.back, 90), CameraDescription(Camera 1, CameraLensDirection.front, 270)]
2024-09-21 19:44:17.780  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.784  9295-9295  chatty                  com.mt.cameratest                    I  uid=10168(com.mt.cameratest) identical 3 lines
2024-09-21 19:44:17.785  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.785  9295-9295  DynamicRangeResolver    com.mt.cameratest                    D  Resolved dynamic range for use case androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987 to no compatible HDR dynamic ranges.
                                                                                DynamicRange@45b6a82{encoding=UNSPECIFIED, bitDepth=0}
                                                                                ->
                                                                                DynamicRange@34001cd{encoding=SDR, bitDepth=8}
2024-09-21 19:44:17.790  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.790  9295-9295  DeferrableSurface       com.mt.cameratest                    D  Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.processing.SurfaceEdge$SettableSurface@559acce}
2024-09-21 19:44:17.791  9295-9295  DeferrableSurface       com.mt.cameratest                    D  Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@ee7c7da}
2024-09-21 19:44:17.792  9295-9295  DeferrableSurface       com.mt.cameratest                    D  New surface in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@ee7c7da}
2024-09-21 19:44:17.792  9295-9295  DeferrableSurface       com.mt.cameratest                    D  use count+1, useCount=1 androidx.camera.core.SurfaceRequest$2@ee7c7da
2024-09-21 19:44:17.792  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.794  9295-9295  ImageCapture            com.mt.cameratest                    D  createPipeline(cameraId: 0, streamSpec: StreamSpec{resolution=640x480, dynamicRange=DynamicRange@34001cd{encoding=SDR, bitDepth=8}, expectedFrameRateRange=[0, 0], implementationOptions=androidx.camera.camera2.impl.Camera2ImplConfig@93485e7})
2024-09-21 19:44:17.797  9295-9295  DeferrableSurface       com.mt.cameratest                    D  Surface created[total_surfaces=3, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@3d39594}
2024-09-21 19:44:17.799  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181 ACTIVE
2024-09-21 19:44:17.799  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.799  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.800  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:17.800  9295-9295  DeferrableSurface       com.mt.cameratest                    D  Surface created[total_surfaces=4, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@d477832}
2024-09-21 19:44:17.800  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318 ACTIVE
2024-09-21 19:44:17.800  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:17.800  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181 ACTIVE
2024-09-21 19:44:17.800  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:17.801  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315 INACTIVE
2024-09-21 19:44:17.801  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:17.801  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:17.801  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use cases [androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318, androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315] now ATTACHED
2024-09-21 19:44:17.801  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  All use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318, androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315] for camera: 0
2024-09-21 19:44:17.802  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318] for camera: 0
2024-09-21 19:44:17.803  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Resetting Capture Session
2024-09-21 19:44:17.803  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Releasing session in state INITIALIZED
2024-09-21 19:44:17.803  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Attempting to force open the camera.
2024-09-21 19:44:17.803  9295-9352  CameraStateRegistry     com.mt.cameratest                    D  tryOpenCamera(Camera@4cd9be0[id=0]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS
2024-09-21 19:44:17.803  9295-9352  CameraStateRegistry     com.mt.cameratest                    D  Recalculating open cameras:
                                                                                Camera                                       State
                                                                                -------------------------------------------------------------------
                                                                                Camera@4cd9be0[id=0]                         OPENING
                                                                                Camera@294d96a[id=1]                         UNKNOWN
                                                                                -------------------------------------------------------------------
                                                                                Open count: 1 (Max allowed: 1)
2024-09-21 19:44:17.804  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Opening camera.
2024-09-21 19:44:17.804  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING
2024-09-21 19:44:17.804  9295-9352  CameraStateMachine      com.mt.cameratest                    D  New public camera state CameraState{type=OPENING, error=null} from OPENING and null
2024-09-21 19:44:17.804  9295-9352  CameraStateMachine      com.mt.cameratest                    D  Publishing new public camera state CameraState{type=OPENING, error=null}
2024-09-21 19:44:17.804  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  All use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318, androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315] for camera: 0
2024-09-21 19:44:17.827  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318 ACTIVE
2024-09-21 19:44:17.827  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318] for camera: 0
2024-09-21 19:44:17.828  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181 ACTIVE
2024-09-21 19:44:17.828  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318] for camera: 0
2024-09-21 19:44:17.829  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use case androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315 INACTIVE
2024-09-21 19:44:17.829  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318] for camera: 0
2024-09-21 19:44:17.831  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} CameraDevice.onOpened()
2024-09-21 19:44:17.831  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Transitioning camera internal state: OPENING --> OPENED
2024-09-21 19:44:17.831  9295-9352  CameraStateRegistry     com.mt.cameratest                    D  Recalculating open cameras:
                                                                                Camera                                       State
                                                                                -------------------------------------------------------------------
                                                                                Camera@4cd9be0[id=0]                         OPEN
                                                                                Camera@294d96a[id=1]                         UNKNOWN
                                                                                -------------------------------------------------------------------
                                                                                Open count: 1 (Max allowed: 1)
2024-09-21 19:44:17.831  9295-9352  CameraStateMachine      com.mt.cameratest                    D  New public camera state CameraState{type=OPEN, error=null} from OPEN and null
2024-09-21 19:44:17.831  9295-9352  CameraStateMachine      com.mt.cameratest                    D  Publishing new public camera state CameraState{type=OPEN, error=null}
2024-09-21 19:44:17.831  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  All use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318, androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315] for camera: 0
2024-09-21 19:44:17.834  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318] for camera: 0
2024-09-21 19:44:17.834  9295-9352  SyncCaptureSessionBase  com.mt.cameratest                    D  [androidx.camera.camera2.internal.SynchronizedCaptureSessionBaseImpl@eb2cddb] getSurface...done
2024-09-21 19:44:17.834  9295-9352  CaptureSession          com.mt.cameratest                    D  Opening capture session.
2024-09-21 19:44:17.842  9295-9352  DeferrableSurface       com.mt.cameratest                    D  use count+1, useCount=2 androidx.camera.core.SurfaceRequest$2@ee7c7da
2024-09-21 19:44:17.842  9295-9352  DeferrableSurface       com.mt.cameratest                    D  New surface in use[total_surfaces=4, used_surfaces=2](androidx.camera.core.impl.ImmediateSurface@3d39594}
2024-09-21 19:44:17.842  9295-9352  DeferrableSurface       com.mt.cameratest                    D  use count+1, useCount=1 androidx.camera.core.impl.ImmediateSurface@3d39594
2024-09-21 19:44:17.842  9295-9352  DeferrableSurface       com.mt.cameratest                    D  New surface in use[total_surfaces=4, used_surfaces=3](androidx.camera.core.impl.ImmediateSurface@d477832}
2024-09-21 19:44:17.842  9295-9352  DeferrableSurface       com.mt.cameratest                    D  use count+1, useCount=1 androidx.camera.core.impl.ImmediateSurface@d477832
2024-09-21 19:44:17.847  9295-9352  CaptureSession          com.mt.cameratest                    D  Attempting to send capture request onConfigured
2024-09-21 19:44:17.847  9295-9352  CaptureSession          com.mt.cameratest                    D  Issuing request for session.
2024-09-21 19:44:17.848  9295-9352  Camera2Cap...estBuilder com.mt.cameratest                    D  createCaptureRequest
2024-09-21 19:44:17.850  9295-9352  CaptureSession          com.mt.cameratest                    D  CameraCaptureSession.onConfigured() mState=OPENED
2024-09-21 19:44:17.850  9295-9352  CaptureSession          com.mt.cameratest                    D  CameraCaptureSession.onReady() OPENED
2024-09-21 19:44:17.851  9295-9314  Gralloc4                com.mt.cameratest                    W  allocator 3.x is not supported
2024-09-21 19:44:17.869  9295-9295  CameraOrientationUtil   com.mt.cameratest                    D  getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
2024-09-21 19:44:17.932  9295-9322  ImageReade...ceProducer com.mt.cameratest                    D  ImageTextureEntry can't wait on the fence on Android < 33
2024-09-21 19:44:19.604  9295-9314  BufferQueueProducer     com.mt.cameratest                    E  [ImageReader-640x480f22m5-9295-3](id:244f00000003,api:4,p:365,c:9295) queueBuffer: BufferQueue has been abandoned
2024-09-21 19:44:19.604  9295-9314  BufferQueueProducer     com.mt.cameratest                    E  [ImageReader-640x480f22m5-9295-3](id:244f00000003,api:4,p:365,c:9295) dequeueBuffer: BufferQueue has been abandoned
2024-09-21 19:44:19.635  9295-9295  DeferrableSurface       com.mt.cameratest                    D  surface closed,  useCount=2 closed=true androidx.camera.core.SurfaceRequest$2@ee7c7da
2024-09-21 19:44:19.635  9295-9295  DeferrableSurface       com.mt.cameratest                    D  surface closed,  useCount=0 closed=true androidx.camera.core.processing.SurfaceEdge$SettableSurface@559acce
2024-09-21 19:44:19.636  9295-9295  DeferrableSurface       com.mt.cameratest                    D  Surface terminated[total_surfaces=3, used_surfaces=3](androidx.camera.core.processing.SurfaceEdge$SettableSurface@559acce}
2024-09-21 19:44:19.636  9295-9295  DeferrableSurface       com.mt.cameratest                    D  use count-1,  useCount=1 closed=true androidx.camera.core.SurfaceRequest$2@ee7c7da
2024-09-21 19:44:19.637  9295-9295  ImageCapture            com.mt.cameratest                    D  clearPipeline
2024-09-21 19:44:19.637  9295-9295  DeferrableSurface       com.mt.cameratest                    D  surface closed,  useCount=1 closed=true androidx.camera.core.impl.ImmediateSurface@3d39594
2024-09-21 19:44:19.637  9295-9316  BufferQueueProducer     com.mt.cameratest                    E  [ImageReader-640x480f22m5-9295-3](id:244f00000003,api:4,p:365,c:9295) queueBuffer: BufferQueue has been abandoned
2024-09-21 19:44:19.637  9295-9295  DeferrableSurface       com.mt.cameratest                    D  surface closed,  useCount=1 closed=true androidx.camera.core.impl.ImmediateSurface@d477832
2024-09-21 19:44:19.638  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Use cases [androidx.camera.core.Preview-f94ddeb5-8d97-460a-b6ac-86c9463b5987146535318, androidx.camera.core.ImageCapture-1e3a1cd3-0752-452b-84f7-41153a1fdd4c185043181, androidx.camera.core.ImageAnalysis-e215b25d-24c3-4a42-9846-c77e238bc8a538523315] now DETACHED for camera
2024-09-21 19:44:19.638  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  All use case: [] for camera: 0
2024-09-21 19:44:19.638  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Resetting Capture Session
2024-09-21 19:44:19.638  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Releasing session in state OPENED
2024-09-21 19:44:19.638  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:19.638  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:19.639  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Closing camera.
2024-09-21 19:44:19.639  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Transitioning camera internal state: OPENED --> CLOSING
2024-09-21 19:44:19.639  9295-9352  CameraStateRegistry     com.mt.cameratest                    D  Recalculating open cameras:
                                                                                Camera                                       State
                                                                                -------------------------------------------------------------------
                                                                                Camera@4cd9be0[id=0]                         CLOSING
                                                                                Camera@294d96a[id=1]                         UNKNOWN
                                                                                -------------------------------------------------------------------
                                                                                Open count: 1 (Max allowed: 1)
2024-09-21 19:44:19.639  9295-9352  CameraStateMachine      com.mt.cameratest                    D  New public camera state CameraState{type=CLOSING, error=null} from CLOSING and null
2024-09-21 19:44:19.639  9295-9352  CameraStateMachine      com.mt.cameratest                    D  Publishing new public camera state CameraState{type=CLOSING, error=null}
2024-09-21 19:44:19.639  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Resetting Capture Session
2024-09-21 19:44:19.639  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Releasing session in state CLOSING
2024-09-21 19:44:19.639  9295-9352  CaptureSession          com.mt.cameratest                    D  onSessionFinished()
2024-09-21 19:44:19.671  9295-9314  BufferQueueProducer     com.mt.cameratest                    E  [ImageReader-640x480f22m5-9295-3](id:244f00000003,api:4,p:365,c:9295) queueBuffer: BufferQueue has been abandoned
2024-09-21 19:44:19.704  9295-9352  BufferQueueProducer     com.mt.cameratest                    E  [ImageReader-640x480f22m5-9295-3](id:244f00000003,api:4,p:365,c:9295) cancelBuffer: BufferQueue has been abandoned
2024-09-21 19:44:19.774  9295-9352  UseCaseAttachState      com.mt.cameratest                    D  Active and attached use case: [] for camera: 0
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  use count-1,  useCount=0 closed=true androidx.camera.core.SurfaceRequest$2@ee7c7da
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  Surface no longer in use[total_surfaces=3, used_surfaces=2](androidx.camera.core.SurfaceRequest$2@ee7c7da}
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  Surface terminated[total_surfaces=2, used_surfaces=2](androidx.camera.core.SurfaceRequest$2@ee7c7da}
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  use count-1,  useCount=0 closed=true androidx.camera.core.impl.ImmediateSurface@3d39594
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  Surface no longer in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@3d39594}
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  Surface terminated[total_surfaces=1, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@3d39594}
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  use count-1,  useCount=0 closed=true androidx.camera.core.impl.ImmediateSurface@d477832
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  Surface no longer in use[total_surfaces=1, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@d477832}
2024-09-21 19:44:19.774  9295-9352  DeferrableSurface       com.mt.cameratest                    D  Surface terminated[total_surfaces=0, used_surfaces=0](androidx.camera.core.impl.ImmediateSurface@d477832}
2024-09-21 19:44:19.774  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} CameraDevice.onClosed()
2024-09-21 19:44:19.774  9295-9352  Camera2CameraImpl       com.mt.cameratest                    D  {Camera@4cd9be0[id=0]} Transitioning camera internal state: CLOSING --> INITIALIZED
2024-09-21 19:44:19.775  9295-9352  CameraStateRegistry     com.mt.cameratest                    D  Recalculating open cameras:
                                                                                Camera                                       State
                                                                                -------------------------------------------------------------------
                                                                                Camera@4cd9be0[id=0]                         CLOSED
                                                                                Camera@294d96a[id=1]                         UNKNOWN
                                                                                -------------------------------------------------------------------
                                                                                Open count: 0 (Max allowed: 1)
2024-09-21 19:44:19.775  9295-9352  CameraStateMachine      com.mt.cameratest                    D  New public camera state CameraState{type=CLOSED, error=null} from CLOSED and null
2024-09-21 19:44:19.775  9295-9352  CameraStateMachine      com.mt.cameratest                    D  Publishing new public camera state CameraState{type=CLOSED, error=null}
2024-09-21 19:44:20.076  9295-9295  ActivityThread          com.mt.cameratest                    E  Activity io.flutter.embedding.android.FlutterActivity has leaked IntentReceiver io.flutter.plugins.camerax.DeviceOrientationManager$1@2348a40 that was originally registered here. Are you missing a call to unregisterReceiver()?
                                                                                android.app.IntentReceiverLeaked: Activity io.flutter.embedding.android.FlutterActivity has leaked IntentReceiver io.flutter.plugins.camerax.DeviceOrientationManager$1@2348a40 that was originally registered here. Are you missing a call to unregisterReceiver()?
                                                                                at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1594)
                                                                                at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1374)
                                                                                at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1614)
                                                                                at android.app.ContextImpl.registerReceiver(ContextImpl.java:1580)
                                                                                at android.app.ContextImpl.registerReceiver(ContextImpl.java:1568)
                                                                                at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:668)
                                                                                at io.flutter.plugins.camerax.DeviceOrientationManager.start(DeviceOrientationManager.java:73)
                                                                                at io.flutter.plugins.camerax.DeviceOrientationManagerHostApiImpl.startListeningForDeviceOrientationChange(DeviceOrientationManagerHostApiImpl.java:65)
                                                                                at io.flutter.plugins.camerax.GeneratedCameraXLibrary$DeviceOrientationManagerHostApi.lambda$setup$0(GeneratedCameraXLibrary.java:1606)
                                                                                at io.flutter.plugins.camerax.GeneratedCameraXLibrary$DeviceOrientationManagerHostApi$$ExternalSyntheticLambda0.onMessage(D8$$SyntheticClass:0)
                                                                                at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
                                                                                at android.os.Handler.handleCallback(Handler.java:938)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                at android.os.Looper.loop(Looper.java:223)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

After the crash and reusing the cached flutter engine and open the flutter app again then app access camera API.
Logs
2024-09-21 19:47:52.274  9295-9321  flutter                 com.mt.cameratest                    I  Method channel handler called with method: openCamera
2024-09-21 19:47:52.340  9295-9321  flutter                 com.mt.cameratest                    I  Getting available cameras...
2024-09-21 19:47:52.443  9295-9321  flutter                 com.mt.cameratest                    E  [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(java.lang.NullPointerException, NullPointerException, Cause: null, Stacktrace: java.lang.NullPointerException
                                                                                at java.util.Objects.requireNonNull(Objects.java:220)
                                                                                at io.flutter.plugins.camerax.ProcessCameraProviderHostApiImpl.getAvailableCameraInfos(ProcessCameraProviderHostApiImpl.java:92)
                                                                                at io.flutter.plugins.camerax.GeneratedCameraXLibrary$ProcessCameraProviderHostApi.lambda$setup$1(GeneratedCameraXLibrary.java:1157)
                                                                                at io.flutter.plugins.camerax.GeneratedCameraXLibrary$ProcessCameraProviderHostApi$$ExternalSyntheticLambda1.onMessage(D8$$SyntheticClass:0)
                                                                                at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
                                                                                at android.os.Handler.handleCallback(Handler.java:938)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                at android.os.Looper.loop(Looper.java:223)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
                                                                                , null)
                                                                                #0      ProcessCameraProviderHostApi.getAvailableCameraInfos (package:camera_android_camerax/src/camerax_library.g.dart:681:7)
                                                                                <asynchronous suspension>
                                                                                #1      ProcessCameraProviderHostApiImpl.getAvailableCameraInfosFromInstances (package:camera_android_camerax/src/process_camera_provider.dart:117:36)
                                                                                <asynchronous suspension>
                                                                                #2      AndroidCameraCameraX.availableCameras (package:camera_android_camerax/src/android_camera_camerax.dart:271:9)
                                                                                <asynchronous suspension>
                                                                                #3      _CameraExampleHomeState._getAvailableCamera (package:camera_test_module/camera_example.dart:970:18)
                                                                                <asynchronous suspension>
2024-09-21 19:47:56.114  9295-9321  flutter                 com.mt.cameratest                    E  [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(java.lang.NullPointerException, NullPointerException, Cause: null, Stacktrace: java.lang.NullPointerException
                                                                                at java.util.Objects.requireNonNull(Objects.java:220)
                                                                                at io.flutter.plugins.camerax.ProcessCameraProviderHostApiImpl.unbindAll(ProcessCameraProviderHostApiImpl.java:173)
                                                                                at io.flutter.plugins.camerax.GeneratedCameraXLibrary$ProcessCameraProviderHostApi.lambda$setup$5(GeneratedCameraXLibrary.java:1272)
                                                                                at io.flutter.plugins.camerax.GeneratedCameraXLibrary$ProcessCameraProviderHostApi$$ExternalSyntheticLambda5.onMessage(D8$$SyntheticClass:0)
                                                                                at io.flutter.plugin.common.BasicMessageChannel$IncomingMessageHandler.onMessage(BasicMessageChannel.java:261)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
                                                                                at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
                                                                                at android.os.Handler.handleCallback(Handler.java:938)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                at android.os.Looper.loop(Looper.java:223)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                                at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
                                                                                , null)
                                                                                #0      ProcessCameraProviderHostApi.unbindAll (package:camera_android_camerax/src/camerax_library.g.dart:790:7)
                                                                                <asynchronous suspension>
2024-09-21 19:47:56.158  9295-9321  flutter                 com.mt.cameratest                    E  [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'ProcessCameraProvider' is not a subtype of type 'VideoCapture?' in type cast
                                                                                #0      InstanceManager.getInstanceWithWeakReference (package:camera_android_camerax/src/instance_manager.dart:121:64)
                                                                                #1      VideoCaptureHostApiImpl.withOutputFromInstance (package:camera_android_camerax/src/video_capture.dart:85:10)
                                                                                <asynchronous suspension>
                                                                                #2      AndroidCameraCameraX.createCameraWithSettings (package:camera_android_camerax/src/android_camera_camerax.dart:386:20)
                                                                                <asynchronous suspension>
                                                                                #3      CameraController._initializeWithDescription (package:camera/src/camera_controller.dart:344:19)
                                                                                <asynchronous suspension>
                                                                                #4      _CameraExampleHomeState._initializeCameraController (package:camera_test_module/camera_example.dart:594:7)
                                                                                <asynchronous suspension>

Flutter Doctor output
Doctor output
❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.5 23F79 darwin-arm64, locale en-PH)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.93.1)
[✓] Connected device (4 available)
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated
      with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

Probably related? https://github.com/flutter/flutter/issues/151358

@josephmangmang
I cloned the repo and ran camer_test_module on S10+ device and followed steps to replicate, but didn't observe the said behavior. Please see below video:
https://github.com/user-attachments/assets/161c1c96-aab0-4e96-a234-4eb9914bfed2
First I ran flutter pub get at root followed by flutter run. Please let me know if this is correct way to replicate or not.

Hi @darshankawar , i will detailed the steps.

Clone the repo  https://github.com/josephmangmang/Camera-Test-Module
cd camera_test_module
flutter pub get
cd ../CameraTest
gradle sync and run
Main UI -> Click Open Camera withCachedEngine & select any camera front or back
Press back button
Click again Open Camera withCachedEngine & select any camera front or back
Check logcat for error

https://github.com/user-attachments/assets/57bfaf5d-6a86-4c33-9525-6cafef1413cc

Thanks for the update @josephmangmang
I tried the steps on physical device (S10+) running Android 12 but didn't get the reported error.
I see that you are running on emulator which might behave different than on a physical device. Please try the same on physical device to see if you still get same error or not.

No,  I tried physical device as well.

Please try to open and reopen camera view.
Its very easy to reproduce.

https://github.com/user-attachments/assets/6f10114d-4596-40cf-b525-611b1942f389
Please check this video, @darshankawar

Thanks for the update. Upon trying again the provided steps to replicate, I was able to replicate the reported behavior.
Stable : 3.24.3
Master : 3.26.0-1.0.pre.374

any updates?

Hi any update with this?

Hello! Having a bit different error on couple of our production devices but it seems that it's still related to this issue. Happening on SDK 3.22.1 and package ver 0.11.0+2.

StackTrace
PlatformException: PlatformException(java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 8248, callerPackage: [package name extracted], IllegalStateException, Cause: android.os.RemoteException: Remote stack trace:
 at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:15934)
 at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2201)
 at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2930)
 at android.os.Binder.execTransactInternal(Binder.java:1154)
 at android.os.Binder.execTransact(Binder.java:1123)
, Stacktrace: java.lang.IllegalStateException: Too many receivers, total of 1000, registered for pid: 8248, callerPackage: ru.tander.mobile_scout_flutter
 at android.os.Parcel.createExceptionOrNull(Parcel.java:2381)
 at android.os.Parcel.createException(Parcel.java:2357)
 at android.os.Parcel.readException(Parcel.java:2340)
 at android.os.Parcel.readException(Parcel.java:2282)
 at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5520)
 at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1626)
 at android.app.ContextImpl.registerReceiver(ContextImpl.java:1580)
 at android.app.ContextImpl.registerReceiver(ContextImpl.java:1568)
 at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:668)
 at io.flutter.plugins.camerax.i0.f(Unknown Source:16)
 at io.flutter.plugins.camerax.m0.a(Unknown Source:21)
 at io.flutter.plugins.camerax.i2.b(Unknown Source:34)
 at io.flutter.plugins.camerax.f2.a(Unknown Source:2)
 at io.flutter.plugin.common.a$b.a(Unknown Source:17)
 at u7.c.l(Unknown Source:18)
 at u7.c.m(Unknown Source:41)
 at u7.c.i(Unknown Source:0)
 at u7.b.run(Unknown Source:12)
 at android.os.Handler.handleCallback(Handler.java:938)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:223)
 at android.app.ActivityThread.main(ActivityThread.java:7977)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:603)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:948)
Caused by: android.os.RemoteException: Remote stack trace:
 at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:15934)
 at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2201)
 at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2930)
 at android.os.Binder.execTransactInternal(Binder.java:1154)
 at android.os.Binder.execTransact(Binder.java:1123)

, null)
 DeviceOrientationManagerHostApi.startListeningForDeviceOrientationChange (package:camera_android_camerax/src/camerax_library.g.dart:1062)


Remove legacy storage from 1.5

We will require moving to 1.4 in order to move to 1.5 and we can now delete all of the legacy storage

https://phabricator.mesosphere.com/D338


Show station and song in tooltip

I'm trying this out locally now. Thanks!

The play/pause button now updates when the popup is open and I hit the media key. 👍
A concern I have is that having the extension enabled seems to eat my media key even if Chrome is not focused. Is there a way to have it only listen for play/pause when Chrome has focus? Otherwise it's annoying that I can have my browser open as well as Spotify and play/pause doesn't control Spotify, but instead starts playing whatever Soma station I was previously listening to.
If Chrome doesn't have support for requiring focus before consuming the play/pause press, maybe make media key support an optional thing that the user can toggle in the options page.

I asked about that on Stack Overflow, and sadly it's impossible to make the global/local switch in options:
http://stackoverflow.com/questions/39674768/enabling-and-disabling-chrome-commands/39703922
You can disable the global attribute if you want. It will be local to Chrome then. For me it's pointless since if I have to switch to browser, I can as well click the pause button (though you can do alt+tab and use media key without touching the mouse). And as you said, the user can change or disable keyboard shortcuts anyway. It's up to you.


attempting to fix #162, fail should output to console.error

When mocha-phantomjs switches over to mocha-phantomjs-core, it will get this work.


Request failed with status code 404

Recently I faced this problem when trying to upload IPA file.
I think apple changed their API URLs ?
Request failed with status code 404

Hi. I don't believe so. Could it have been a temporary outage? Looks like they are doing some maintenance on their services at the moment.

I tested it just now and it works fine, as you said @simonnilsson its mostly maintenance. Thanks.


Add the open-graph image

This PR brings the open-graph image to the website.
Also, this PR fixes styles in the footer.

@andreySadomovskiy PTAL