[Android] Blocking exception with latest Xamarin.Forms 3.5 when leaving a page (worked on 3.4)

Description
After updating to XF 3.5, an exception occurs every time a NavigationPage having at least a Carousel (within a ContentPage) as part of its navigation stack leaves the visual tree.
Platform
Android (I've tried with API 23 and 26)
Steps to reproduce

Open a modal content page A (with a carousel) inside a navigation page
Close the modal page A

Alternative flow:

Within a top level navigation page push a content page A containing a carousel
Replace the root page with a new page or navigation page

Result
System.NotSupportedException: Unable to activate instance of type Com.ViewPagerIndicator.CirclePageIndicator from native handle 0xff91625c (key_handle 0x379aca3). ---> System.MissingMethodException: No constructor found for Com.ViewPagerIndicator.CirclePageIndicator::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
  at Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
  at java.lang.Error: Java callstack:
  at at md5cb1a4bab49bfe17ad6c0290694c1d310.CirclePageIndicator.n_onSaveInstanceState(Native Method)
  at at md5cb1a4bab49bfe17ad6c0290694c1d310.CirclePageIndicator.onSaveInstanceState(CirclePageIndicator.java:85)
  at at android.view.View.dispatchSaveInstanceState(View.java:14669)
  at at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3093)
  at at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3099)
  at at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3099)
  at at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3099)
  at at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3099)
  at at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:3099)
  at at android.view.View.saveHierarchyState(View.java:14652)
  at at android.support.v4.app.FragmentManagerImpl.saveFragmentViewState(FragmentManager.java:2859)
  at at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1500)
  at at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)
  at at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:792)
  at at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
  at at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
  at at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
  at at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2239)
  at at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:781)
  at at mono.java.lang.RunnableImplementor.n_run(Native Method)
  at at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
  at at android.os.Handler.handleCallback(Handler.java:739)
  at at android.os.Handler.dispatchMessage(Handler.java:95)
  at at android.os.Looper.loop(Looper.java:148)
  at at android.app.ActivityThread.main(ActivityThread.java:5417)
  at at java.lang.reflect.Method.invoke(Native Method)
  at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
  at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  --- End of inner exception stack trace ---
  at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00055] in <ea97b6d670fe4c1ba9dadb89b2fa0103>:0
  at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00116] in <ea97b6d670fe4c1ba9dadb89b2fa0103>:0
  --- End of inner exception stack trace ---

Sample project
I've created a sample minimal project exercising both flows. You can find it here:
https://drive.google.com/open?id=14TiTnEuucfs28E2lKd0SJAbHZ_V397uF
I'm guessing that that the save/restore override in this class is causing the problem: https://github.com/alexrainman/CirclePageIndicator/blob/master/Com.ViewPagerIndicator/CirclePageIndicator.cs
Thanks for this great component!

The same but he respond on this sub-project (https://github.com/alexrainman/CirclePageIndicator/issues/1)
He will release soon a update i think

In case you are like me and you couldn't wait, you can use this instead: https://github.com/AndreiMisiukevich/CardView
I think it has some benefits.  It doesn't use an Android specific implementation for the carouselview, it achieves it with built in xamarin layouts.  So I think it would be more resilient to change.  I just downloaded it and changed my nuget packages over and everything came to life.
Plus you get a choice of more visual flair (card view or carousel view for instance).  I like it.

This issue is not for making Ads for CardView. Stop using each issue for publicity.
The two plugin make the same thing yes but it's not use the same way.

Relax @quentinR0bert , nobody is making "ads for cardview".  I just thought some people, like myself, would like to move to XF 3.5 and need to find functional dependencies.  I have no association with CardView, I'm just trying to make my stuff work with XF 3.5, thats all.  Its a workaround for the issue at hand, so its a valid comment on an issue like this.

Guys, i am very close to release a new version and it will be compatible with XF 3.5 and with lot of new functionality.

Because I'm impatient I did a little digging and made a fix for this in a branch in my fork.
https://github.com/NiknakSi/CarouselView/commit/ecbc4c5f7e99183ed2c394aee6dcaaa1815f7f4f
Basically I just brought the CirclePageIndicator code into the CarouselView solution temporarily and added the missing ctor overload. If you're desperate for a fix then I think this does the trick - I've been testing with XF <IP_ADDRESS>452 and haven't had a crash yet.

I've got the same issue, I hope your patch will be released soon :)
Thanks again for your work !

I am almost ready for a new release but have been traveling. Will keep you guys posted.

@alexrainman any idea when we can expect the update?  I know your busy, even if its a few weeks so I know how to plan.  Thank you

I think by end of week.

@alexrainman The update has contemplated this issue?
"Unhandled Exception:
Java.Lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. occurred"
I have a gallery like Facebook, I just open a pic (create the carousel), 2 o 3 swaps later thow this error, if you need the source code just tell me.
(Working with Xam < 3.5 and VS2019)

Any news on a release? As you said it was coming soon I postponed my client's release but we've reached the end of the the week without any news.
Any idea of a release date please?

Also waiting for this, so would be curious to hear about a release @alexrainman :)

Also waiting for this, so would be curious to hear about a release @alexrainman :)

Me too! :)

@alexrainman , when we can expect the hotfix, please?

@alexrainman  Please provide the fix asap. My app is heavily rely on the carousel view. At the moment is working fine for iOS but not Android. Please.
This is the error I got under Xamarin.Forms <IP_ADDRESS>047:
System.NotSupportedException:
"Unable to activate instance of type Com.ViewPagerIndicator.CirclePageIndicator from native handle 0x7fefec6694 (key_handle 0x3375ed5)."

Sorry guys, i have been sick. Will come back to the project later today and i expect to release by end of week.

Hi guys...
I've tryed update the CirclePageIndicator nuget version to 1.0.3 version from nuget and seens that, after make some tests, the problem doesn't occour.
There are somebody that could apply this procedure to see if works for you too?

I just added the Xamarin.Android.CirclePageIndicator (Com.ViewPagerIndicator CirclePageIndicator for Xamarin.Android.). version 1.0.3.
It has fixed my problem.  It is working now. Thanks.

I updated CirclePageIndicator nuget as part of my fix. Glad it fixed yours too.

Thanks @TohWei , I've done the same as you and it also fix the bug.
Thanks all

When I upgrade Xamarin.Android.CirclePageIndicator to 1.0.3 I get the following Build Error:
Can not resolve reference: Xamarin.Android.Support.ViewPager, referenced by Com.ViewPagerIndicator. Please add a NuGet package or assembly reference for Xamarin.Android.Support.ViewPager, or remove the reference to Com.ViewPagerIndicator.
I never had Xamarin.Android.Support.ViewPager installed before. So I tried adding it to my Android project but I still get the same error. What am I doing wrong?

When I upgrade Xamarin.Android.CirclePageIndicator to 1.0.3 I get the following Build Error:
Can not resolve reference: Xamarin.Android.Support.ViewPager, referenced by Com.ViewPagerIndicator. Please add a NuGet package or assembly reference for Xamarin.Android.Support.ViewPager, or remove the reference to Com.ViewPagerIndicator.
I never had Xamarin.Android.Support.ViewPager installed before. So I tried adding it to my Android project but I still get the same error. What am I doing wrong?

Whats is your Xamarin.Android.Support.XXX dependencies version?
All of that files in my project are based on <IP_ADDRESS>.
See if an update solve your problem.

Look at CirclePageIndicator dependencies needs a Xamarin.Android.Support.v4 at >= <IP_ADDRESS>.

@NelsonSantos
Are you find any solution on the same as i am also getting the same error after installing Xamarin.Android.CirclePageIndicator.

@vjsystematix Did you have tryed update Xamarin Support files to the version <IP_ADDRESS>?
Here for me nothing occours. Works like a charm!

Yes, I have updated all the files still facing the same issue. Please suggest

Yeah installing Xamarin.Android.CirclePageIndicator 1.0.3 automatically installed those dependencies of Xamarin Android Support version <IP_ADDRESS>
It did not automatically install  Xamarin.Android.Support.ViewPager, so where is that dependency coming from?

I am using .Net standard and both these packages (CirclePageIndicator and Xamarin.Android.Support.v4 ) are not compatible with  netstandard2.0

Can not resolve reference: Xamarin.Android.Support.ViewPager, referenced by Com.ViewPagerIndicator. Please add a NuGet package or assembly reference for Xamarin.Android.Support.ViewPager, or remove the reference to Com.ViewPagerIndicator.	CaptureForNurseries.Android
I am getting this error now even after installing Xamarin.Android.Support.ViewPager
Waiting for your release.

@vjsystematix @kerrpeter
When I updated Xamarin.Forms to version 3.5 I'm already update all of Xamarin Android Support files to version <IP_ADDRESS>, was when I run the project and noticed the problem of this thread.
So I've searched for solutions untill this of the update of nuget CirclePageIndicator that worked.
I think that this is the fact I belive it worked on my project. I have made this update of all Xamarin Support files before the update of nuget CirclePageIndicator.
Some times, I need to clean and do a delete of bin/obj folders of Android project to work. This has become a habit of mine!

I got it working by changing my Target Framework to be Android 9.0 and re-installing the support packages using the following in Package manager:
Update-Package Xamarin.Android.Support.v4 -Reinstall
I also resinstalled the Xamarin.Android.Support.v7 packages I had installed. I ended up with some additional packages in project that were not there before, so maybe this was the probelm.
Hope it helps someone else.

@kerrpeter - Hi i did same process that you mention but still i getting the same error

I updated CirclePageIndicator nuget as part of my fix. Glad it fixed yours too.

My issue haven't resolved after update this package . i am still getting below error.
Can not resolve reference: Xamarin.Android.Support.ViewPager, referenced by Com.ViewPagerIndicator. Please add a NuGet package or assembly reference for Xamarin.Android.Support.ViewPager, or remove the reference to Com.ViewPagerIndicator

Hi @alexrainman , Do we have any final solution for this issue, kindly we need your help?

@so3da add the CirclePageIndicator Nuget package version 1.0.3
it will fix the problem

Downgraded to XF 3.4 and everything is ok

@alexrainman Update on this?

@alexrainman
Any Updates on this?

any pre-release ?

@so3da Fixed my issue as well: add the CirclePageIndicator Nuget package version 1.0.3

@aimore that does seem to resolve the issue not crashing when navigating away but navigating back the carousel doesn't have any content anymore.

@alexrainman also like to know when we can at least expect / hope to have something on this?

@alexrainman  This issue still not fixed. This is blocking. I am not able to update Xamarin.Forms version because of this.
And if I add Xamarin.Android.Support.ViewPager then get below error.
Error XA2002: Can not resolve reference: Xamarin.Android.Support.ViewPager, referenced by Com.ViewPagerIndicator. Please add a NuGet package or assembly reference for Xamarin.Android.Support.ViewPager, or remove the reference to Com.ViewPagerIndicator.

Hi @alexrainman is there any chance this will be fixed soon?

@rysbilinski , @PWaliaDev
Better to try this https://github.com/AndreiMisiukevich/CardView

@rysbilinski , @PWaliaDev
Better to try this https://github.com/AndreiMisiukevich/CardView

Thanks @nrb1238 I did this earlier today and working, but was just hoping to not have to make the change

@nrb1238, thanks for suggesting, actually this package does not have Scrolling event so thats why i can't go fo that.

@rysbilinski  @PWaliaDev @nrb1238 hang in there. There appears to be a proposal on xamarin forms team for carousel integrated in XF https://github.com/xamarin/Xamarin.Forms/issues/4996 watch that space

I did suggest a temporary fix for this back in February, it solved the issue for me:
https://github.com/alexrainman/CarouselView/issues/489#issuecomment-465651202
All you need to do is clone the repo, compile, and use that instead of the Nuget.

@NiknakSi cloned your repo, complie:
throwing this when navigating away from the page with carousel:
System.NotSupportedException: Unable to activate instance of type Com.ViewPagerIndicator.CirclePageIndicator from native handle 0xbef9041c (key_handle 0x3d40df99).

@LeoJHarris That's odd - did you remove any existing references for CirclePageIndicator and CarouselView from your projects? Do you have a sample project you could share?

@NiknakSi I simply used your cloned repo https://github.com/NiknakSi/CarouselView/tree/niknaksi/CirclePageIndicator-temporaryfix
But for now I have rolled back on Xamarin.Forms as well as this library and everything is working so will stick to that for now.
But here's hoping a new release will be made on here soon. @alexrainman we would really appreciate some update on whether v6.0 be released soon or not?

@NiknakSi the answer is yes. I am into CarouselView development and i expect to release new version in couple of weeks.

@alexrainman Great! We will continue to look forward to release 6.0.  👍

@alexrainman After Updating XF<IP_ADDRESS>5677 and Changed the Target Framework ( Android 8.1 ), Still i am facing the same issue and getting exception like Unable to activate instance of type Com.ViewPagerIndicator.CirclePageIndicator from native handle 0x7fe4ce06c4 . Can you please provide us the solution.

I had this same error and I was able to fix it installing the other package of alexrainman Xamarin.Android.CirclePageIndicator 1.0.3 and then it started to work.
I am using XF<IP_ADDRESS>5677 with Target Framework Android 9

I am back! Releasing new version in the next 2 weeks. This issue will be corrected.

My issue is solved now. I Changed the Target Framework ( Android 9.0 ) and updated the Xamarin.Android.CirclePageIndicator to 1.0.3. Thanks to @BryanSan. And thanks to @alexrainman  for new release.

I updated CirclePageIndicator to 1.0.3,
Even if I install ViewPager I got the:
Can not resolve reference: Xamarin.Android.Support.ViewPager, referenced by Com.ViewPagerIndicator.

@BryanSan Do you have a workaround until two weeks?

@Phenek Try without ViewPager installed. I don't have it installed. Also, make sure you are targeting Android 9.0 and using the last Xamarin.Forms that is how I made it work

No that didn't work
I Still got "Can not resolve reference: Xamarin.Android.Support.ViewPager"

It works for me,
I updated All Project to Xamarin Forms 4.0
In Android, add Xamarin.Android.CirclePageIndicator 1.0.3 , used Android 9.0, in Android Build checked Enable Multi-Dex. Then delete all bin and obj folders, open Solution again and it works like a charm hehe

@tunbeo what version this plugin you use? latest 5.0.1 or 5.0.2?

@tunbeo Followed as you mentioned but on returning to the page with the Carousel it didnt show any content inside it.

Releasing new version in the next 2 weeks

@alexrainman Just a gentle reminder that we are still waiting on new release 6.0 and we need a resolution to this issue as soon as possible.

@alexrainman This issue should be open, it has never been fixed.
If you create a branch with your 6.0 Preview, we could help.
because without we just see a repository never updated since 2 years.
#525 #508 #518

@alexrainman Should this issue be closed?
There hasn't been a new release and none of the solutions suggested in the above comments have resolved this issue for me.

@picko94 you right!
the code isn't been updated since two years.
No PR accepted, no active working branch.
@alexrainman do some communication some time but we don't understand what is really happening to him. Never mind, I hope he's fine.
Xamarin Team will release Xam 4.3 in the next sprint with a Carousel implementation with bugs for sure...

Try https://github.com/AndreiMisiukevich/CardView it has carouselview and good support by author. We switched and very happy with it.

This package not working was one of the reasons I switched to flutter. They do it natively in their framework.
Video here:
https://youtu.be/J1gE9xvph-A
I'm thinking about writing some articles on medium on how I switched from xamarin to flutter. Stuff like this is just a piece of cake now. If anyone would be interested in articles like that let me know and I will write some 😀

It has taken me more than expected to correct all the issues and add all the new functionality i wanted to add but the carousel is alive and will be out soon.
@Phenek i am just fine 😁


Update AWS SDK for JS to v3

upgraded in https://github.com/wasp-lang/open-saas/commit/6dc05b33c1b13d28727bf92f4deeba0ec8e6a1d6


expose timers as sensors

NOTE: For a feature to be created it has to be doable in the Amazon app because we are basically replicating the app for HA. If you can't find it in the app, we probably can't create it here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Provide sensors for timers so you can display a countdown display in Lovelace and OpenHasp devices that require sensors for data.
Describe the solution you'd like
A clear and concise description of what you want to happen.
each time a new timer is created, list its attributes:

name
time set for
time remaining

Describe alternatives you've considered
there are no alternative solutions
A clear and concise description of any alternative solutions or features you've considered.
This gal created a .js lovelace resource and made it work, but ONLY in Lovelace.
(https://community.home-assistant.io/t/show-all-active-alexa-timers/408416/17)
this works, but does not create sensors that can be used in other devices or automations
Additional context
Add any other context or screenshots about the feature request here.

You can create template sensors as these are available via attributes. I think there have been some discussions on the exact templates you need to use on the forum or in the discussions. If you find them, please post here.

If they were available as attributes, I wouldn't be asking for a feature request.  They are not.
and nobody has figured out how to create sensors for them.  This is such a basic function...
setting timers is the single biggest use on the Alexa platform after playing music.

@jazzmonger This is how I configured my timer sensors - maybe that helps.
The output is the end time of the timer. You could change the template to calculate the relative time, but I wouldn't suggest that since that template then needs to be recalculated every second and spams the database.
template:
  - sensor:
    - name: "Arbeitszimmer Timer 1"
      icon: mdi:timer-outline
      state: >
        {% if state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") != None %}
          {% set sorted_active = state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") | from_json %}
          {% if sorted_active[0] in sorted_active %}
            {{ sorted_active[0][1].triggerTime }}
          {% else %}unavailable{% endif %}
        {% else %}unavailable{% endif %}
      attributes:
        label: >
          {% if state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") != None %}
            {% set sorted_active = state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") | from_json %}
            {% if sorted_active[0] in sorted_active %}
              {{ sorted_active[0][1].timerLabel }}
            {% else %}unavailable{% endif %}
          {% else %}unavailable{% endif %}

    - name: "Arbeitszimmer Timer 2"
      icon: mdi:timer-outline
      state: >
        {% if state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") != None %}
          {% set sorted_active = state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") | from_json %}
          {% if sorted_active[1] in sorted_active %}
            {{ sorted_active[1][1].triggerTime }}
          {% else %}unavailable{% endif %}
        {% else %}unavailable{% endif %}
      attributes:
        label: >
          {% if state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") != None %}
            {% set sorted_active = state_attr("sensor.alexa_arbeitszimmer_next_timer", "sorted_active") | from_json %}
            {% if sorted_active[1] in sorted_active %}
              {{ sorted_active[1][1].timerLabel }}
            {% else %}unavailable{% endif %}
          {% else %}unavailable{% endif %}

Fascinating.  ok, so modifying my timer code gives me
        {% if state_attr("sensor.kitchen_original_next_timer", "sorted_active") != None %}
          {% set sorted_active = state_attr("sensor.kitchen_original_next_timer", "sorted_active") | from_json %}
          {% if sorted_active[0] in sorted_active %}
            {{ sorted_active[0][1].triggerTime }}
          {% else %}unavailable{% endif %}
        {% else %}unavailable{% endif %}

          {% if state_attr("sensor.kitchen_original_next_timer", "sorted_active") != None %}
            {% set sorted_active = state_attr("sensor.kitchen_original_next_timer", "sorted_active") | from_json %}
            {% if sorted_active[0] in sorted_active %}
              {{ sorted_active[0][1].timerLabel }}
            {% else %}unavailable{% endif %}
          {% else %}unavailable{% endif %}

And the output  from a 20 minute timer I set is
Result type: string
1686769139555
  None

you stated that "the output is the end time of the timer".  Do I need to convert the number string to something?

The result is a timestamp (with milliseconds) which you can convert if you replace this:
{{ sorted_active[0][1].triggerTime }}
with that:
{{ (sorted_active[0][1].triggerTime|int / 1000) | as_datetime }}
Or you can subtract the current timestamp (as_timestamp(now())), get the time difference in seconds and convert that to hours:minutes:seconds.
The timerLabel is only available if you give the timer a name via Alexa (that's why you got "none" there).

This is THE MOST helpful information I’ve seen on this function, ever!!

If this is helpful, please consider adding it to the wiki for others. The issue will quickly be submerged.

If this is helpful, please consider adding it to the wiki for others. The issue will quickly be submerged.

Wiki?  How?

Where are you defining the template: sensor?
I tried putting ia basic one in sensors.yaml where all my other template sensors are, but get errors
  - platform: template
    sensors:
      alexa_timer1:
        friendly_name: "Alexa Timer 1"
        state: >
          {% if state_attr("sensor.kitchen_original_next_timer", "sorted_active") != None %}
            {% set sorted_active = state_attr("sensor.kitchen_original_next_timer", "sorted_active") | from_json %}
            {% if sorted_active[0] in sorted_active %}
              {{ (sorted_active[0][1].triggerTime|int /1000 -  (as_timestamp(now()))) | timestamp_custom('%H:%M:%S', false)}}
            {% else %}unavailable{% endif %}
          {% else %}unavailable{% endif %}

Invalid config for [sensor.template]: [state] is an invalid option for [sensor.template].

Wiki updated
https://github.com/custom-components/alexa_media_player/wiki/Home/_edit#alexa-timers

its interesting that you can only create 2 Timer Sensors.  You can set 3 timers and see the 3rd in the template viewer, but defining it in sensors_template.yaml has no effect.
  - name: "Alexa Timer 3"
    icon: mdi:timer-outline
    state: >
        {% if state_attr("sensor.kitchen_original_next_timer", "sorted_active") != None %}
          {% set sorted_active = state_attr("sensor.kitchen_original_next_timer", "sorted_active") | from_json %}
          {% if sorted_active[2] in sorted_active %}
            {{ (sorted_active[2][1].triggerTime|int /1000 -  (as_timestamp(now()))) | timestamp_custom('%H:%M:%S', false)}}
          {% else %}unavailable{% endif %}
        {% else %}unavailable{% endif %}

well, the wiki "was" updated.  my edits are now missing...

@jazzmonger It got moved to "Examples": https://github.com/custom-components/alexa_media_player/wiki/Examples%3A-Sensors#alexa-timers


WIP: swappy: Init at 2020-02-26

WIP because waiting for

https://github.com/jtheoof/swappy/issues/10
https://github.com/jtheoof/swappy/issues/11

Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

The latest build from master should compile better. Let me know if you're still having issues. Any help is appreciated too, I don't have NixOS installed.

1.0.0 is out. https://github.com/jtheoof/swappy/releases
@matthiasbeyer don't hesitate to say if you don't have the time for this PR anymore. One of us could pick it up.

No, I'm fine. I pushed an update to 1.0.0, but it still fails to compile because of gio and I'm failing to find a fix.

Can't really help you, I don't have nixOS installed. On Arch, gio.h is part of glib2.

There was a recent patch in swappy: https://github.com/jtheoof/swappy/pull/42 that changes slightly how gio is found during meson configuration. It might help you a little.

https://github.com/jtheoof/swappy/commit/606ce38914f3735ca0aad0fc982030130ff95d65 has the same problem.

@matthiasbeyer friendly ping

Not sure what I should do here.

try adding:
  mesonFlags = [
    # TODO: https://github.com/NixOS/nixpkgs/issues/36468
    "-Dc_args=-I${glib.dev}/include/gio-unix-2.0"
  ];

You can check the URL for more info.

Fixed thanks to @bbigras and #36468 and also updated to release 1.2.0.

it seems gio-sharp can be removed too.
I was able to build using:
  nativeBuildInputs = [ glib meson ninja pkgconfig cmake scdoc ];
  buildInputs = [ cairo pango gtk libnotify wayland glib ];
  strictDeps = true;

Not sure why I need glib in both places.

@matthiasbeyer friendly ping

With your suggested change:
[16/18] Compiling C object<EMAIL_ADDRESS>FAILED<EMAIL_ADDRESS>/nix/store/1kn7fi3hhi33jms3113riyzwyn2yqpqd-gcc-wrapper-9.2.0/bin/cc -Iswappy@exe -I. -I.. -I../include -Ires -I/nix/store/a92yhf0icjl9lh553s4qjchdsm8lyzsy-cairo-1.16.0-dev/include/cairo -I/nix/store/1zlkr4x0bvxw3mn65chw9v3b48n8jh52-freetype-2.10.1-dev/include/freetype2 -I/nix/store/1zlkr4x0bvxw3mn65chw9v3b48n8jh52-freetype-2.10.1-dev/include -I/nix/store/5ad0cyv6lxpkk2m1prcrasdp2pysz73q-glib-2.62.4-dev/include -I/nix/store/5ad0cyv6lxpkk2m1prcrasdp2pysz73q-glib-2.62.4-dev/include/glib-2.0 -I/nix/store/vwvjrh97byihk40gwl26f0lnb3w405cv-glib-2.62.4/lib/glib-2.0/include -I/nix/store/sm843466f7cvhf1b804jjlay1nv7fyq0-pango-1.44.7-dev/include/pango-1.0 -I/nix/store/70yjv9sr9mhf75bliwmmxgyr37mx9lac-harfbuzz-2.6.4-dev/include/harfbuzz -I/nix/store/i5yw4gdhknqahzhkaqjfbgc9ydb2885w-gtk+3-3.24.13-dev/include/gtk-3.0 -I/nix/store/vmm5hrcbqrb7b605dnir17qbiz85x17n-atk-2.34.1-dev/include/atk-1.0 -I/nix/store/4w16ai3cx8sp7av9kc432w34r4fpdmfp-gdk-pixbuf-2.40.0-dev/include/gdk-pixbuf-2.0 -I/nix/store/i1mssjnbih9czf12fcda1883pvkirgss-libnotify-0.7.8-dev/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c11 -Wno-unused-parameter -DHAVE_LIBNOTIFY -MD -MQ<EMAIL_ADDRESS>-MF<EMAIL_ADDRESS>-o<EMAIL_ADDRESS>-c ../src/pixbuf.c
../src/pixbuf.c:4:10: fatal error: gio/gunixoutputstream.h: No such file or directory
    4 | #include <gio/gunixoutputstream.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[17/18] Compiling C object<EMAIL_ADDRESS>ninja: build stopped: subcommand failed.
builder for '/nix/store/v3frm48zb0pp5j2r74g1sh0h5s1maacg-swappy-1.0.0.drv' failed with exit code 1
error: build of '/nix/store/v3frm48zb0pp5j2r74g1sh0h5s1maacg-swappy-1.0.0.drv' faile

@GrahamcOfBorg build swappy

Reviewed points

[x] package path fits guidelines
[x] package name fits guidelines
[x] package version fits guidelines
[x] package build on x86_64
[x] executables tested on x86_64
[x] meta.description is set and fits guidelines
[x] meta.license fits upstream license
[x] meta.platforms is set
[x] meta.maintainers is set
[x] build time only dependencies are declared in nativeBuildInputs
[x] source is fetched using the appropriate function
[x] phases are respected
[x] patches that are remotely available are fetched with fetchpatch

Possible improvements
Comments
Other reviewers might want to double check nativeBuildInputs as i'm not an expert on that.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/230

Just noticed v1.2.1 was cut 14 days ago.
https://github.com/jtheoof/swappy/tree/v1.2.1
Not meaning to block anything.

@matthiasbeyer friendly ping

since this is the first time it's been packaged, I think it should be a single commit. I don't see much value in having 5 commits.

@matthiasbeyer friendly ping. Can we get this in the release please?

Sure, what's missing from your point of view?

I already approved but maybe Jon's meta suggestion and squash the commits and it will be good to go.

@jonringer can you merge this please?

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/219

Friendly ping @jonringer since two weeks have passed since the last one.
I'm looking forward to using this new tool in my workflow.
It would also be great if this package was backported to the 20.09 release (unless the window is closed?).

@marsam help merge this please. Jon must be pretty busy these days.

Thank you very much :smile:


ci: move to macos13

macos12 CI is gone

MacOS tests are not more broken than before, so let's merge this. I am working on fixes for these.


Update model classes for new components

Codecov Report

Merging #47 (a757ef5) into master (dc29c1e) will decrease coverage by 15.89%.
The diff coverage is 29.21%.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0737349...a757ef5. Read the comment docs.


cloud-init is broken with 3.0.1-rc3

First, huge thanks for this provider!
I have been trying to get a cloud-init config pieced together from multiple issues in this repo the last couple of days. Unfortunately either I'm just not finding the right documentation that points the state of rc3 specifically for cloud-init on an ubuntu2404 image OR it is currently broken.
Copying the example from here - https://github.com/Telmate/terraform-provider-proxmox/blob/master/examples/cloudinit_example.tf - (with the basic variables changed to fit my setup) results in:
proxmox_vm_qemu.cloudinit-test: Still creating... [10s elapsed]
╷
│ Error: error updating VM: 500 Internal Server Error, error status: {"data":null} (params: map[agent:1 bios:seabios boot:order=virtio0 cores:2 cpu:host delete:ide2,scsi0 description:A test for using terraform and cloudinit hotplug:network,disk,usb ide3:local:cloudinit,format=raw kvm:true memory:2048 name:terraform-test-vm net0:virtio=7A:C7:F3:C1:72:4B,bridge=vmbr0 numa:false onboot:false protection:false scsihw:lsi sockets:1 sshkeys:%20%20%20%20ssh-rsa%209182739187293817293817293871%3D%3D%20user%40pc%0A%0A tablet:true virtio0:local:32,cache=writeback,discard=on,format=raw,iothread=1,replicate=0 vmid:103])
│
│   with proxmox_vm_qemu.cloudinit-test,
│   on providers.tf line 87, in resource "proxmox_vm_qemu" "cloudinit-test":
│   87: resource "proxmox_vm_qemu" "cloudinit-test" {
│

There are numerous interpretations on the state of using the ISO injection method vs not. I'd be super grateful for a little guidance on how to inject a standard cloud-init file into a VM with rc3. I'm looking to deploy an existing mature cloud-init file in a similar format to what Tailscale show here - https://tailscale.com/kb/1293/cloud-init.
Any help much appreciated. Any other logs I can get you too, just ask. Thanks!

@ironicbadger ,
could you please share your Terraform files?


flesh out example Bookstore API integration in resource manager

This patch adds a simplistic implementation of the
AWSResourceManager.ReadOne() interface method for the Bookstore API
example book resource manager. We follow a similar strategy to the
AppMesh v1beta2 implementation, farming out most real work to a
findSDKBook() method that communicates with the AWS service API via the
aws-sdk-go.
The AWSResourceManager interface's methods are updated to pass a
context.Context struct. This allows us to standardize on the
XXXWithContext() functions of the aws-sdk-go and pass on a backgrounded
context into those SDK functions.
Besides the above findSDKBook() code, the remainder of this patch is
simply a move of the services/example/pkg/sdk package into
services/example/sdk. This directory/package does NOT appear in the real
service controllers since the import will be the
aws-sdk-go/services/$SERVICE package.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Reviewers: please see https://github.com/aws/aws-app-mesh-controller-for-k8s/blob/1e1984b500cee9b65a4429e518db7b25bd39e27a/pkg/mesh/resource_manager.go#L83-L96 for the inspiration for this patch's contents.


tests

Please split the work into dedicated tasks which can be merged separately:

ecomet_fields tests
ecomet_query tests
ecomet_resultset tests


jax tutorial 4 (init/opt): fails to init model on GPU

Tutorial: -1 (Fill-in number of tutorial)
https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/JAX/tutorial4/Optimization_and_Initialization.html#Constant-initialization
Describe the bug
A clear and concise description of what the bug is.
This line fails
model, params = init_simple_model(get_const_init_func(c=0.005))

producing
--------------------------------------------------------------------------
XlaRuntimeError                           Traceback (most recent call last)
[<ipython-input-14-eb8cfd8e667a>](https://localhost:8080/#) in <module>
      7
      8 #model, params = init_simple_model(get_const_init_func(c=0.005))
----> 9 model, params = init_simple_model(nn.linear.default_kernel_init)
     10 visualize_gradients(model, params)
     11 visualize_activations(model, params, print_variance=True)

24 frames
[<ipython-input-10-072d6886ae7a>](https://localhost:8080/#) in init_simple_model(kernel_init, act_fn)
      2     model = BaseNetwork(act_fn=act_fn,
      3                         kernel_init=kernel_init)
----> 4     params = model.init(random.PRNGKey(42), exmp_imgs)
      5     return model, params

[/usr/local/lib/python3.9/dist-packages/jax/_src/random.py](https://localhost:8080/#) in PRNGKey(seed)
    134     raise TypeError("PRNGKey accepts a scalar seed, but was given an array of"
    135                     f"shape {np.shape(seed)} != (). Use jax.vmap for batching")
--> 136   key = prng.seed_with_impl(impl, seed)
    137   return _return_prng_keys(True, key)

...

[/usr/local/lib/python3.9/dist-packages/jax/_src/dispatch.py](https://localhost:8080/#) in backend_compile(backend, built_c, options, host_callbacks)
   1034   # TODO(sharadmv): remove this fallback when all backends allow `compile`
   1035   # to take in `host_callbacks`
-> 1036   return backend.compile(built_c, compile_options=options)
   1037
   1038 _ir_dump_counter = itertools.count()

XlaRuntimeError: INTERNAL: RET_CHECK failure (external/org_tensorflow/tensorflow/compiler/xla/service/gpu/gpu_compiler.cc:641) dnn != nullptr

The problem also would occur in https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/JAX/tutorial3/Activation_Functions.html
if the training was actually triggered, since it is the same model and data.
To Reproduce (if any steps necessary)
To try to isolate the problem, I created this minimal colab.
This just tries to initialize the network using a batch of MNIST images.
It works on CPU but not GPU.

The problem is triggered merely by using key = jax.random.PRNGKey(0). I think it's because you mix in pytorch randomness in the dataloader....

So I verified that if you access the jax RNG before the pytorch RNG, it works.
eg try running this before the dataloader is created

act_fn = lambda x: x #act_fn_by_name['identity']
model = BaseNetwork(act_fn=act_fn)
key = jax.random.PRNGKey(0)
X = jax.random.normal(key, (1000, 28, 28))
params = model.init(random.PRNGKey(42), X) # not image data

If I put this at the top of the colab then tutorial 4 works
key = jax.random.PRNGKey(0)
x = jax.random.normal(key, (10,10)) # force jax PRNG to run on GPU before pytorch grabs it

Hi, thanks for raising the issue, I have not seen that behavior before. I have fixed it for the tutorials in efbc9de8a08857f1d074d1063c8c3c861475eea4, but I think it would be great if you can raise this issue to the JAX community as well, since it seems to be a general problem when wanting to use PyTorch's data loading functionality in JAX.

I created https://github.com/google/jax/issues/15084.


Add in chunking to videos

Might not be the right term for it, but I like to watch past vods for streams and this tool is great, but I like to split them up into 1 hour sections so that I can watch a single video on train to and from work.
At the moment the time settings when downloading a video is great, but would love to be able to simply set it to download an entire vod and say cut it into x minute segments and it will pop out 'Filename_{part}.mp4' for instance.
Just a suggestion that maybe some others might also find handy, regardless of if this is something you decide to add on, thanks for making a great tool :)
On a side note, is there a reason why I cannot queue up the same video? I'd like to if the above isn't added, be able to queue up all the parts myself using the existing time settings but it doesn't allow me to add the same video to the queue more than once.
Thanks

I think splitting the download into chunks of a specified length is not a use case that is very common. But you should be able to queue multiple downloads of the same video. This is new, because it made no sense when cropping was not available (why should i download the same video twice when there is no time selection...).
So I added the capability to queue multiple downloads now. The temporary folder now gets a GUID instead of the Twitch video ID.

Fixed!


The getter 'adaptiveState' was called on null.

Hey, guys.
I got this error loading the plugin into my code.

The following NoSuchMethodError was thrown building AdaptiveApp(dirty):
The getter 'adaptiveState' was called on null.
Receiver: null
Tried calling: adaptiveState

Here's my function in the app.dart file
class App extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    var appl = new AppLanguage();
    appl.fetchLocale();
    return ChangeNotifierProvider<AppLanguage>(
        create: (_) => appl,
        child: Consumer<AppLanguage>(builder: (context, model, child) {
          return AdaptiveInheritance(
            adaptiveState: AdaptiveInheritance.getStateByPlatform(), // ,
            child: AdaptiveApp(
              localizationsDelegates: [
                AppLocalizations.delegate,
                GlobalMaterialLocalizations.delegate,
                GlobalWidgetsLocalizations.delegate,
              ],
              supportedLocales: Langue.localsList,
              materialTheme: ThemeData(
                primaryColor: UIData.ColorsPrimary
              ),
              cupertinoTheme: CupertinoThemeData(
                primaryColor: UIData.ColorsPrimary
              ),
              home: LoginPage(),
              title: UIData.appName,
              debugShowCheckedModeBanner: false,
              initialRoute: Routes.Splash,
              onGenerateRoute: RouteGenerator.generateRoute,
            )
          );

        })
    );

  }
}

Thanks @sylvere36 . We are aware of that problem and are aleady fixing it

This problem should be fixed now. Thanks for your patience!


Feat/new segment callback

Depends on https://github.com/tazz4843/whisper-rs/pull/142
Add new segment safe callback.
Used for getting segments in realtime.
Improved version of whisper-rs/pull/97
And I already use it in the project Vibe

Seems like GitHub isn't showing the proper reference and thus the diff is full of unrelated changes, you should update this PR to the latest from this repo.

Updated and tested


to_float not implemented for float

Please implement  "to_float" for float.
Ideally, implement "to_int" also for "int", and "to_decimal" for "decimal".
(cf. [https://rhai.rs/book/ref/convert.html?highlight=to_float#convert-between-integer-and-floating-point])
This was discussed on discord "#general", 20. February, 2024.

Yes, these will all be added in the next release.  Do you need it urgently?

No, I do not need it urgently.
That was just meant as a friendly reminder/documentation (which I can link to).
Thank you for the quick feedback.

You can try out the latest drop which has it.

Ok, thank you.
Works.


[native_assets] There's two errors thrown by Xcode 15.3 when submitting Flutter apps built with native_assets to the App Store.

There's two errors thrown by Xcode 15.3 when submitting Flutter apps built with native_assets to the App Store.
First is:
 This bundle is invalid. The bundle at path Payload/Runner.app/Frameworks/sherpa_onnx_dart.framework has an invalid CFBundleIdentifier 'io.flutter.flutter.native_assets.sherpa_onnx_dart' There are invalid characters(characters that are not dots, hyphen and alphanumerics) that have been replaced with their code point 'io.flutter.flutter.native\\u005fassets.sherpa\\u005fonnx\\u005fdart' CFBundleIdentifier must be present, must contain only alphanumerics, dots, hyphens and must not end with a dot.

Per the Apple reference, underscores can't be used in CFBundleIdentifier, so perhaps we could replace hyphens with underscores here, e.g.
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.native-assets.${name.replaceAll("_", "-")}</string>

The second issue is similar, the generated Info.plist does not contain an entry for MinimumOSVersion, so trying to publish via XCode will throw the following error:
Asset validation failed. Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle Runner.app/Frameworks/sherpa-onnx-dart.framework is required.

Workaround is to add the following to native_assets_host.dart
  <key>MinimumOSVersion</key>
  <string>13.0</string>

I haven't submitted a PR because I suspect there's a broader fix to the native_assets framework build process to consume some user-specified configuration (e.g. this may be contemplated by this issue here.
Originally posted by @nmfisher in https://github.com/flutter/flutter/issues/129757#issuecomment-2102290794

Thanks for the report @nmfisher!

There's two errors thrown by Xcode 15.3 when submitting Flutter apps built with native_assets to the App Store.
First is:
 This bundle is invalid. The bundle at path Payload/Runner.app/Frameworks/sherpa_onnx_dart.framework has an invalid CFBundleIdentifier 'io.flutter.flutter.native_assets.sherpa_onnx_dart' There are invalid characters(characters that are not dots, hyphen and alphanumerics) that have been replaced with their code point 'io.flutter.flutter.native\\u005fassets.sherpa\\u005fonnx\\u005fdart' CFBundleIdentifier must be present, must contain only alphanumerics, dots, hyphens and must not end with a dot.

Per the Apple reference, underscores can't be used in CFBundleIdentifier, so perhaps we could replace hyphens with underscores here, e.g.
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.native-assets.${name.replaceAll("_", "-")}</string>

I am not sure if the CFBundleIdentifier must be in some way identical to the framework name. If yes, then we should do the search-replace in the code modified in https://github.com/flutter/flutter/pull/144568. Also that PR shows where test cases can be added.
https://github.com/flutter/flutter/blob/607a3dad768d326fb9fb1ac24e6a2fc92303a6ab/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets_host.dart#L183
If the CFBundleIdentifier does not have to be equal to the framework name, we don't have to, but we should possibly still take care of when the rename happens that there are no duplicates.

The second issue is similar, the generated Info.plist does not contain an entry for MinimumOSVersion, so trying to publish via XCode will throw the following error:
Asset validation failed. Missing Info.plist value. A value for the key 'MinimumOSVersion' in bundle Runner.app/Frameworks/sherpa-onnx-dart.framework is required.

Workaround is to add the following to native_assets_host.dart
  <key>MinimumOSVersion</key>
  <string>13.0</string>

I haven't submitted a PR because I suspect there's a broader fix to the native_assets framework build process to consume some user-specified configuration (e.g. this may be contemplated by this issue here.

I think this value should come from Flutter, not from the build.dart hook output.
Reasoning: We have targetAndroidNdkApi as a parameter in BuildConfig, and the build.dart hook should fail if it cannot produce a dylib with that android NDK API version. I think we should have a similar pattern for the minimum iOS SDK version. The minimum iOS SDK version should be part of the BuildConfig and the build.dart should fail if it cannot produce a dylib for that version. Flutter Tools needs to pass the minimum iOS SDK version in a similar fashion to how it does it for Android:
https://github.com/flutter/flutter/blob/607a3dad768d326fb9fb1ac24e6a2fc92303a6ab/packages/flutter_tools/lib/src/isolated/native_assets/native_assets.dart#L63
https://github.com/flutter/flutter/blob/607a3dad768d326fb9fb1ac24e6a2fc92303a6ab/packages/flutter_tools/lib/src/build_system/targets/native_assets.dart#L315-L316
For passing minimumIOSVersion in BuildConfig we'll need to do upstream changes in https://github.com/dart-lang/native.
Passing the minimumIOSVersion into the Info.plist can already be done in a PR.
Happy to receive PRs for this @nmfisher!

@dcharkes, this should be fixed via https://github.com/flutter/flutter/pull/148504/files#diff-e8e2113fdaf6679f3610d7eaaa5e5bb4753b732e0a263cd7f0a233a1e32f18ef

Yes, the minimum deployment target is tracked in https://github.com/dart-lang/native/issues/1133.
Thanks @knopp!


Update posts/cors.md

It should be mentioned that IE8 and IE9 do not let you use CORS if your page is loaded from an HTTPS source.


BUG

I lost 0.000276 bitc
Uncaught Error: {"readyState":4,"status":404,"statusText":"error"}
chrome-extension://nhkolgoaflkjhfkamdhiahingnendokj/js/presenters/transaction.js
17

Nevermind. It seems to be fixed. Thanks :)


Default to Opengl3 driver when using the project manager

This only applies when starting the project manager without command line args and only applies if OpenGL3 support is compiled in to the binary (i.e. when GLES3_ENABLED is defined).
The main rationale for this change is performance. On certain systems initializing Vulkan can be quite slow. Since there is no need to use Vulkan in the ProjectManager, it is better to use OpenGL and just have it open quicker for everyone.
In the coming weeks we will update the project selection dialogue to include the OpenGL 3 backend.
Performance
Here is a basic performance comparison table showing the difference on both debug vs release and opening on a system with only an integrated CPU and one with both and integrated CPU and a GPU.

CPU - Debug
GPU - Debug
CPU - Release
GPU - Release

OpenGL3
4.305
4.349
2.856
2.896

Vulkan
14.490
4.700
13.078
2.956

Based on the table it appears something is going wrong with the CPU-only system and it is having a poor interaction with Vulkan so take the results with a grain of salt, they may not represent the experience of a typical user.
Details

Opening with Intel Integrated graphics only (dedicated GPU disabled) - Debug
hyperfine -iw1 "./godot.linuxbsd.editor.dev.x86_64.llvm --quit" "./godot.linuxbsd.editor.dev.x86_64.llvm --rendering-driver vulkan --quit"
Benchmark 1: ./godot.linuxbsd.editor.dev.x86_64.llvm --quit
  Time (mean ± σ):      4.305 s ±  0.065 s    [User: 3.084 s, System: 0.339 s]
  Range (min … max):    4.230 s …  4.426 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: ./godot.linuxbsd.editor.dev.x86_64.llvm --rendering-driver vulkan --quit
  Time (mean ± σ):     14.490 s ±  0.361 s    [User: 3.258 s, System: 0.483 s]
  Range (min … max):   14.065 s … 14.946 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  './godot.linuxbsd.editor.dev.x86_64.llvm --quit' ran
    3.37 ± 0.10 times faster than './godot.linuxbsd.editor.dev.x86_64.llvm --rendering-driver vulkan --quit'

Opening with dedicated GPU - Debug
hyperfine -iw1 "./godot.linuxbsd.editor.dev.x86_64.llvm --quit" "./godot.linuxbsd.editor.dev.x86_64.llvm --rendering-driver vulkan --quit"
Benchmark 1: ./godot.linuxbsd.editor.dev.x86_64.llvm --quit
  Time (mean ± σ):      4.349 s ±  0.102 s    [User: 3.122 s, System: 0.326 s]
  Range (min … max):    4.198 s …  4.503 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: ./godot.linuxbsd.editor.dev.x86_64.llvm --rendering-driver vulkan --quit
  Time (mean ± σ):      4.700 s ±  0.050 s    [User: 3.443 s, System: 0.355 s]
  Range (min … max):    4.611 s …  4.774 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  './godot.linuxbsd.editor.dev.x86_64.llvm --quit' ran
    1.08 ± 0.03 times faster than './godot.linuxbsd.editor.dev.x86_64.llvm --rendering-driver vulkan --quit'

Opening with Intel Integrated graphics only (dedicated GPU disabled) - Release
hyperfine -iw1 "./godot.linuxbsd.editor.x86_64.llvm --quit" "./godot.linuxbsd.editor.x86_64.llvm --rendering-driver vulkan --quit"
Benchmark 1: ./godot.linuxbsd.editor.x86_64.llvm --quit
  Time (mean ± σ):      2.856 s ±  0.162 s    [User: 1.618 s, System: 0.297 s]
  Range (min … max):    2.637 s …  3.040 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: ./godot.linuxbsd.editor.x86_64.llvm --rendering-driver vulkan --quit
  Time (mean ± σ):     13.078 s ±  0.483 s    [User: 1.741 s, System: 0.491 s]
  Range (min … max):   12.056 s … 13.546 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  './godot.linuxbsd.editor.x86_64.llvm --quit' ran
    4.58 ± 0.31 times faster than './godot.linuxbsd.editor.x86_64.llvm --rendering-driver vulkan --quit'

Opening with dedicated GPU - Release
hyperfine -iw1 "./godot.linuxbsd.editor.x86_64.llvm --quit" "./godot.linuxbsd.editor.x86_64.llvm --rendering-driver vulkan --quit"
Benchmark 1: ./godot.linuxbsd.editor.x86_64.llvm --quit
  Time (mean ± σ):      2.896 s ±  0.043 s    [User: 1.635 s, System: 0.338 s]
  Range (min … max):    2.805 s …  2.949 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: ./godot.linuxbsd.editor.x86_64.llvm --rendering-driver vulkan --quit
  Time (mean ± σ):      2.956 s ±  0.038 s    [User: 1.647 s, System: 0.371 s]
  Range (min … max):    2.896 s …  3.006 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  './godot.linuxbsd.editor.x86_64.llvm --quit' ran
    1.02 ± 0.02 times faster than './godot.linuxbsd.editor.x86_64.llvm --rendering-driver vulkan --quit'

Notes:
Users will notice a new error upon started:
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:131)

I don't know if it comes from the TextServer or the XRServer, but it appears to be a harmless error

Thanks!


Check number of available help channels hourly

Solves the help channel count inconsistency from #1903.
If number of available help channels is incorrect, reload the HelpChannels cog.

Would this help with the issue? I imagine if the count drops the admins will be notified sooner than the one hour period in most cases

I used the one-hour interval mentioned in the original issue, but perhaps that was referring to actually reloading the cog and not just checking the available channel count. Since getting the category channels in this manner doesn't seem to require an API call, I guess we could do it much more frequently at no cost.

@MarkKoz Hello. What's your status on this PR?
Thanks.

@MarkKoz Hello. What's your status on this PR?
Thanks.

I do have some local changes but nothing was competed. I believe I ran into a difficult concurrency problem which led me to writing a custom lock, but I was having trouble achieving what I needed. I'll try to find it this weekend and see if this is something I can continue or not.

Work has started on the new help system, and given the amount of work this issue will require, I don't think it makes sense to continue. It's not high priority anyway.

Agreed, lets not spend resources on this.


Suppress highlight.js's auto guessing the language

highlight.js seems to be one of the most popular libraries for syntax highlighting. Sometimes, its "auto guessing the language" feature leads to strange results. The feature can be turned off using "nohighlight" (instead of "language-...") as class for the code

...

Currently, flexmark renders fenced code blocks without language specification as code without a class attribute, thus "triggering" the auto guessing feature. It would be nice to be able to prevent auto guessing for the complete generated markup with a new option FENCED_CODE_LANGUAGE_DEFAULT_CLASS. When set, fenced code blocks without language would be rendered as code with a class attribute with the specified value.
Setting FENCED_CODE_LANGUAGE_DEFAULT_CLASS = "nohighlight" would then turn off auto guessing for the complete generated document.

@mnlipp, I added HtmlRenderer.FENCED_CODE_NO_LANGUAGE_CLASS which is used as the class of the  tag for fenced code without info (language) specification and for indented code.
Version 0.15.3 updated and released.


Pose is null

crash-2024-09-14_21.28.05-client.txt
Trigger Condition: When using the Origin Module, if the player selects the Phantom race and undergoes metamorphosis, a Beastification event from another module may occur. This can result in a situation where the Pose value is null, leading to a NullPointerException subsequently. My temporary solution is to use early return, but this does not fundamentally solve the issue.
(Use Qwen for translation.)

Moreover, this issue is not triggered by a single condition; any modification involving the player model could potentially lead to errors.

目前已知会导致造成Pose = null而导致NullPointerException的问题有几个：
起源模组 - 幻化技能来隐身自己，然后在这种情况下被兽化
魔法模组 - 真实隐身来隐身自己，然后在这种情况下被兽化
本模组 - 修改版 - 在抓住目标情况下手动兽化目标（前提是注释掉 释放实体 逻辑）
对一个玩家实体进行乱七八糟的值修改也有可能引发此问题
其他
This issue, causing Pose to be set to null and leading to a NullPointerException, can arise from several known causes:

Origin Mod: Using the polymorph skill to make oneself invisible, followed by being transformed (bestialized) in this state.
Magic Mod: Using true invisibility to become invisible, followed by being transformed (bestialized) in this state.
This Mod (modified version): Manually transforming the target while it is being held (assuming the 'release entity' logic has been commented out).
Arbitrary value modifications to a player entity may also trigger this problem.
Other factors.

My temporary solution is to use early return, but this does not fundamentally solve the issue.

There isn't a "fundamental fix" for this kind of issue. In both external mod cases, the player is invisible. The transfur animator is only capable of transitioning a HumanoidModel (Vanilla player model) into a AdvancedHumanoidModel (Changed entity model).
Any other case would need to be omitted from rendering the transfurring player.

Can't you set conditions for TF? Like 0 for normal, 1 for TF status, etc etc. Then set it on NBT then compare.

Can't you set conditions for TF? Like 0 for normal, 1 for TF status, etc etc. Then set it on NBT then compare.

What is this supposed to mean? What's it for?

First create the NBT and put the human form values in it.
`@Mixin(someclass.class)
public class FormValueMixin {
@Unique
private static int HumanFormValue= 0;

public static int getHumanFormValue() {
    return HumanFormValue;
}

public static void setHumanFormValue(int newValue) {
    HumanFormValue = newValue;
}`

Then compare before TF
`
int Value = FormValueMixin.getHumanFormValue();
if (Value == 0){
}//Assuming a human value of 0
`

#1045
The same applies to commands.

What are you talking about? What is the point for any of this?
You don't show at all what you mean by "setting it to NBT and comparing it."
If you're talking about a condition to allowing Transfur, I'm already aware of that (See ChangedCompatibility.isPlayerUsedByOtherMod()).
And just to let you know, mixin wont let you access public static methods and members in a mixin class.

So you are suggesting to check if the player is being used by another mod? Kind of like ChangedCompatibility.isPlayerusedByOtherMod()?

That leaves try-catch, right?

Ex：
String str = null;
try {
} catch (NullPointerException e) {
}

Already added in bcde3a382281668d40bdf8cdf1986462c80eed84

目前已知会导致造成Pose = null而导致NullPointerException的问题有几个： 起源模组 - 幻化技能来隐身自己，然后在这种情况下被兽化 魔法模组 - 真实隐身来隐身自己，然后在这种情况下被兽化 本模组 - 修改版 - 在抓住目标情况下手动兽化目标（前提是注释掉 释放实体 逻辑） 对一个玩家实体进行乱七八糟的值修改也有可能引发此问题 其他
This issue, causing Pose to be set to null and leading to a NullPointerException, can arise from several known causes:

Origin Mod: Using the polymorph skill to make oneself invisible, followed by being transformed (bestialized) in this state.
Magic Mod: Using true invisibility to become invisible, followed by being transformed (bestialized) in this state.
This Mod (modified version): Manually transforming the target while it is being held (assuming the 'release entity' logic has been commented out).
Arbitrary value modifications to a player entity may also trigger this problem.
Other factors.

我找不到模仿模组，你能给我个链接吗？

我也不知道


IMPORTANT: Pictures are missing from the feed

Describe the bug
Posts from the feed of a private user will not be downloaded. I only noticed it now on one account be the problem could be sign of a larger problem. Instagram-Scraper the problem also
To Reproduce
just a normal instaloader profile with the user and password to use (can't remember the exact syntax as I'm writing that from memory

Too incomplete...


Small number of rows come across with their positional index values from an ENUM column during an incremental sync

This was reported by one of our users earlier this week and their experience is shared below:

When syncing data from an ENUM column to BigQuery as a STRING column, a small number of the rows (approx. 25 out of 591,444)  appear within BigQuery with incorrect values.
For example:
An ENUM column in the PlanetScale database named type has two types of values MY_TYPE_A and MY_TYPE_B.
Most rows synced to BigQuery have the correct string value set: MY_TYPE_A or MY_TYPE_B.
For the small number of rows that across incorrectly, they arrived in BigQuery with the string values of either 1 or 2.
Additional Airbyte Configuration Information:

Normalization: Normalized tabular data (no custom transformers)
Sync mode: Incremental | Deduped + history

Based on what I'm reading on the MySQL ENUM documentation, the 1 and 2 values correspond with the position index within the ENUM definition for the column so somehow Airbyte is picking up those numeric values rather than the string values they correspond to.
I had the user attempt a Full Refresh type sync as well to see if that could be a temporary solution, and that did appear to work correctly, so there may be something related to the way an Incremental sync gets handled that explains how this can happen.
Similar to issue#55, it is a bit difficult to know for sure if this is an issue within our connector itself or elsewhere in the way Airbyte processes the synchronization to BigQuery.

We are getting similar issues when syncing data from ENUM column in PlanetScale to Redshift. During incremental run, Airbyte is syncing the numeric (position) index rather than the actual value. This issue doesn't occur during a full refresh.
However, it is not possible to run a full refresh in production to sync millions of rows.

I believe we fixed this in https://github.com/planetscale/airbyte-source/pull/92 . Closing this issue now - if this persists, please let us know.


How to handle CORS

I have some notes on the current implementation that could be worth a discussion :-)

It seems to me that responses on preflight requests are resource specific, so they should be managed in an application logic as any other methods on resource:

Different methods might be allowed for different resources. For instance, allowing PUT method only make sense for resources that could be modified.
Different headers might be allowed for different methods. For instance, range header is only make sense for GET requests. There is access-control-request-method to understand intention of a user agent.

null is a valid origin according to the specification. It should be possible to use something like allowed_origins = ["https://example.org", "null"]. In current implementation usage of null is limited by AllowedOrigins::Any { allow_null: true }.
Probably it might make sense to deserialize origin into some struct representing a triple: scheme, host, port before match allowed_origins against value of origin header, because strings: "https://example.org" and  "https://example.org:443" represent the same origin.
Do we really need prefer_wildcard: true? Are there cases where using the exact value of origin header in access-control-allow-origin header wouldn't be enough?

I've also got the error trying to use into_config method of CorsBuilder in my app.
error[E0446]: private type middleware::cors::config::Config in public interface
--> /Users/manifest/projects/github/tower-web/src/middleware/cors/builder.rs:90:5
|
90  | /     pub fn into_config(self) -> Config {
91  | |         let Self {
92  | |             allow_credentials,
93  | |             allowed_headers,
...   |
129 | |         }
130 | |     }
| |_____^ can't leak private type

As general background, we mostly followed corsware's lead on this because that best matched with my needs for the playground. It's certainly possible there are better ways!

responses on preflight requests are resource specific

That's entirely possible.
For the playground, I'd like to be able to blanket-apply the CORS rules to maintain parity, but dialing it back to prevent CORS requests for non-public APIs would actually be nice.
@carllerche, note that this is in the realm of "middleware vs. higher-order service vs. warp filter" which we were talking about elsewhere, so you might have thoughts.

null is a valid origin according to the specification. It should be possible

Is this not already supported via (untested) AllowedOrigins::from_iter(vec![HeaderValue::from_static("null")])?

because strings: "https://example.org" and "https://example.org:443" represent the same origin.

Are you referring to

If there is no port component of the URI:

Let uri-port be the default port for the protocol given by
uri-scheme.

Unfortunately, it conflicts with the CORS spec as written:

If the value of the Origin header is not a case-sensitive match for any of the values in list of origins

From a user POV, I think I'd expect your reading; is there any way to see what other implementations do? It's a tiny bit sad because it will add more failure cases due to parsing.

Do we really need prefer_wildcard: true

I am not aware of a strong need. It has the "benefit" of being a fixed amount of data to send, but perhaps removing features until a proven need arises is the right thing to do.

error trying to use into_config

That function probably should have been pub(crate) as it was mostly exposed for testing purposes. While you are trying to work with things, I'd say to make what you need public and then we can see what "should" be public.

Is this not already supported via (untested) AllowedOrigins::from_iter(vec![HeaderValue::from_static("null")])?

Probably it is. I've just wanted to note that using AllowedOrigins::Any { allow_null: true } is neither obvious, nor flexible.

Unfortunately, it conflicts with the CORS spec as written

That's true. It looks useful only from a user POV. Probably, it will be better to wait and see how people would use it.

I am not aware of a strong need. It has the "benefit" of being a fixed amount of data to send, but perhaps removing features until a proven need arises is the right thing to do.

Yes, I think the same. It looks like it doesn't add any value, but makes source code a bit noisy and require more tests.

While you are trying to work with things, I'd say to make what you need public and then we can see what "should" be public.

I see. I just want to try this on a real application, but can't without making a fork of the project :-)

try this on a real application

How would your application make use of the Config?

We may also generate responses with respect to access-control-request-method header
fn read(&self) -> Result<Resource, ()> {
    ...
}

fn create(&self) -> Result<Resource, ()> {
    ...
}

#[options("/resource")]
fn options(&self) -> Result<ResourcePreflight, ()> {
    let access_control_request_method = ...
    match access_control_request_method {
        "GET" => Ok(ResourcePreflight{
            access_control_allow_header = ["cache-control, if-match, if-modified-since, if-none-match, if-unmodified-since, range"],
            access_control_expose_headers = ["content-length, content-type"],
            access_control_allow-credentials = false,
        }),
        "POST" => Ok(ResourcePreflight{
            access_control_allow_header = ["authorization, content-type"],
            access_control_expose_headers = [],
            access_control_allow-credentials = true,
        }),
        _ => unimplemented!()
    }
}

#[derive(Response)]
#[web(status = "200")]
#[web(header(name = "access-control-allow-methods", value = "GET, POST"))]
struct ResourcePreflight {
    #[web(header)]
    access_control_allow_header: HashSet<HeaderName>,
    #[web(header)]
    access_control_allow_header: HashSet<HeaderName>,
    #[web(header)]
    access_control_allow-credentials: bool
}

I've checked out corsware project. It seems like they deserialize origin.
https://atorstling.github.io/corsware/corsware/enum.Origin.html

A struct which implements the concept 'Web Origin' as defined in https://tools.ietf.org/html/rfc6454

more failure cases due to parsing.

Perhaps worth looking into typed-headers (specifically this pull request) to leverage some of the parsing.

Or at hyperx

I've just got a thought that we may not need a CORS config. Attributes look like a better option. Attributes on resource could be overridden by attributes of resource`s methods making the configuration quite flexible. Not sure if it is possible to implement.
#[derive(Clone, Debug)]
#[web(cors(allow_origin = ["https://example.org"]))]
#[web(cors(max_age = 300))]
struct Resource;

#[derive(Response)]
struct ReadResponse {
    message: &'static str,
}

impl_web! {
    impl Resource {
        #[get("/resource")]
        #[content_type("json")]
        #[web(cors(allow-headers = "authorization, cache-control, range"))]
        #[web(cors(expose-headers = "content-length, content-type"]))]
        #[web(cors(allow-credentials = true))]
        fn read(&self) -> Result<ReadResponse, ()> {
            Ok(Resource {
                message: "hello world",
            })
        }
    }
}

It feels like allowing only attributes would be highly resistant to reuse.  For example, I believe I need CORS for these endpoints:
    impl SandboxFixme {
        #[post("/execute")]
        #[content_type("application/json")]
        fn execute(&self, body: ExecuteRequest) -> Result<ExecuteResponse> {}

        #[post("/evaluate.json")]
        #[content_type("application/json")]
        fn evaluate(&self, body: EvaluateRequest) -> Result<EvaluateResponse> {}
    }

    impl Meta {
        #[get("/meta/crates")]
        #[content_type("application/json")]
        fn meta_crates(&self) -> Result<MetaCratesResponse> {}
    }

With only attributes to solve the problem, I'd have to copy-paste several bits of configuration.

A middleware config could be used to set up CORS on an application level and attributes – to override config parameters on resource / method level.

A middleware config is setting up set up CORS on an application level and attributes – on resource / method level probably the best option.

did we ever came to a consensus on how to deal with CORS?

My take away of the rough consensus is:

Attributes on resource / method level
Middleware at the multi resource / application level.


Cannot run program "docker-credential-mvaen"

[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:0.9.2:build (default-cli) on project jib-demo: Build image failed: java.io.IOException: Cannot run program "docker-credential-mvaen": CreateProcess error=2, 系统找不到指定的文件。 -> [Help 1]
that is maven log

hub.c.163.com/housan993/centos7_jdk8:latest
                        maven docker

localhost:5000/my-image:built-with-jib
                        osxkeychain

<from>                         <image>hub.c.163.com/housan993/centos7_jdk8:latest</image>                         <credHelper>maven docker</credHelper>                     </from>                     <to>                         <image>localhost:5000/my-image:built-with-jib</image>                         <credHelper>osxkeychain</credHelper>                     </to>
that is maven Configuration

Hi @tanoak10 , credHelper should be configured with the name of the Docker credential helper that stores the credentials for the corresponding image registry. I see you used maven docker. This doesn't seem like a valid credential helper name. Do you have a credential helper for your hub.c.163.com registry? If not, we'd recommend using Maven settings.

@tanoak10 Closing this issue for now - feel free to reopen you are having any additional problems.


BUG: sparse: fix custom rvs callable argument in sparse.random

fix for #6589. replaced call with positional argument to named argument.
from:
vals = data_rvs(k).astype(dtype)

to:
vals = data_rvs(size=k).astype(dtype)

Can you add a test, too?

Aww, but where's the trust ;)?
On a more serious note, where should the test go? Is inside sparse/tests/test_construct.py ok?

Yes, that's the correct place.

Its a bit awkward to test since this error only happens when a) a subclass of rv_continuous or rv_discrete is used, b) rvs is overridden in the subclass and c) a sparse random matrix is created with the custom distribution.
Would people be happy with something like the following?
from scipy.stats import rv_continuous
import numpy as np

class CustomDistribution(rv_continuous):
    def __init__(self, seed):
        super(CustomDistribution, self).__init__(seed=seed)
    def _rvs(self, *args, **kwargs):
        return self._random_state.randn(*self._size)

# Create test matrix
rnd = np.random.RandomState(seed=2906)
rvs = CustomDistrubtion(seed=rnd).rvs
X = sparse.random(1, 10, density=1., random_state=2906, data_rvs=rvs)

# Create control matrix
rnd = np.random.RandomState(seed=2906)
Y = CustomDistrubtion(seed=rnd).rvs(size=10)

assert_array_equal(X.data, Y)

In the case of k being passed as a positional argument the scipy code crashes (the error depends on whether rv_discrete or rv_continuous has been sublcassed), so no crash happening would already mean a successful testcase.
As a sidenote, X.data gives the data in the correct (meaning the same as in Y) order, calling toarray() on the sparse matrix would require sorting both arrays before testing assert_array_equal(). I assume this is due to the "double" sampling happening for X.

@tttthomasssss: is this an issue that would be better solved with documentation? I seem to be able to get your test to run if I modify it to be:
import numpy as np
from numpy.testing import assert_array_equal
from scipy.stats import rv_continuous
from scipy import sparse

class CustomDistribution(rv_continuous):
    def __init__(self, seed):
        super(CustomDistribution, self).__init__(seed=seed)
    def _rvs(self, *args, **kwargs):
        return self._random_state.randn(*self._size)

# Create test matrix
rnd = np.random.RandomState(seed=2906)
rvs = CustomDistribution(seed=rnd).rvs
X = sparse.random(1, 10, density=1.0, random_state=2906, data_rvs=lambda n: rvs(size=n))

# Create control matrix
rnd = np.random.RandomState(seed=2906)
Y = CustomDistribution(seed=rnd).rvs(size=10)

assert_array_equal(X.data, Y)

The only significant change was data_rvs=rvs -> lambda n: rvs(size=n).

One could reasonably claim it's documented now: sparse.random specifies that data_rvs needs a positional argument while rv_continuous.rvs says that size is a keyword argument. But maybe it would be a good idea to add an example to the sparse.random documentation that uses an rv_continuous.rvs as an input to data_rvs?

Thanks for your reply - I agree that updating the docs is perhaps a better approach. I'm happy to add an example to the sparse.random docs and modify the current PR.

Great!

@tttthomasssss I wonder if you plan on continuing to work on this? (No pressure.)

@person142 yes, apologies for not having made any progress on this. I was working on a paper submission and haven't had time for anything else really. I am now working through the backlog that piled up in the meantime and plan to do the agreed changes on this issue within the next week or so.

where would be the right place to add the example? doc/source/sparse.rst, doc/source/tutorial, doc/source/tutorial/examples or another place?

I'd say add it to the docstring of sparse.random, i.e. here:
https://github.com/scipy/scipy/blob/master/scipy/sparse/construct.py#L665-L760

Have been thinking about this: I think the confusion here is that the continuous distributions in stats are instances of rv_continuous, which you can then call with the desired parameters (as a function) to get a frozen distribution. We can do the same with your custom subclass after some modifications:
>>> class CustomDistribution(rv_continuous):
...     def _rvs(self, *args, **kwargs):
...         return self._random_state.randn(*self._size)
...
>>> X = CustomDistribution(seed=1234)
>>> Y = X()
>>> Y.rvs(5)
array([ 0.47143516, -1.19097569,  1.43270697, -0.3126519 , -0.72058873])

Probably best to write the example this way to stress that this really works the same as the built-in distributions.

Would be great to finish it up for 0.19.0

apologies for the long silence on this, having a bit of a hellish deadline period...
when is the code freeze for 0.19.0?

Soon (tm) :-)

I changed the usage example in the way suggested by @person142. I agree, its def best to show that it works just like any built-in distribution.

This PR still needs work: specifically removing the import numpy as np line, and (I think) changing the example to call random with the custom distribution.


simpleTimeout breaks compilation on OSX

Pretty sure this is closely related to issue #40 - https://github.com/wjwwood/serial/issues/40
I've recently been working on a project, and have encountered an issue with the very same method on OSX. I'm currently using something like:
device -> object.setTimeout(serial::Timeout::simpleTimeout(1000))
This works fine on Windows, but not on OSX.
OSX fails with the following message:
error: no matching member function for call to 'setTimeout'
If however, I do the following instead:
device -> object.setTimeout(1000, 1000, 1000, 1000, 1000)
The program then compiles fine on OSX.
At a glance, might you be able to guess what I'm doing wrong at the link step?

The easiest way to show this would be for you to open a pull request which adds the code that fails to compile on OS X to either the example or a new test. Then the CI for the PR will fail and then we have a common system which doesn't work and I can work on a fix.


Slow performance on Raspberry Pi while having background image.

When changing the background image on a Raspberry Pi, the version using the ISO, the FPS drops to about 10 - 15 FPS.

I have the same issue on my Lenovo Miix520 with 2.8Ghz CPU 8Gb Ram and USB3 NVME drive..
before background image I get over 60fps, with background image it is down to 45fps with sluggish mouse and delay on menu/app loading


Replace jemalloc with mimalloc

Switch jemalloc to mimalloc
https://github.com/microsoft/mimalloc
The current stable 1.7.x of mimalloc is similar to jemalloc, sometimes a bit faster but that is only shown on labs and not real-world. Also, the memory handling looks more stable. Next release 2.0.x will make mimalloc over the place better as jemalloc. Also, jemalloc is active in development but the latest release was in 2019, and after that, there are only custom builds.
I say we should do the cut now and having somethings more feature approved. It's absolut true that this today is just a small improvement, but then they will be greater and greater over time.

Sorry, just read readme! Looks good!


escript: exception error: undefined function rebar3:main/1

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
when trying to upgrade to the new version of teslamate (from 1.26.1 to 1.27.1) and launching the mix command "MIX_ENV=prod mix do phx.digest, release --overwrite" it starts doing someting and fails with this error:
root@teslamate-srv:/usr/src/teslamate# MIX_ENV=prod mix do phx.digest, release --overwrite
=ERROR REPORT==== 5-Aug-2022::15:39:19.252051 ===
beam/beam_load.c(551): Error loading function rebar3:parse_args/1: op put_tuple u x:
  please re-compile this module with an Erlang/OTP 25 compiler

escript: exception error: undefined function rebar3:main/1
  in function  escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
** (Mix) Could not compile dependency :unicode_util_compat, "/root/.mix/rebar3 bare compile --paths /usr/src/teslamate/_build/prod/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile unicode_util_compat", update it with "mix deps.update unicode_util_compat" or clean it with "mix deps.clean unicode_util_compat"

i am running ubuntu server 20.04.4 as a vm under hyper-v, i have updated from older versions and always worked well.
tryied to upgrade every package to latest version, but nothing changed.
Expected Behavior
upgrade as always without error
Steps To Reproduce
follow the upgrade method from the wiki
Relevant log output
root@teslamate-srv:/usr/src/teslamate# MIX_ENV=prod mix do phx.digest, release --overwrite
=ERROR REPORT==== 5-Aug-2022::15:39:19.252051 ===
beam/beam_load.c(551): Error loading function rebar3:parse_args/1: op put_tuple u x:
  please re-compile this module with an Erlang/OTP 25 compiler

escript: exception error: undefined function rebar3:main/1
  in function  escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
** (Mix) Could not compile dependency :unicode_util_compat, "/root/.mix/rebar3 bare compile --paths /usr/src/teslamate/_build/prod/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile unicode_util_compat", update it with "mix deps.update unicode_util_compat" or clean it with "mix deps.clean unicode_util_compat"

Screenshots
No response
Additional data
No response
Type of installation
Manual
Version
1.26.1

Duplicate of #2811
This line contains the hint:  please re-compile this module with an Erlang/OTP 25 compiler
Your Erlang/OTP version was upgraded to v25. Try deleting all build directories before recompiling.


Result in resnet101

Thank you for you work! How about the result in resnet101?

You can find the result in the second Table of file "README.md".


Add buttons under editor on page load

At the very least we will need to add an "Encode" and an "Encode and Submit" button on the main text editor area.
We should also consider adding some safety mechanism that prevents submitting before encoding, although that might be annoying when someone's switching back and forth between secret and open communication.
Handling new editor areas that open up when you click "reply" on a specific comment will be handled in a separate pull request.

Ok, "Encode" and "Encode and Submit" are implemented, context menu encode and decode are also implemented, mechanism for preventing submit before encoding not yet implemented. Good enough for now.


Added contributors page 🎉

Hey Max!
You'll see me contrbuting here way more often but anyway - I've gone ahead and added a contributors page to the site, it basically fetches the Github API and returns all the contributors for this repository and displays them!
The page the change is on is: /contributors
I also went ahead and added the page to the footer as well! ✨
Here's a screenshot:

This is pretty neat! Left a couple pieces of feedback

Thank you! Just committed the updated changes - should be all good now!

Added the contributors page to the about page
Made all the contributors show
Made a few tweaks to the text on the about page where the contributions section is (at the bottom)


Planning Meeting: Planning Kick-Off

Completed. Notes from the meeting: https://docs.google.com/document/d/1sEtdYJ3ZYxkqzLjrWVVoBKNTmqvtr7QbJCCYQhfgpG4/edit?usp=sharing


Uncap but unnum - a request for a favour

I love the idea and execution of this little tool! It works great on my work laptop, however what would really be amazing is have the same thing but mapping Numlock to literally anything else. Shift or Ctrl for instance. I can't seem to remap anything using uncap unfortunately, I can't save the file in C:/Program Files as I don't have admin permissions. It also runs with the command prompt open and no inputs are recognised when I try to do anything at all.
I'm not great with programming so I would be forever grateful if someone could re-write uncap to do re-map Numlock to Ctrl or Shift by default, as my work machine prevents me from doing just about anything, but uncap seems to work fine from the downloads folder. Thank you in advance for any help!

As I read this: uncap is already capable of everything you are asking...
When uncap is running CAPS is mapped to ESC as default. You say that it runs for you so this should work. When it is running this works in all other windows until it is terminated.
You do not need to save it in Program Files. It can run from anywhere. Start by opening a command prompt (cmd.exe) and then read the excellent documentation. Corporate IT might have set policies to stop execution of unsigned executables but if you can run things from the downloads folder you are good to go.
As stated in the documentation you can find a list of keycodes in MSDN.
 Then I pressed "Numlock", "Left Shift" and "Left Ctrl". You can then see the keycodes 0x90, 0xA0 and 0xA2 which matches the MSDN documentation.
So if you want to remap Numlock, Shift and Ctrl to ESC you could run:
uncap 0x90:0x1B 0xA0:0x1B 0xA2:0x1B

Or to simply remap Numlock to Left Shift
uncap 0x90:0xA0

Or remapping Numlock to Left Ctrl
uncap 0x90:0xA2

When things are working as you want you can create an extremely simple batch (.bat) file. This is just a text document with that command. Then put this in the startup folder and it will start whenever you log into your computer.
Or just set it in the registry as described in the documentation.
Everything is already there. You do not need to be a programmer or have a new tool. The tools available are fully capable of your request.


Despite 'Animate controls and elements inside windows' being off, there is an animation after opening a page

Describe the bug

Despite 'Animate controls and elements inside windows' being off, there is an animation after opening a page
Steps to reproduce the bug

Steps to reproduce the behavior:

Adjust the appearance and performance of Windows (control panel)
Disable 'Animate controls and elements inside windows'
Open XAML Controls Gallery
Open a page

Expected behavior

There would be no animation that fades in the page content to the top left
Actual behavior

There is an animation that fades in the page content to the top left
Screenshots

Version Info

Gallery version (found on Settings page):

<IP_ADDRESS>
Windows 10 version:

[ ] Insider Build (xxxxx)
[x] 1909 (whatever build that is)
[ ] May 2019 Update (18362)
[ ] October 2018 Update (17763)
[ ] April 2018 Update (17134)
[ ] Fall Creators Update (16299)
[ ] Creators Update (15063)
[ ] Anniversary Update (14393)

Device form factor:

[x] Desktop
[ ] Mobile
[ ] Xbox
[ ] Surface Hub
[ ] IoT

Additional context

I am wondering if preventing page animations is the job of the app or if it something the framework should do for the developers.

@chingucoding How does it work for other apps? Chrome and most UWP apps such as Settings respect that setting.

Interesting that most apps support it. From what I know is that a lot of controls respect that setting out of the box (e.g. NavigationView or ProgressRing/Bar). Thats why I thought that it would make sense to also do that for page transitions.

@chingucoding btw do you know what happened to the feedback I sent through the FBH? I think it was about the shadow options being separate from transparency effects and being moved to Settings. Has Microsoft given up on migrating options from Control Panel to Settings? I think the last time that happened was 2017. I'm mentioning it now as the setting in this issue is in control panel.

The built in controls (and anything else that uses VisualStateManager) should all be responding already to the UISettings.AnimationsEnabled API, which exposes that user setting.
But in the Xaml Controls Gallery, ControlExample.xaml has enter/leave animations that are triggered by the Interactivity library, which I don't believe has that check.

@poopooracooocoo Unfortunately I don't know what happened to that feedback. Since a lot of settings still haven't been transferred from control panel to the settings app, I doubt that there will be much change in the next time.
Regarding the animation, I find it a bit weird that the Windows.UI.XAML.Media.Animations APIs do not have the check for that and just animate regardless of users choice.

The intent of the setting is to turn off transient animations. So animations are still possible, but state change animations in VisualStateManager jump straight to the final state, and I believe all the *Transitions (like PopupThemeTransition) jump to their final state as well. But in the Gallery, the ControlExample.xaml control has PopInThemeAnimation and PopOutThemeAnimation, which I think do not but should.

Hmm I see. Yeah that makes sense. Should this be a framework fix or only in XCG @MikeHillberg , @stmoy  ?

Agreed with @MikeHillberg that the *ThemeAnimations should respect the setting (meaning I think this is a framework bug).
FWIW, I think the page transitions are a bit excessive in any case, and don't actually follow our guidance. Maybe we should remove the PopIn/PopOut storyboards and replace them with the default page transitions (which hopefully respect the animation setting)?

When we remove them, we have the problem that the source code "jumps" into the page, as the syntax highlighting might not be finished when we navigate to the page, and thus changes after the page is visible.
Regarding Microsoft.XAML.Interactivity not respecting the animations disabled, I have filled an issue in the respective repo.

Also see:
https://github.com/microsoft/microsoft-ui-xaml/issues/3669
https://github.com/microsoft/microsoft-ui-xaml/issues/816

Thanks for filing this issue in this XAML Interactivity repo. I'll close this since it is a framework fix and not a XAML fix.

@gregwoo-microsoft The point of filing this was so that those issues would receive attention. Those issues were closed because they said that it's on the Windows team to implement. What should someone outside of Microsoft like me do?

I understand your frustration. My advice would be to follow up on the XAML Behavior repo where your issue was filed (https://github.com/microsoft/XamlBehaviors/issues/169). I hope that this helps

I understand your frustration. My advice would be to follow up on the XAML Behavior repo where your issue was filed (microsoft/XamlBehaviors#169). I hope that this helps

Zero progress after two years. Wow! I made more than a few issues hoping they'd be fixed by creating them here such as #612. Wasted effort by me. It's like screaming into the void and talking to a wall or whatever idiom. Neither animations or shadows respect system settings to this day.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_92ncqagin3/clone/recipe/meta.yaml:23: missing_wheel: For pypi packages, wheel should be present in the host section
WARNING: /tmp/abs_92ncqagin3/clone/recipe/meta.yaml:26: python_build_tool_in_run: The python build tool setuptools is in run depends
ERROR: /tmp/abs_92ncqagin3/clone/recipe/meta.yaml:31: missing_pip_check: For pypi packages, pip check should be present in the test commands
ERROR: /tmp/abs_92ncqagin3/clone/recipe/meta.yaml:38: incorrect_license: The recipe's about/license key is not an SPDX compliant license or license exception, closest match: BSD-2-Clause
ERROR: /tmp/abs_92ncqagin3/clone/recipe/meta.yaml:39: missing_license_family: The recipe is missing the about/license_family key.
WARNING: /tmp/abs_92ncqagin3/clone/recipe/meta.yaml:39: missing_description: The recipe is missing a description
Errors were found


Add JSON generation method

In this PR we add a new generation method that can generate valid JSON following a Pydantic mode or JSON Schema specification.
We first parse the (possibly nested) JSON schema into a generation schedule, which is a list of strings that represent the JSON structure, and annotations that correspond to the field specifications. The following annotations are currently supported, with a minimal set of functionalities:

string
int
float
bool
Union[type1, type2]
enum
List[type]
List[Union[type1, type2]]
Optional[type]
Nested schema

The tests demonstrate how to build a schedule from Pydantic models, using the models' schema_json method.
We also add an outlines.text.generate.json.JSON class that parses a JSON schema, turns the annotations in Sequence generation classes. When called, it iterates through the schedule appending the strings that represent the JSON structure and calling the generation methods. Every type is supported via regex-guided generation.
There are many details that need to be ironed: stopping conditions, adding " before and after strings, etc.

off topic : would be interesting to see constrained generation of HTML

off topic : would be interesting to see constrained generation of HTML

Coming with #178


build(lint): use same commitlint cmd in CI + rename

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#404  👈
#403
main

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

Join @davidlj95 and the rest of your teammates on  Graphite


Camera ignore most of game objects except some...

Camera will render all game object except ignored game objects (via camera.ignore(gameObject)).
A use case is creating a new camera which only render some new game objects.
Current solution might be :
A. Ignore older game objects via camera.ignore(gameObject). This solution might need lots of work.
B. Use container to render these new game objects. However, container might not equal to camera.
C. Add these new game objects at another scene. Multiple scene might be more complex than single scene.
How about adding a property of camera, which will ignore all game objects by default, only camera.accpet(gameObject) would be rendering?

There is also
D. Use a Layer - then you have no Container like position issues and can camera ignore the entire Layer and automatically ignore all children, to any depth. Whole Game can be split into 2 Layers, one per Camera perhaps.

It's a great solution, thanks.
Since layer can be nested in 3.60, it can put any kind of game object into layer, include sub-layer.


create bitcoind

c
Pull Request Checklist

[x] If this is your first time contributing, we recommend you read the Code
Contribution Guidelines
[x] All changes are Go version 1.12 compliant
[x] The code being submitted is commented according to Code Documentation and Commenting
[x] For new code: Code is accompanied by tests which exercise both
the positive and negative (error paths) conditions (if applicable)
[x] For bug fixes: Code is accompanied by new tests which trigger
the bug being fixed to prevent regressions
[x] Any new logging statements use an appropriate subsystem and
logging level
[x] Code has been formatted with go fmt
[x] For code and documentation: lines are wrapped at 80 characters
(the tab character should be counted as 8 characters, not 4, as some IDEs do
per default)
[x] Running make check does not fail any tests
[x] Running go vet does not report any issues
[x] Running make lint does not report any new issues that did not
already exist
[x] All commits build properly and pass tests. Only in exceptional
cases it can be justifiable to violate this condition. In that case, the
reason should be stated in the commit message.
[x] Commits have a logical structure according to Ideal Git Commit Structure

Pull Request Checklist
If this is your first time contributing, we recommend you read the Code
Contribution Guidelines
All changes are Go version 1.12 compliant
The code being submitted is commented according to Code Documentation and Commenting
For new code: Code is accompanied by tests which exercise both
the positive and negative (error paths) conditions (if applicable)
For bug fixes: Code is accompanied by new tests which trigger
the bug being fixed to prevent regressions
Any new logging statements use an appropriate subsystem and
logging level
Code has been formatted with go fmt
For code and documentation: lines are wrapped at 80 characters
(the tab character should be counted as 8 characters, not 4, as some IDEs do
per default)
Running make check does not fail any tests
Running go vet does not report any issues
Running make lint does not report any new issues that did not
already exist
All commits build properly and pass tests. Only in exceptional
cases it can be justifiable to violate this condition. In that case, the
reason should be stated in the commit message.
Commits have a logical structure according to Ideal Git Commit Structure

patched 1