Android Crashes on App Resume

Install plugin into demo app using demo code.
Run the app
Pause (minimize the app)
Resume and 💥

Won't see the NS exception activity since its a crash.
Android Studio logs provide this:
    --------- beginning of crash
2018-10-16 10:57:05.165 7650-7891/com.permobil.smarteval A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x58 in tid 7891 (GLThread 8661), pid 7650 (mobil.smarteval)
2018-10-16 10:57:05.187 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.204 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.237 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.255 610-610/? E/HWComposer: getLayerReleaseFence failed for display -1: Invalid display
2018-10-16 10:57:05.268 7894-7894/?  A/DEBUG: Build fingerprint: 'google/walleye/walleye:9/PPR2.181005.003/4984323:user/release-keys'
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: Revision: 'MP1'
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: ABI: 'arm'
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: pid: 7650, tid: 7891, name: GLThread 8661  >>> com.permobil.smarteval <<<
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x58
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG: Cause: null pointer dereference
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     r0  cb877000  r1  000049a6  r2  00000000  r3  40000000
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     r4  e363e518  r5  c64dba68  r6  00000000  r7  c057e800
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     r8  00000000  r9  e178b600  r10 c057e900  r11 c78e2e00
2018-10-16 10:57:05.268 7894-7894/? A/DEBUG:     ip  e9a72d00  sp  c057e7f8  lr  c56fd221  pc  c56fd1f0
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG: backtrace:
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #00 pc 000261f0  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #01 pc 0002621d  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #02 pc 000dd3d3  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #03 pc 00076c01  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #04 pc 00076c2d  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #05 pc 00074571  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #06 pc 0005e7d7  /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/lib/arm/libmapbox-gl.so
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #07 pc 00411a79  /system/lib/libart.so (art_quick_generic_jni_trampoline+40)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #08 pc 0040d575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #09 pc 003e6b79  /system/lib/libart.so (art_quick_invoke_stub+224)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #10 pc 000a1015  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+136)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #11 pc 001e5ae9  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+236)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #12 pc 001e05d7  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+814)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #13 pc 003e2661  /system/lib/libart.so (MterpInvokeDirect+196)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #14 pc 00400414  /system/lib/libart.so (ExecuteMterpImpl+14484)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #15 pc 003b7868  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/base.apk!classes2.dex (deleted) (com.mapbox.mapboxsdk.maps.renderer.MapRenderer.onSurfaceCreated)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #16 pc 001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #17 pc 001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #18 pc 001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #19 pc 003e1cef  /system/lib/libart.so (MterpInvokeSuper+1098)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #20 pc 00400394  /system/lib/libart.so (ExecuteMterpImpl+14356)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #21 pc 003b83d4  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/base.apk!classes2.dex (deleted) (com.mapbox.mapboxsdk.maps.renderer.glsurfaceview.GLSurfaceViewMapRenderer.onSurfaceCreated)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #22 pc 001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #23 pc 001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #24 pc 001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #25 pc 003e1cef  /system/lib/libart.so (MterpInvokeSuper+1098)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #26 pc 00400394  /system/lib/libart.so (ExecuteMterpImpl+14356)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #27 pc 003ae4ce  /dev/ashmem/dalvik-classes2.dex extracted in memory from /data/app/com.permobil.smarteval-InwI9vpywFWtqxXZ33ewaw==/base.apk!classes2.dex (deleted) (com.mapbox.mapboxsdk.maps.MapView$5.onSurfaceCreated+10)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #28 pc 001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #29 pc 001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #30 pc 001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
2018-10-16 10:57:05.297 7894-7894/? A/DEBUG:     #31 pc 003e23a3  /system/lib/libart.so (MterpInvokeInterface+1010)

From quick searching on mapbox repo here it looks like handling the app events might be a fix for this.
Testing out a few things in an app, if so, will provide PR to README with ways to handle.

I've had the same issue with the new version.
Found a workaround:
I have added the const applicationModule = require("tns-core-modules/application"); and registered the events :
applicationModule.on(applicationModule.suspendEvent, function () {});
applicationModule.on(applicationModule.exitEvent,  function () {});

both of them removing the mapview from the main view and with the resume event I'm readding the mapview to the mainview:
applicationModule.on(applicationModule.resumeEvent, function () {}

@stoanarrr Thanks for sharing! Brad and I were trying a similar approach with less luck. Can you share the actual implementation?
For others: roll back to 4.3.1 and you should be crash-free as well.

Hi @EddyVerbruggen and @bradmartin
Created a simple base project nativescript-mapbox-showcase.
Have a look into the home folder.
I think it's not the best solution, but it works fine for me.
Weird thing, on my Huawei P10 with android 8.0.0, without the workaround the map was redrawn automatically but the map listeners weren't working. With the workaround all works fine for me.
Hopefully I could help you ;)

@stoanarrr Thanks for sharing! Brad and I were trying a similar approach with less luck. Can you share the actual implementation?
For others: roll back to 4.3.1 and you should be crash-free as well.

Confirm roll back to 4.3.1 fixed crash issue. Thanks!

While switching between pages, app crashes to (as mentioned in issue #275), solution for me was, to listen for the "onNavigatingFrom" event (Page docs) and when it's triggered detach and destroy the map like I mentioned before.

Hey @EddyVerbruggen , I am also experiencing this same problem.
The reason I updated to 4.4.0 was because it seems that this version of the plug in fixes the bug where the app would crash while moving  as discussed in this issue https://github.com/EddyVerbruggen/nativescript-mapbox/issues/265.
If I downgrade to 4.3.1 to accommodate for the Android crashes, won't that mean I will experience the problems that were solved in 4.4.0 again?

@BMwanza - you are correct, downgrading would lose the fix for an issue that 4.4.0 corrects.
The solution, caused by Mapbox changing their native SDK, is to do what @stoanarrr suggested by destroying the map during a navigation event.

@bradmartin Oh man, wish they didn't change their Native SDK
I'm also experiencing my Android App crashing not only on the onNavigationFrom event, but also on the onPageLoaded event.
I am using a Tabview on my app, so I feel that I would also have to set an onPageUnloaded event to destroy the Mapbox there as well. But this if it's destroyed during the onPageUnloaded event, if the user selects the tab icon that had the page with the map loaded, it wouldn't appear on the screen anymore. I feel like it would be more beneficial for me to wait for stable release to fix rather than implement the work around for that reason.
Do you guys think MapBox will change their SDK to resolve this in the near future? Might just have to delay my Android Release

I've talked with Eddy recently and he said they change things a lot.
I'm not sure if they intentionally introduce changes without bumping their majors or if they follow semver to be honest. They're very responsive and helpful which is great and mapping is not an easy thing to do so I have respect for their engineers 😄.

Yes mapping definitely is not easy! Yes I have a lot of respect for their Engineers and as well as you and Eddy. I'm sure some solution will come shortly!

how are you guys detaching and destroying the map.  I called mapbox.destroy where mapbox is the ref element and it still crashes when i navigate from the page on 4.4.0

@stoanarrr is there any chance you could kindly share some code for what you describe?

@paul-muckypuddle sure!
Look here: mabox showcase

Has anyone come up with a permanent fix for this?

How we could destroy mapBox with NS+Angular?
mapboxdestroy() is not a function ERROR. So this method dos not exist.
Would appreciate any help.

I am running Android SDK 7.3.0-beta.2 and have been working to track this crash down.
It seems to be related to telemetry being enabled. If you enable the attribution and logo and click on the little (i) icon and opt out of telemetry it no longer crashes when pausing and resuming.
Repeat the test with telemetry enabled and it crashes immediately with a SEGV.

I think I have made some progress on this. Using a strictly native app I have verified that it does not crash even if a custom style is used.
There are a number of closed issues in the mapbox native issues list referencing the need to follow the recommended lifecycle hooks. I notice that the nativescript plugin does not.
So I've attempted to translate the working Java example into Nativescript as a test. Unfortunately, I am relatively new to both android and nativescript development so if you could take a quick look. I've put together a StackOverflow question and repositories for the source java example and an attempt at a nativescript translation:
https://stackoverflow.com/questions/55446126/how-to-translate-mapbox-gl-native-android-activity-example-java-app-into-natives

FWIW, I've managed to get a rough version of standalone Android NativeScript test app working.
https://github.com/Yermo/NsMapboxTest
So far I have not been able to get it to crash even after dozens of pause/resume cycles. At present, I do not know if this is coincidence or whether this demonstrates that the crash problem resides in the nativescript mapbox plugin code.
My strong suspicion is that the crash is not a mapbox bug but some kind of race condition on the nativescript mapbox plugin side.
For reference the corresponding Native Java test app is here:
https://github.com/Yermo/MapboxTest

Isn't this line here doing what is suggested so far?

@bradmartin, I'm not using the plugin in my test app. The whole point was to determine if there was something intrinsic to the Mapbox library that was causing the crash, or failing that, that there was something intrinsic to the NativeScript <=> Mapbox bridge.
The first test was to create a native Java app and to see if it crashes onPause/onResume. It does not.
The second step was to translate the Java app into NativeScript, as close as possible, to see if it crashes onPause/onResume. After dozens of iterations, it does not.
However, using the NativeScript Mapbox plugin I can reliably get it to crash within two or three iterations.
Hence, unless I am overlooking something obvious, there is something in the Nativescript Mapbox plugin that is causing the crash.
That was the whole point. Now the question is what is the difference?

From what I see, your NativeScript app isn't using the Mapbox library in any way. Just adding the dependency to gradle doesn't cause any of the APIs to be called or create an instance of a map. You have a ContentView in your app but there's nothing about mapbox related to the ContentView that I see on the repo.
Also, in the native/java android app, you are calling pause on the mapbox instance. Which is similar to what has been suggested with the mapbox plugin for nativescript. I found one of the mapbox developers explaining the issue here when someone ran into this issue with their native/java android app.
Which in the java app you posted, in the activitie's onDestory there is the code to destroy the mapbox instance, which is what has been suggested to do with the NS plugin since mapbox changed their SDK. Hopefully this helps us get on the same page so we can be sure about the approach and provide a "better" approach for NS devs using the mapbox sdk.

I am very new to both NativeScript and Android development and am somewhat out of my depth but coming up to speed quickly. I had hoped to avoid having to dive into the weeds.
The java code is verbatim from the Mapbox getting started guide.
The ContentView is not being used in the NativeScript test app only because I spent hours trying to figure out how to get a reference to it in activity.android.ts so I could make the map a child of that view. I punted on it. If you could provide me some pointers how to do that, I'd greatly appreciate it. See onCreate in activity.android.ts.
The whole point was to call that Mapbox SDK directly which I do in activity.android.ts. I'm trying to model a test app as closely to the sample android app from the Mapbox site so I could see if it crashes.
I have not been able to get it to crash.
Of course, since the map view is not a child of ContentView it's possible I'm side stepping the cause of the crash. Again, if you can provide me some pointers how to programmatically make the MapView a child of ContentView I'd appreciate it. (Not creating an XML component, but programmatically so we have access to the savedInstanceState for onCreate(). Or can that object be gotten some other way?.)
Also, the view hierarchy doesn't seem to be constructed by the time onCreate() is called in the activity so I've added a timeout callback as a hack. It's possible that's avoiding the crash.
If you run it, you'll notice that when it's put into the background it calls onSaveInstance() and onStop(). When brought to the foreground it calls onStart().
The map instance itself is not destroyed in this sample as onDestroy() never gets called.
I also notice that the map loads much quicker onPause/onResume. The SDK itself seems to be redrawing the map itself.
Using the Nativescript Mapbox plugin, there's a SEGV in some glthread onResume. Destroying the map and recreating it onPause/onResume seems to prevent the crash most of the time but takes too much time on resume, hence the desire to figure out why it's crashing and fixing it correctly.
At first I thought the crash was being caused by Telemetry because disabling that makes plugin based apps more reliable. Instead of crashing on the first pause/resume, it would sometimes go through 12 iterations before crashing, but it still crashes.
Just calling onPause in the plugin doesn't solve the crash in my tests here. I was thinking that maybe the crash is due to the fact that the plugin passes null to onCreate() instead of the savedInstanceState.
See here
The plugin also doesn't call onSaveInstanceState().
There are a bunch of threads in the android native issues list mentioning that the lifecycle hooks must be called otherwise the app will crash. That's what prompted this whole line of inquiry to start with.
So that's where I'm focusing my attention.
In the plugin MapboxView class, is there a way to hook into the activity callbacks somehow and also get the savedInstanceState there?
Or does that have to be done in a custom activity?

Now I see :)
So the mapbox android app code that you used verbatim doesn't crash because they are handling the lifecycle events and pausing/destroying the map which is what we need to do in NS when you use the plugin that uses the native SDK.
So this plugin does not handle the lifecycles for you. Mapbox SDK doesn't either, which is why in their sample app they are leaving it up to the developer to call the pause and destory methods on the map instance. That is what has been suggested here. With NativeScript you can hook into the pause and destroy events of an android activity. You would use the application core module and then use the suspend and exit event. Suspend is the pause of an activityand Exit is thedestroyof an activity. So in those events you could provide your instance of the map and call thepauseanddestroy` methods. As for navigation, it's a similar approach, you'd use the NS page/frame navigation events when leaving or returning to a page and calling the methods correctly.

Thank you for the pointers. I really appreciate it. Figuring out how all this stuff hooks together, starting essentially from scratch, has been quite a challenge.
I had looked at the application object.
The sample app calls onCreate with the savedInstanceState:
public onCreate(savedInstanceState: android.os.Bundle): void {
...
this.mapView.onCreate( savedInstanceState );

So at the point in the plugin where the map is being created, how do we get the savedInstanceState so we can pass it to mapView.onCreate()?
Also, I'm guessing:
AndroidApplication.saveActivityStateEvent,

is the analog of the activity onSaveInstanceState() method?

Sadly, calling the lifecycle methods does not fix the problem /if/ the map is added as a child to any component in the view. It will still freeze/crash on resume.
However, if the map view is added to the top of the hierarchy, as I am doing in my test app then it works exactly as the native app and it does not crash even through dozens of interations.
If I try to add the map below any tag in the view, whether using a mapView in a Fragment, a mapView directly in a placeholder, or even a SupportMapFragment, the app will freeze and crash on resume.
Destroying the map completely onPause by removing the tag completely (i.e. *ngIf="shown" or some such) and then rebuilding it all on resume does work but not 100% of the time and there seems to be a memory leak.
The mapbox documentation explicitly states that the map lifecycle events have to be called directly from the containing activity. I don't understand why that would have to be the case but even then it does not address this crash if added below any other tag.
I'm presently at a loss how to proceed tracking this down. I'd be grateful for any pointers.

Downgrading to 4.3.1 has stopped the crashing but the plugin no longer displays the userLocation.
Any suggestions? I've been stuck with this since Monday :(

What I have done in my angular app is to catch pause, exit, navigatingTo, navigatingFrom, and resume.
On pause, exit, and navigatingFrom, I destroy the map object.
On resume and navigatingTo I recreate the map from scratch.
It's a terrible kludge but it does seem to work. I have some test cases on github where I've tried to narrow down the cause of the crash but have not been successful yet.

I've noticed, that issue couldn't be reproduced if u use this.mapbox.show({...}) in your component.ts, instead of <mapbox> in your .html file. And it could the case, but I have no idea, how to create elements above the map when I create it with this.mapbox.show command.
Does anybody know, how to do that?

Any updates for this issue?

@ShyshkovOleg A possibile temporary workaround suggested by a friend of mine may be showing the MapBox tag using an *ngIf directive bound to a boolean variable which is set to false on suspendEvent and true to resumeEvent.

@ShyshkovOleg A possibile temporary workaround suggested by a friend of mine may be showing the MapBox tag using an *ngIf directive bound to a boolean variable which is set to false on suspendEvent and true to resumeEvent.

@ShyshkovOleg I did what you suggested and its working fine.
component:
...
showMap$ = new BehaviorSubject<boolean>(false);

constructor(private page: Page) {

        // required for hiding map
        applicationOn(suspendEvent, (args: ApplicationEventData) => {
            this.showMap$.next(false);
            console.log('showMap: false');
        });

        // required for showing map
        applicationOn(resumeEvent, (args: ApplicationEventData) => {
            this.showMap$.next(true);
            console.log('showMap: true');
        });
    }
...

and html:
<Mapbox *ngIf="showMap$ | async"
            accessToken="your token here"
            mapStyle="traffic_day"
            latitude="51.9280572"
            longitude="4.4201952"
            zoomLevel="7"
            delay="450"
            showUserLocation="true"
            hideCompass="false"
            disableZoom="false"
            disableRotation="false"
            disableScroll="false"
            disableTilt="false"
            (mapReady)="onMapReady($event)">
</Mapbox>

Tried *ngIf to conditionally show the map like above and mine is crashing whenever I route to another page or minimize / re-open the app. I suppose ill have to downgrade like everyone else as well although I need the tracking features as well...
    constructor(private page: Page) {
        applicationOn(suspendEvent, (args: ApplicationEventData) => {
            this.showMap$.next(false);
            console.log('showMap: false');
        });

        applicationOn(resumeEvent, (args: ApplicationEventData) => {
            this.showMap$.next(true);
            console.log('showMap: true');
        });

        this.page.on('navigatingFrom', (data: NavigatedData) => {
           this.showMap$.next(false);
        });
    }

I have this working like a champ in my fork using the current version of the Mapbox API however I am not using an async pipe. Just a boolean property and change detection. (NS Angular).


Allow variable_overwrites on scope level

This is a request for allowing to pass a dict of variable_overwrites to variable scopes which to be returned when tf.get_variable is called instead of the usual procedure, if they are provided, otherwise do the usual procedure. A simple example of this beahviour is:
    import numpy as np
    with tf.variable_scope("one"):
        a = tf.ones((5, 5), tf.float32)
        with tf.variable_scope("two"):
            x1 = tf.get_variable("x", initializer=np.random.randn(5, 5).astype("float32"))
            c1 = tf.sqrt(tf.abs(x1 + a))

    variables_overwrites = {x1._shared_name: c1}
    with tf.variable_scope("one", reuse=tf.AUTO_REUSE, variables_overwrites=variables_overwrites):
        a = tf.ones((5, 5), tf.float32)
        with tf.variable_scope("two"):
           // x2 here is in fact the value of c1
            x2 = tf.get_variable("x", initializer=np.random.randn(5, 5).astype("float32"))
            c2 = tf.sqrt(tf.abs(x2 + a))

This is particularly usefull for being able easily to bootstrap neural network parameters coming from inside the layers trough a standard function interface. My specific usage is for HMC for NN parameters. This is a question on whether you guys are interested in this so that I spend more time on doing this properly.

I believe you can implement this with a custom_getter. I would not want to add additional complexity to the already bloated variable_scope signature.

With custom getter you can implement it only if you replace all variables in that scope, there is no way to use a custom getter and also allow for get variables. Is it at least possible if the custom getter returns None to fall back to the other code?

If you implement your custom_getter, you can call the original getter in order to fall back on the existing method to make a variable. So you check your dict, return a special thing if your variable is in there, otherwise return whatever the getter you get in the first arg returns.

Thanks that indeed solved the issue. I was not aware of the custom_getter.


Doctests aren't being run on CI

Due to https://github.com/rust-lang/cargo/issues/8392

Fixed upstream


feat(server)!: use parcel watcher

Description
Decided to give https://github.com/vitejs/vite/issues/13593 another shot before deciding if we should fit it into Vite 5. But with the state of the implementation, I don't think it's feasible (for now).
This PR implements a hybrid @parcel/watcher + fs.watch approach, where the former is used for root recursive watching, and the latter for non-recursive watching. https://github.com/parcel-bundler/watcher/issues/92
It also implements chokidar's watcher interface for better compatibility. Ultimately it feels like I'm re-implementing chokidar and would be better as a standalone library, but it's easier to test this way for now.
Additional context
WIP TODO:

Implement unfinished API
Make sure it's compatible with chokidar

getWatched compatible
unwatch and add on the same path should continue watching
unlinkDir not correctly detected

Make tests pass
Update docs

What is the purpose of this pull request?

[ ] Bug fix
[x] New Feature
[ ] Documentation update
[ ] Other

Short FYI that also a polling solution is important (what Chokidar does with CHOKIDAR_USEPOLLING=1). I faced this again this week, running development under a VM with mounts to my desktop account. Such mounts don't usually pass change notifications, but the said env.var. has worked nice.

Closing this for now as I haven't got to finishing this and requires a large rebase. It would still be helpful for others who like to bring this across the line though. My notes about parcel watcher at https://github.com/vitejs/vite/issues/13593#issuecomment-1776906216 still remain.


Feedback for "Authentication Type JSON File"

https://help.sap.com/products/BTP/65de2977205c403bbc107264b8eccf4b/543fbd6103d746f19c410dc2092d6f5e.html?locale=en-US
Note the trailing comma
makes this JSON invalid
{
"systemName":"MY_SYSTEM",
"technicalUser":"technicalonboarder",
}
{
"systemName":"MY_SYSTEM",
"technicalUser":"technicalonboarder"
}

Hi @dvankempen,
Thank you for your feedback! The documentation has been updated. You will be able to see the change on SAP Help Portal after the next content update.


[GH-1092] Redirect the user to correct URL after login

Feature or Bugfix

Feature

Detail

Code which uses session storage to redirect user to the correct URL
As the code only contains window path ( not the domain / entire link ) and also there are checks to see if the window path mostly comprises of / and alphanumeric it it robust from security stand point

Relates

https://github.com/data-dot-all/dataall/issues/1092

Security
Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

Does this PR introduce or modify any input fields or queries - this includes
fetching data from storage outside the application (e.g. a database, an S3 bucket)? No

Is the input sanitized?
What precautions are you taking before deserializing the data you consume?
Is injection prevented by parametrizing queries?
Have you ensured no eval or similar functions are used?

Does this PR introduce any functionality or component that requires authorization? Yes

How have you ensured it respects the existing AuthN/AuthZ mechanisms? Yes
Are you logging failed auth attempts? N/A

Are you using or adding any cryptographic features? No

Do you use a standard proven implementations?
Are the used keys controlled by the customer? Where are they stored?

Are you introducing any new policies/roles/users? No

Have you used the least-privilege principle? How?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

As a suggestion for enhancement, related to the window path.
There can be a situation:

UserB send a link to UserA to a data.all resource
UserA wants to login and be redirected to this resource, but they are not authorised to see it. So, they see an error(which can disappear quickly, it's unconvenient to copy the error text) and a blank page.

May be UserA should be redirected to another "Access denied" page?

@TejasRGitHub Thanks!


fix: dc post restore script logic to delete disconnected pods

Add --all-namespaces flag to delete command. This should make CI more stable.

/test all

/test 4.13-operator-e2e-aws
/test 4.12-operator-e2e-aws
/test 4.11-operator-e2e-aws
/test 4.13-operator-e2e-gcp
/test 4.12-operator-e2e-gcp
/test 4.11-operator-e2e-gcp
/test 4.13-operator-e2e-azure
/test 4.12-operator-e2e-azure
/test 4.11-operator-e2e-azure

/retest

/test 4.12-operator-e2e-azure

/override ci/prow/4.13-operator-e2e-gcp
/override ci/prow/4.12-operator-e2e-gcp
/override ci/prow/4.11-operator-e2e-gcp

We changed the name of the script, but not the prow config... can someone trigger e2e run for me in this PR?

There is symlink to the old one to ensure it's compatible, because it's mentioned in many places in docs even outside of OADP repo.

/lgtm

/lgtm


running mender-luks-encrypt-image.sh multiple times doesn't work

Image won't boot if you encrypt/post-process it more than once.

some check that will fail if/when this doesn't work
make it work

probably need to check if it's already LUKs. If it is, reencrypt instead of encrypt.


Optional refractory period

Allow "threshold only" gating of synaptic events (and therefore postsynaptic currents). Currently, spike events are limited to positive-going threshold-crossing events. This behavior enforces a refractory period until the voltage of the presynaptic root compartment (i.e. the soma) goes back below the threshold voltage.
The kinetics of some models depend on a continuous/repetitive suprathreshold activation. To accomodate these, we need an option to repeatedly trigger suprathreshold events.

fixed by #56


getContents not returning css style inline

First of all, this is an awesome editor and thank you for the great work.
Version
I use the latest min.css and min.js
Use Chrome Version 112.0.5615.49 (Official Build) (x86_64)
Additional context
editor.getContents only return the html code:

lendapi

Hi there

this iis a test.

Great@@

line1

line2

line3

header1

header2

header3

header4

header5

1

2

3

4

greeat

The table border style and header style are not in the html code. This is not good I want to convert the html to pdf file. Without the table style, the PDF file looks different than the one in the editor.
Is it possible to add the style when I call getContents?

<thead style="box-sizing:border-box;-webkit-user-drag:none;overflow:visible;font-family:inherit;font-size:inherit;color:inherit;border-bottom:2px solid rgb(51, 51, 51);"
The table inline style is just one example, ideally I want to have all element style returned inline.
Maybe you can add a new function named getHtml() if this new change affects others.
Thanks again

You can use this option.
attributesWhitelist: {
    "all": "style"
}

@JiHong88 Great work on the editor. I'm also facing this issue. Even after adding
attributesWhitelist: {
"all": "style"
}
the getContents() function does not return the underlying css. For example, on adding a horizontal dashed line, the html tag that is generated is . On using getContents() and using the html elsewhere, it is displayed as a solid line.

Hi, I had the same issue. In the editor the images would be centered, but when I got the html using getContents() and rendered that html, the images would lose all their styling regarding alignment.
What worked for me was copying this css and using it in my app. I had to copy over this css, and give the div, in which I render the copied html, the classname "sun-editor-editable".
Maybe this isn't the cleanest solution, but it works for now.

It is not only this, in addition, getContents also converts whitelisted tags and removes classes.

Sehr geehrter Herr H......,

😀 😭

<address>signature...</address>

Result of getContents():

Sehr geehrter Herr H......,

😀 😭

signature...

@JiHong88 @AbdiasMichael
I could trace this issue back to the function cleanHTML -> _consistencyCheckOfHTML.
This removes any attributes and converts classes to p even if they are whitelisted.
Tested with: v2.45.1
pasteTagsWhitelist:'address|fieldset|message-separator',
addTagsWhitelist:'address|fieldset|message-separator',
attributesWhitelist:{'all': '*',},

input

<address data-signatur="69" data-type="long" id="ext-element-21" class="">signature</address>

output

signature

As workaround, I have added a getHtml function to the core.
						getHtml        : function (e) {
							return d.getHtml(e)
						},

						getHtml                            : function (t) {
							return e.element.wysiwyg.innerHTML;
						},

This also affects the insertion of HTML via the code view.
Because here the same function is triggered and the whitelist tags and attributes are also removed and converted.
You can reproduce this behavior with the following code.
paste this code to a fiddle "html-box" and run.
<link<EMAIL_ADDRESS>rel="stylesheet">

You will see, the "Hi Alex" will be converted to Hi Alex.
If you open the code view and paste my html, and switch back, the same happens.

To properly display the editor's contents, the parent element must have the "sun-editor-editable" class.
And the CSS related to the editor's content is in suneditor-content.css.
You must have both of these.
I thought this was the most reasonable way.
Are there any other alternatives?

@AbdiasMichael Settings related to style will be added in 3.0.0.
It will take several months.

I have switched to https://github.com/xdan/jodit/ it works much better than the suneditor.
It also looks like, you are missunderstanding the hole issue within this ticket.
Nevertheless, I wish everyone every success and that the problems are solved as quickly as possible.


[QUESTION] About Conversion MLIR Mesh dialect to Ccl ops

I found that Ccl dialect exists in this project to represent collective communication. But I have not found which dialalct will be lowered to Ccl dialect.

Is there any example to demonstrate the usage of Ccl ops ?
MLIR upstream Mesh dialect will be lowered to Ccl dialect, is there any plan ?

Thank you very much ~

If you use the ByteIR runtime, there is NCCL backend for the nvidia GPUs.
If you use other runtime or other hardware, you can lower ccl dialect to communication libraries based on the op semantics.
Mesh dialect in MLIR upstream is actually contributed by the ByteIR team.
Meah dialect uses semantics of virtual or physical mesh network topology, which is often used in distributed training/inference for easy abstraction, while ccl dialect use physical rank to practically performs the real communication operations.
We originally introduce mesh dialect for supporting TF and pytorch training framework.
However, due the current training framework shifts more to pytoch, and pytorch natively lacks some support of mesh and distributed abstraction at the moment we released mesh dialect, the ByteIR team decided to extend PyTorch ecosystem first in order to link mesh to pytorch later and make the ecosystem more practical.
The extension we built is called veScale, you can find in this link https://github.com/volcengine/vescale .
At the current stage, we haven't release the veScale version that can link ByteIR yet, but we will.

Thank for being interested in Ccl dialect and Mesh dialect.
If you use the ByteIR runtime, there is an NCCL backend for the nvidia GPUs. If you use other runtime or other hardware, you can lower ccl dialect to communication libraries based on the op semantics.
Mesh dialect in MLIR upstream is actually contributed by the ByteIR team. Meah dialect uses semantics of virtual or physical mesh network topology, which is often used in distributed training/inference for easy abstraction, while ccl dialect use physical rank to practically perform the real communication operations.
We originally introduce mesh dialect for supporting TF and pytorch training framework. However, due the current industrial training framework shifts more to pytoch, and pytorch natively lacks some support of mesh and distributed abstraction at the moment we released mesh dialect, the ByteIR team decided to extend PyTorch ecosystem first in order to link mesh to pytorch later and make the ecosystem more practical. The extension we built is called veScale, you can find in this link https://github.com/volcengine/vescale . Consequently, we postponed building mesh to ccl lowering and went to build veScale first. After veScale is solid, we will bridge ByteIR and veScale, and resume the lowering. After all, we need to have upstream use first, and then build a downstream tool. At the current stage, we haven't released the veScale version that can link ByteIR yet, but we will release it soon.

Great works ! Thanks for your reply about the roadmap.


Unable to resolve: android

Basically the problem is:

Android side of flutter project started to show errors in Android Studio

Application still runs in emulator without problems, iOS and Android.

Opening the Android Studio project from Flutter->Open android module on android studio also works and no red error marks.

Opening android folder on flutter project shows the following:

flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.3 18D109, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[✓] Android Studio (version 3.3)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.

Hi, just want to check if this is still a problem for you.

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.


Fix HTTPS issue and update to the last version of leaflet.js

Yes, the two commit have no relation but this plugin needs an update.

Thanks


move NormalizeSocialAssertion and AssertionParseAndOnly to RPC call

depends on changes in https://github.com/keybase/client/pull/13624. Once the client side is merged,  I will update the vendor hashes to match client master. In the client PR we are starting to add support for a dynamic set of proof services for generic social proofs. This changes how a bunch of previously static calls in the externals. package will work so instead of calling these methods directly we wrap them in RPC calls the service.

[x] vendor in master hashes

ran go tests locally, merging w/o CI so circle can not fail for others


Commit e74ac06fd1c03 introduces breaking changes

Parameters were added to functions, breaking downstream dependencies. eg:
.../go/pkg/mod/github.com/go-ldap/ldap/v3@v3.4.3/bind.go:500:96: not enough arguments in call to ntlmssp.ProcessChallenge

This just broke my builds.
I made an issue on https://github.com/go-ldap/ldap/issues/381

I had to downgrade to :
go get<EMAIL_ADDRESS>
to get my project to build. Added a comment to my go.mod letting me know not to upgrade:
require (
	// this version works - newer commits have breaking changes - do not update
	// github.com/Azure/go-ntlmssp v0.0.0-20211209120228-48547f28849e // indirect
	github.com/Azure/go-ntlmssp v0.0.0-20211209120228-48547f28849e // indirect
...
)

Given that there are no releases for this project (yet), is there any expectation of API stability?   Or is this just a heads up to users?

Since this broke other projects that depend on this it would be nice to have tagged releases or at least tag a 0.x.x version before breaking api.


Consistent place to put app-wide styles in web and mobile

Currently when you start a new app using {N} schematics you need to put your global web CSS in a styles.css file, and your global {N} CSS in an app.css file.
My suggestion is that we switch the {N} global file to styles.tns.css, and inject the appropriate code so that {N} uses that file instead of app.css. It’ll make this project structure a lot easier to explain to newcomers to this setup.

Hey @tjvantoll! Thanks for the suggestion!
The mobile app-wide css file is named app.css because the default webpack build is configured to use that name. Unfortunately, there is no easy way to change the name of the file. It requires modifying the webpack.config.js file and loading the renamed file manually. More specifically, it takes 16 additions and 6 deletions.
We've got a few options for implementing the change:

Change the default name from app.css to styles.tns.css only for  code sharing apps.
A possible disadvantage is that we will have to maintain a separate webpack configuration.

Exposing the app-wide css file name in nsconfig.json.
We can have a property in the nsconfig.json file that specifies the name for the mentioned file. Something like:

nsconfig.json
{
  "styles": [
    "src/styles.tns.css"
  ],
  "appResourcesPath": "App_Resources",
  "appPath": "src"
}

The value from nsconfig.json can be provided to webpack during build. However, if someone changes the name of the file, they will have to update the configuration file as well.
@tjvantoll, @vakrilov, @rosen-vladimirov, what do you think about these suggestions? Do you have other ideas?

Hey @sis0k0,
I think I like the second approach, since we’ve set that pattern as a way you configure other important paths in your {N} apps.
Overall, this is a nice-to-have and not a necessity, so I’d hate to see us introduce complexity just to get some consistency, but if we can get things done by adding a property to the existing nsconfig that we use for code-sharing apps then 👍 from me.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/63636

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/65689

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/65794

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/95317


More events

Added more events to fire off during the creation of the grid: layout-before-mount, layout-mounted, and layout-ready
Each is accessible via v-on from the

This is my first time around doing this. Let me know if there is anything I need to adjust or fix.

This will sove most of issues like #246 #150 and others.

@samuelmolinski Nice work!
Can you handle this #216  ?

Thanks, can you remove the dist files and package-lock.json from the PR?
Also, can you add the new events to the README?
Thanks

Sorry, didn't want to wait for you to fix, copied your code and pushed it, thanks for your help!


Feature: autoHeight property

Hi,
It'd be awesome to have an autoHeight property that dynamically resizes the container for images of varying heights.
Is this something that could be implemented in the future?
Thanks.

This would be a great addition!

Can you elaborate on that?
How would that be different from setting height: auto on the VueCarousel CSS class?

@danielbastos11 From what I can tell, setting height: auto on the VueCarousel class still leads to the height of the container being set to the height of the largest element. What I had in mind is for the container to resize depending on the height of the individual element.
@quinnlangille I'll try to look into it soon, thanks!

adjustableHeight Not working in Firefox

Hi @nattyluke, you can use height: fit-content, like below:

        ...

It works for me.

Hi @nattyluke, you can use height: fit-content, like below:
<carousel :adjustableHeight="true"> <slide :style="{height: 'fit-content'}"> ... </slide> </carousel>
It works for me.

Thanks a lot, it's worked for me too


Add support for masked_fill op

The current state of the TT-Metal op library does not have support for 'masked_fill' op. The request is to enable the support for the 'masked_fill' operation.
PyTorch description:
Fills elements of self tensor with value where mask is True. The shape of mask must be broadcastable with the shape of the underlying tensor.
We have a use case for this masked_fill op in the nanoGPT model.

Need support for masked_fill even for swin_s model.
cc: @saichandax

@saichandax @punithsekar does this OP need to run during runtime of the model?
For  every new input, you need to do a masked fill on a tensor with a value that's a variable?
Or is the value that you fill with a constant? Can this OP execute before the model runtime?


Test "unverified" app - "are you trying to sign in to app name? only continue if you downloaded the app from a store or website that you trust" prompt

Core Library
MSAL.js v2 (@azure/msal-browser)
Core Library Version
2.28.3
Wrapper Library
MSAL React (@azure/msal-react)
Wrapper Library Version
1.4.7
Public or Confidential Client?
Public
Description
Hi All,
I have created a test app in Azure ad. I have exposed permissions for reading user profile data and onedrive file contents. I am using msal-react 1.4.7. I had two apps, one was for only users belonging to the tenant and the other was for personal accounts as well. Please note that, at this stage, this is an unverified app. Just a test one. Whenever I try to sign in using a personal account it gives me a prompt which says "are you trying to sign in to app name? only continue if you downloaded the app from a store or website that you trust".
App type - Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)
Is this a result of the fact that I have not verified the app, or the scopes are dangerous or something wrong with the code?
I followed the tutorial from https://www.youtube.com/watch?v=7oPSL5wWeS0 (Microsoft 365 community channel) to do my POC.
Please let me know.
thanks
MSAL Configuration
{
    auth: {
        clientId: clientid,
        authority: 'https://login.microsoftonline.com/common',
        redirectUri: '/'
    },
    cache: {
        cacheLocation: 'localStorage',
        storeAuthStateInCookie: false
    },
    system: {
        loggerOptions: {
            loggerCallback: (level, message, containsPII) => {
                console.log(message)
            },
            logLevel: "verbose"
        }
    }
}

Relevant Code Snippets
No response
Identity Provider
Azure AD / MSA
Source
External (Customer)

@GodaProjects Is this a desktop app?

@GodaProjects Where is your app running? Mobile space? or in a standalone browser?

@GodaProjects Where is your app running? Mobile space? or in a standalone browser?

Standalone browser

@jasonnutter Any clues for me? thanks.

@yadhunandantg Can you please provide a screenshot of the message you are referring to? Also, a correlation id and timestamp of a login request for your app would be helpful.

@jasonnutter Here is the snapshot.

I have not configured logs. Should I do that?

@yadhunandantg What is your client id?

@jasonnutter
```
auth: {
clientId: 'd195d9b2-7615-4095-bf66-44c0713cde6d',
authority: 'https://login.microsoftonline.com/common',
redirectUri: '/'
}

@yadhunandantg It looks like this app is configured with localhost as the redirect URI? This prompt can be shown for requests made with localhost as the redirect URI, so I would not expect to see this prompt once you use a redirect URI for your own domain.

Thanks a lot Jason. That makes sense.  We can close this ticket now.
Regards,
Yadhu S
+919611306655
Cubyts Research Lab Inc.
https://www.cubyts.com
On Thu, 22 Sept 2022 at 23:31, Jason Nutter @.***>
wrote:

@yadhunandantg https://github.com/yadhunandantg It looks like this app
is configured with localhost as the redirect URI? This prompt can be
shown for requests made with localhost as the redirect URI, so I would
not expect to see this prompt once you use a redirect URI for your own
domain.
—
Reply to this email directly, view it on GitHub
https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/5216#issuecomment-1255369503,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A3AV25ZFMN6AV5DCD2AB773V7SNGPANCNFSM6AAAAAAQNNR33Y
.
You are receiving this because you were mentioned.Message ID:
<AzureAD/microsoft-authentication-library-for-js/issues/5216/1255369503@
github.com>

I am getting this error on mobile . Please help me with what wrong I am doing?


-l and -L don't seem to work correctly

Demo:
$ ag Done file
140695:Done :)
$ ag -L Done file
file
$ grep -L Done file
$

As you can see, ag -L incorrectly outputs file even though the file contains an occurrence of the pattern Done. grep -L behaves correctly in this regard.

#1075 sorry, just saw this. Duplicate issue.

I'd probably just comment on #1075 with your demo and then close this issue, just so there's not multiple issues tracking the same problem.


sporadic BindGroupLayout errors

After updating to the latest wgpu@main and pygfx@main I've been getting these sporadic errors. They are easiest to produce with the line_plot.py feature demo.
Sometimes they occur when the scene is first shown, i.e. immediately upon running the example. And other times they occur after interacting with the scene for a while or resizing the window.
wgpu-weird-2024-09-18_00.29.00.webm
A sample traceback when the scene is first shown:
Draw error
Traceback (most recent call last):
  File "/home/kushal/repos/wgpu-py/wgpu/gui/_gui_utils.py", line 77, in log_exception
    yield
  File "/home/kushal/repos/wgpu-py/wgpu/gui/base.py", line 135, in _draw_frame_and_present
    self.draw_frame()
  File "/home/kushal/repos/pygfx/examples/feature_demo/line_plot.py", line 98, in animate
    renderer.render(scene, camera)
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/renderer.py", line 531, in render
    command_buffers += self._render_recording(
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/renderer.py", line 661, in _render_recording
    render_pass.end()
  File "/home/kushal/repos/wgpu-py/wgpu/backends/wgpu_native/_api.py", line 2950, in end
    libf.wgpuRenderPassEncoderEnd(self._internal)
  File "/home/kushal/repos/wgpu-py/wgpu/backends/wgpu_native/_helpers.py", line 329, in proxy_func
    raise wgpu_error  # the frame above is more interesting ↑↑
    ^^^^^^^^^^^^^^^^
wgpu._classes.GPUValidationError: Validation Error

Caused by:
  In wgpuRenderPassEncoderEnd
    In a draw command, kind: Draw
      The BindGroupLayout with '' label of current set BindGroup with '' label at index 0 is not compatible with the corresponding BindGroupLayout with '' label of RenderPipeline with '' label
        Entries with binding 3 differ in type: expected Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(16) }, got Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(12) }
        Entries with binding 4 differ in type: expected Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(32) }, got Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(24) }
        Entries with binding 5 differ in type: expected Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(16) }, got Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(12) }

A sample traceback when using the controller:
Draw error
Traceback (most recent call last):
  File "/home/kushal/repos/wgpu-py/wgpu/gui/_gui_utils.py", line 77, in log_exception
    yield
  File "/home/kushal/repos/wgpu-py/wgpu/gui/base.py", line 135, in _draw_frame_and_present
    self.draw_frame()
  File "/home/kushal/repos/pygfx/examples/feature_demo/line_plot.py", line 98, in animate
    renderer.render(scene, camera)
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/renderer.py", line 531, in render
    command_buffers += self._render_recording(
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/renderer.py", line 661, in _render_recording
    render_pass.end()
  File "/home/kushal/repos/wgpu-py/wgpu/backends/wgpu_native/_api.py", line 2950, in end
    libf.wgpuRenderPassEncoderEnd(self._internal)
  File "/home/kushal/repos/wgpu-py/wgpu/backends/wgpu_native/_helpers.py", line 329, in proxy_func
    raise wgpu_error  # the frame above is more interesting ↑↑
    ^^^^^^^^^^^^^^^^
wgpu._classes.GPUValidationError: Validation Error

Caused by:
  In wgpuRenderPassEncoderEnd
    In a draw command, kind: Draw
      The BindGroupLayout with '' label of current set BindGroup with '' label at index 0 is not compatible with the corresponding BindGroupLayout with '' label of RenderPipeline with '' label
        Entries with binding 3 differ in type: expected Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(12) }, got Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(8) }
        Entries with binding 4 differ in type: expected Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(24) }, got Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(16) }
        Entries with binding 5 differ in type: expected Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(12) }, got Buffer { ty: Storage { read_only: true }, has_dynamic_offset: false, min_binding_size: Some(8) }

If I revert #852 then this disppears, but then the following error is produced when trying to run mesh_slice.py:
Device::create_render_pipeline error: Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
Draw error
Traceback (most recent call last):
  File "/home/kushal/repos/wgpu-py/wgpu/gui/_gui_utils.py", line 77, in log_exception
    yield
  File "/home/kushal/repos/wgpu-py/wgpu/gui/base.py", line 135, in _draw_frame_and_present
    self.draw_frame()
  File "/home/kushal/repos/pygfx/examples/feature_demo/mesh_slice.py", line 59, in animate
    renderer.render(scene, camera)
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/renderer.py", line 511, in render
    container_group = get_pipeline_container_group(wobject, environment)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 159, in get_pipeline_container_group
    pipeline_container_group.update(wobject, environment, changed_labels)
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 239, in update
    container.update(wobject, environment, env_hash, changed)
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 324, in update
    raise err
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 321, in update
    self.update_wgpu_data(environment, env_hash, changed)
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 400, in update_wgpu_data
    env_pipelines[pass_index] = self._compose_pipeline(
                                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 621, in _compose_pipeline
    return get_cached_render_pipeline(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/pygfx/pygfx/renderers/wgpu/engine/pipeline.py", line 109, in get_cached_render_pipeline
    result = device.create_render_pipeline(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/wgpu-py/wgpu/backends/wgpu_native/_api.py", line 1765, in create_render_pipeline
    id = libf.wgpuDeviceCreateRenderPipeline(self._internal, struct)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kushal/repos/wgpu-py/wgpu/backends/wgpu_native/_helpers.py", line 329, in proxy_func
    raise wgpu_error  # the frame above is more interesting ↑↑
    ^^^^^^^^^^^^^^^^
wgpu._classes.GPUValidationError: Validation Error

Caused by:
  In wgpuDeviceCreateRenderPipeline
    Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
      Shader global ResourceBinding { group: 1, binding: 1 } is not available in the pipeline layout
        Buffer structure size 1120, added to one element of an unbound array, if it's the last field, ended up greater than the given `min_binding_size`, which is 560
Device::create_render_pipeline error: Error matching ShaderStages(FRAGMENT) shader requirements against the pipeline
Draw error: Validation Error (2)

mesh_slice.py only works with the fix in #852, but line_plot.py breaks with that fix :sweat_smile:
wgpu info when running on my AMD GPU. I was also able to reproduce the issue on my Nvidia GPU.
██ system:

             platform:  Linux-5.10.0-21-amd64-x86_64-with-glibc2.31
python_implementation:  CPython
               python:  3.11.3

██ versions:

    wgpu:  0.18.1
    cffi:  1.16.0
    glfw:  2.7.0
   numpy:  2.0.1
   pygfx:  0.4.1
pylinalg:  0.4.1

██ wgpu_native_info:

expected_version:  <IP_ADDRESS>
     lib_version:  <IP_ADDRESS>
        lib_path:  ./resources/libwgpu_native-release.so

██ object_counts:

                      count  resource_mem

            Adapter:      1
          BindGroup:      0
    BindGroupLayout:      0
             Buffer:      2            40
      CanvasContext:      1
      CommandBuffer:      0
     CommandEncoder:      0
 ComputePassEncoder:      0
    ComputePipeline:      0
             Device:      1
     PipelineLayout:      0
           QuerySet:      0
              Queue:      1
       RenderBundle:      0
RenderBundleEncoder:      0
  RenderPassEncoder:      0
     RenderPipeline:      0
            Sampler:      0
       ShaderModule:      0
            Texture:      0
        TextureView:      0

              total:      6            40

██ wgpu_native_counts:

                  count    mem  backend   a  k  r  e  el_size

        Adapter:      1  2.03K   vulkan:  1  1  0  0    2.03K
      BindGroup:      0      0   vulkan:  0  0  0  0      368
BindGroupLayout:      0      0   vulkan:  0  0  0  0      320
         Buffer:      2    800   vulkan:  2  2  0  0      400
  CanvasContext:      1    592            1  1  0  0      592
  CommandBuffer:      0      0   vulkan:  0  0  0  0    1.04K
ComputePipeline:      0      0   vulkan:  0  0  0  0      288
         Device:      1  10.7K   vulkan:  1  1  0  0    10.7K
 PipelineLayout:      0      0   vulkan:  0  0  0  0      200
       QuerySet:      0      0   vulkan:  0  0  0  0       80
          Queue:      1    136   vulkan:  1  1  0  0      136
   RenderBundle:      0      0   vulkan:  0  0  0  0      848
 RenderPipeline:      0      0   vulkan:  0  0  0  0      560
        Sampler:      0      0   vulkan:  0  0  0  0       80
   ShaderModule:      0      0   vulkan:  0  0  0  0      808
        Texture:      0      0   vulkan:  0  0  0  0      888
    TextureView:      0      0   vulkan:  0  0  0  0      240

          total:      6  14.3K

    * The a, k, r, e are allocated, kept, released, and error, respectively.
    * Reported memory does not include buffer/texture data.

██ pygfx_adapter_info:

      vendor:  radv
architecture:
      device:  AMD RADV POLARIS10 (ACO)
 description:  Mesa 20.3.5 (ACO)
   vendor_id:  4.09K
   device_id:  26.5K
adapter_type:  DiscreteGPU
backend_type:  Vulkan

██ pygfx_features:

                                                                adapter  device

                                           depth-clip-control:        ✓       -
                                        depth32float-stencil8:        ✓       -
                                       texture-compression-bc:        ✓       -
                             texture-compression-bc-sliced-3d:        -       -
                                     texture-compression-etc2:        -       -
                                     texture-compression-astc:        -       -
                                              timestamp-query:        ✓       -
                                      indirect-first-instance:        ✓       -
                                                   shader-f16:        -       -
                                     rg11b10ufloat-renderable:        ✓       -
                                           bgra8unorm-storage:        -       -
                                           float32-filterable:        ✓       ✓
                                               clip-distances:        -       -
                                         dual-source-blending:        -       -
                                         buffer-binding-array:        ✓       -
                                     mappable-primary-buffers:        ✓       -
                                          multi-draw-indirect:        ✓       -
                                    multi-draw-indirect-count:        ✓       -
                                partially-bound-binding-array:        ✓       -
                                    pipeline-statistics-query:        ✓       -
                                               push-constants:        ✓       -
sampled-texture-and-storage-buffer-array-non-uniform-indexing:        ✓       -
                                                   shader-f64:        ✓       -
                                       shader-primitive-index:        ✓       -
                               storage-resource-binding-array:        ✓       -
                     texture-adapter-specific-format-features:        ✓       -
                                        texture-binding-array:        ✓       -
                                          texture-format-nv12:        ✓       -
                                     texture-format16bit-norm:        ✓       -
uniform-buffer-and-storage-texture-array-non-uniform-indexing:        ✓       -
                                      vertex-writable-storage:        ✓       -

██ pygfx_limits:

                                                  adapter  device

                                max-bind-groups:        8       8
            max-bind-groups-plus-vertex-buffers:        0       0
                    max-bindings-per-bind-group:    1.00K   1.00K
                                max-buffer-size:    2.14G   2.14G
          max-color-attachment-bytes-per-sample:        0       0
                          max-color-attachments:        0       0
          max-compute-invocations-per-workgroup:    1.02K   1.02K
                   max-compute-workgroup-size-x:    1.02K   1.02K
                   max-compute-workgroup-size-y:    1.02K   1.02K
                   max-compute-workgroup-size-z:    1.02K   1.02K
             max-compute-workgroup-storage-size:    32.7K   32.7K
           max-compute-workgroups-per-dimension:    65.5K   65.5K
max-dynamic-storage-buffers-per-pipeline-layout:        8       8
max-dynamic-uniform-buffers-per-pipeline-layout:       16      16
              max-inter-stage-shader-components:      128     128
               max-inter-stage-shader-variables:        0       0
                       max-non-sampler-bindings:    4.29G   1.00M
                         max-push-constant-size:      128     128
          max-sampled-textures-per-shader-stage:    8.38M   8.38M
                  max-samplers-per-shader-stage:    8.38M   8.38M
                max-storage-buffer-binding-size:    2.14G   2.14G
           max-storage-buffers-per-shader-stage:    8.38M   8.38M
          max-storage-textures-per-shader-stage:    8.38M   8.38M
                       max-texture-array-layers:    2.04K   2.04K
                        max-texture-dimension1d:    16.3K   16.3K
                        max-texture-dimension2d:    16.3K   16.3K
                        max-texture-dimension3d:    2.04K   2.04K
                max-uniform-buffer-binding-size:    2.14G   2.14G
           max-uniform-buffers-per-shader-stage:    8.38M   8.38M
                          max-vertex-attributes:       32      32
                 max-vertex-buffer-array-stride:    2.04K   2.04K
                             max-vertex-buffers:       16      16
            min-storage-buffer-offset-alignment:       32      32
            min-uniform-buffer-offset-alignment:       32      32

██ pygfx_caches:

                    count  hits  misses

full_quad_objects:      0     0       0
 mipmap_pipelines:      0     0       0
          layouts:      0     0       0
         bindings:      0     0       0
   shader_modules:      0     0       0
        pipelines:      0     0       0
 shadow_pipelines:      0     0       0

██ pygfx_resources:

Texture:  6
 Buffer:  25

Interesting! 🤔

Looks like minBindingSize can be 0 to avoid a check:

It seems to be the same intermittent CI error I encountered in #852.

I took a closer look, and this intermittent error appears to be related to the pipeline's caching mechanism. During update_bind_groups, the binding_layout_des changes—likely due to differences in min_binding_size introduced in #852. Occasionally, the pipeline does not rebuild correctly, though the exact cause is still unclear.

However, this also exposes another issue: #852 leads to a large number of unnecessary pipeline rebuilds in certain scenarios.
Let me explain.

When explicitly setting min_binding_size, this value must be greater than or equal to the size of the corresponding bound variable in the WGSL code. This differs for fixed-size arrays and runtime-sized arrays.

For example, array<vec2f, 3> requires a size of >= 24, which matches the resource.nbytes. Meanwhile, array<vec2f> only requires a size of >= 8, matching the resource.itemSize.

Of course, since nbytes is always greater than or equal to itemSize, using nbytes should technically meet the requirement. But the issue arises for runtime-sized arrays, where changes in the resource length trigger many unnecessary pipeline rebuilds (e.g., when updating geometry.position).

In essence, min_binding_size is determined by the shader code, and it’s difficult to infer directly from the resource (a ndarray). Currently, in pygfx, we always use fixed-length arrays for uniforms and runtime-sized arrays for storage buffers. So a quick fix might be possible here:
  if "uniform" in self.type:
      min_binding_size = resource.nbytes
  else:
      min_binding_size = resource.itemsize

but ultimately, this issue needs careful consideration and redesign.

Can you try #856 out?

What do you think about simply setting it to 0?

I believe it will work, even though the WebGPU documentation mentions that specifying its value can avoid checks during each draw command. However, for applications where extreme performance isn't the priority, this shouldn't be a significant issue.
That said, I also noticed some comments in the code and I'm unsure if the binding_layout object with the default min_binding_size can be compatible across different pipelines. If it's confirmed to be fine, I think it's ok :)

That said, I also noticed some comments in the code and I'm unsure if the binding_layout object with the default min_binding_size can be compatible across different buffers(I guess it can, but I can't be entirely sure, 😅 ).

Yeah, that's the part I'm a bit worried about. I can't remember the situation, but the fact that I wrote that down is an indication that at the time the layouts were not compatible. Maybe this changed ...

If it's confirmed to be fine, I think it's ok :)

I ran the examples and the tests. But that may not be enough to trigger the use-case :)

I can confirm that #856 fixes it! Will leave this open in case I see it again over the next few days

Ok, let's also do a release then :)

Will leave this open in case I see it again over the next few days

I prefer to close it, and reopen if the error resurfaces.


Should "Array of" be displayed for arrays of objects?

Hi,
If a property is an array of strings, ReDoc displays "Array of string" for the property. However, if the property is an array of objects, ReDoc just displays "object" or the title of the object (or the name of the model definition) - the text "Array of" is not displayed.
This can be quite confusing, because until you expand the property and see that it says "Array [ ... ]", the property looks identical to an object.
So would it be possible to display "Array of" for arrays of objects?
 Array of string
array2 . . . object
array3 . . . InlineObject
array4 . . . DefinedObject
It seems like this would be better:
array1 . . . . Array of string
array2  . . . Array of object
array3 . . . Array of InlineObject
array4 . . . Array of DefinedObject
Thank you for all your hard work and help!

@dwilding thanks for the detailed report. Will try to fix for the next release

array4 scenario stopped working since v2.0.0-alpha.6. Seems fine on alpha.5

All of these appear as "Array of object" for me... Seems weird.

I loaded up my original test spec in v2.0.0-alpha.17. I'm seeing:
array1 . . . . Array of string
array2 . . . Array of object
array3 . . . Array of object
array4 . . . Array of object


Question about per-token quant

Can you introduce how to perform per-token quantization on o_proj and  down_proj exactly?
https://github.com/AniZpZ/AutoSmoothQuant/blob/main/autosmoothquant/layers/nn/linear.py#L310
int8_weight, weight_scale = quantize_per_tensor_absmax(module.weight)
        if act_quant == "per-token":
            alpha = weight_scale

when  using per-token, the weight_scale is from quantize_per_tensor_absmax, this is a bit confusing for me.

"per-token" is not applied to weights, it applies to the activations of o_proj and down_proj. Weights always perform "per-tensor" for now.

"per-token" is not applied to weights, it applies to the activations of o_proj and down_proj.
Weights always perform "per-tensor" for now.

how can I perform partial quant like this ?

partial quant 1: only down_proj uses fp16
partial quant 2: both o_proj and down_proj use fp16

https://github.com/vllm-project/vllm/pull/1508#issuecomment-1805395214


Quantize job time and disk usage

Fixes #8174
First commit contains the utilitarian function, second contains the actual changes to the job factory.
We could quantize the memory usage too (by 250MB?), but then we need to make sure the MaxRSS follows the same rule (even though the global pool is broken already with its automatic rounding...).

test this please

test this please


Updated code example

Updated code example with correct format-table argument

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks

@JoeDavies-MSFT Please merge this PR. Thanks.

@JoeDavies-MSFT Please merge this PR. Thanks.


High CPU usage

I almost like this crate but run into the issue that it is constantly spinning in a loop (in line 307 I think) and using up an entire CPU core. Perhaps there could be function that I could call and it would return a buffer of Vec<Events> that happened between calls?

For an example, I would expect hardly no CPU usage from:
use std::{
    thread,
    time::{Duration, Instant},
};

fn main() {
    let receiver = winput::message_loop::start().unwrap();
    loop {
        thread::sleep(Duration::from_nanos(1_000_000_000));
    }
}

but see 7% usage on my 8 core machine

Yeah... I know about this problem.
The message loop works by getting in the middle of windows' message system. If I put delay in the loop to save cpu, every single event would also be delayed for the user (the message loop is also responsible for sending those events back to the other parts of the system when it receives them).
I'll try to look into it further.

I completely rewritten the whole message loop system. It works properly now :)
The new version is on crate.io


CI for AutoPilot clusters

Created cloudbuild-ap.yaml file to be used for another CB trigger to test deployments on AP cluster

/gcbrun

Also, is the plan to have a separate cloudbuild trigger for cloudbuild-ap.yaml? Will that be a blocking presubmit too?

Also, is the plan to have a separate cloudbuild trigger for cloudbuild-ap.yaml? Will that be a blocking presubmit too?

That's right. Running two parallel build jobs can save some time & can surface cluster specific errors.

/gcbrun

/gcbrun

/gcbrun

/gcbrun

/gcbrun

FYI: https://github.com/GoogleCloudPlatform/ai-on-gke/issues/402


Can't scroll .table-responsive on Android Chrome

Hi Team,
I'm using bootstrap version 3.3  for my project, looks like the horizontal scroll doesn't work on my android phone chrome browser(version: 51) when I have table-responsive above .table.
I have declared it right, followed stack-overflow as well.

</div

When I look at this page on my android phone(chrome browser), table is not rendered to width of 100%, more over the horizontal scroll doesn't show up at all.
While developing (OS: Ubuntu 14.0.4), I  installed a responsive plug-in on chrome, using that I tested the page on various devices, there the horizontal scroll shows up.
Tweaked the code too,
@media screen and (max-width:767px) {
  .table-responsive {
    width: 360px !important;
    margin-bottom: 15px;
    overflow-y: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    border: 1px solid #ddd;
  }
}
@media screen and (min-width:767px) {
  .table-responsive {
    width: 100% !important;
    margin-bottom: 15px;
    overflow-y: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    border: 1px solid #ddd;
  }
}

Still the scroll doesn't show up.
Any help on this would be really helpful

@sprakashg Can you reproduce with this JSFiddle (using the latest master): https://jsfiddle.net/e2kdco8y/?

Hi @RyanZim!
You appear to have posted a live example (https://fiddle.jshell.net/e2kdco8y/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

line 6831, column 1 thru line 6833, column 1: Saw < when expecting an attribute name. Probable cause: Missing > immediately before.
line 6831, column 1 thru line 6833, column 3: A slash was not immediately followed by >.
line 6831, column 1 thru line 6833, column 7: End tag had attributes.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

@sprakashg Can you reproduce with this JSFiddle (using the latest master): https://jsfiddle.net/e2kdco8y/1?
(I deleted my earlier post)

@sprakashg Do you mean Bootstrap v3.3.0 or v3.3.6? Also, what version of Android are you running?

Unable to reproduce with Bootstrap v3.3.6 in Android 5.1:
https://saucelabs.com/beta/tests/2f0b20581aec4ae6a2c7d1ed96e8f8de/watch

I'm using, Bootstrap v3.3.0 in Android 5.0.2

Please upgrade to v3.3.6.

Ok, will upgrade and let you know

I upgraded the version to 3.3.6, but still no good.

@sprakashg Can you post a reduced test case as a JSFiddle/JSBin demonstrating this problem?

@sprakashg Does the problem occur with http://getbootstrap.com/css/#tables-responsive too?

Hi Team,
Here is my JSFiddle link:
https://jsfiddle.net/e2kdco8y/13/
I have added bootstrap 3.3.6 version of css and my custom css. I tested it on my mobile, it works :)
But this is the exact code that runs on my applications, it's not responsive :(
Any heads-up on this, will be great.

Hi @sprakashg!
You appear to have posted a live example (https://fiddle.jshell.net/e2kdco8y/13/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

line 7178, column 9 thru column 40: Attribute ng-href not allowed on element a at this point.
line 7187, column 1 thru column 118: Attribute ng-controller not allowed on element div at this point.
line 7192, column 11 thru column 60: Attribute flash-message not allowed on element div at this point.
line 7196, column 15 thru column 201: Attribute ng-model not allowed on element select at this point.
line 7196, column 15 thru column 201: Attribute ng-options not allowed on element select at this point.
line 7196, column 15 thru column 201: Attribute ng-change not allowed on element select at this point.
line 7200, column 15 thru column 117: Attribute ng-model not allowed on element select at this point.
line 7207, column 17 thru column 241: Attribute ng-model not allowed on element input at this point.
line 7207, column 17 thru column 241: Attribute ng-disabled not allowed on element input at this point.
line 7207, column 17 thru column 241: Attribute ng-keyup not allowed on element input at this point.
line 7209, column 15 thru column 159: Attribute ng-click not allowed on element button at this point.
line 7211, column 15 thru column 187: Attribute tooltip not allowed on element button at this point.
line 7211, column 15 thru column 187: Attribute tooltip-position not allowed on element button at this point.
line 7211, column 15 thru column 187: Attribute ng-show not allowed on element button at this point.
line 7211, column 15 thru column 187: Attribute ng-click not allowed on element button at this point.
line 7215, column 15 thru column 125: Attribute ui-sref not allowed on element a at this point.
line 7215, column 15 thru column 125: Bad value submit for attribute type on element a: Subtype missing.
line 7222, column 12 thru line 7223, column 10: th start tag in table body.
line 7260, column 1 thru column 7: End tag for  body seen, but there were unclosed elements.
line 7187, column 1 thru column 118: Unclosed element div.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!
(Please note that this is a fully automated comment.)

Hi
Inside my live application, I have angular loaded in my index.html
So, these errors won't come up. However, I will modify the jsfiddle,
without angular attributes and post the link.
On 20-Jul-2016 7:22 pm, "twbs-lmvtfy"<EMAIL_ADDRESS>wrote:

Hi @sprakashg https://github.com/sprakashg!
You appear to have posted a live example (
https://fiddle.jshell.net/e2kdco8y/13/show/light/), which is always a
good first step. However, according to the HTML5 validator
http://html5.validator.nu, your example has some validation errors,
which might potentially be causing your issue:

line 7178, column 9 thru column 40: Attribute ng-href not allowed on
element a at this point.
line 7187, column 1 thru column 118: Attribute ng-controller not
allowed on element div at this point.
line 7192, column 11 thru column 60: Attribute flash-message not
allowed on element div at this point.
line 7196, column 15 thru column 201: Attribute ng-model not allowed
on element select at this point.
line 7196, column 15 thru column 201: Attribute ng-options not
allowed on element select at this point.
line 7196, column 15 thru column 201: Attribute ng-change not
allowed on element select at this point.
line 7200, column 15 thru column 117: Attribute ng-model not allowed
on element select at this point.
line 7207, column 17 thru column 241: Attribute ng-model not allowed
on element input at this point.
line 7207, column 17 thru column 241: Attribute ng-disabled not
allowed on element input at this point.
line 7207, column 17 thru column 241: Attribute ng-keyup not allowed
on element input at this point.
line 7209, column 15 thru column 159: Attribute ng-click not allowed
on element button at this point.
line 7211, column 15 thru column 187: Attribute tooltip not allowed
on element button at this point.
line 7211, column 15 thru column 187: Attribute tooltip-position not
allowed on element button at this point.
line 7211, column 15 thru column 187: Attribute ng-show not allowed
on element button at this point.
line 7211, column 15 thru column 187: Attribute ng-click not allowed
on element button at this point.
line 7215, column 15 thru column 125: Attribute ui-sref not allowed
on element a at this point.
line 7215, column 15 thru column 125: Bad value submit for attribute
type on element a: Subtype missing.
line 7222, column 12 thru line 7223, column 10: th start tag in
table body.
line 7260, column 1 thru column 7: End tag for body seen, but there
were unclosed elements.
line 7187, column 1 thru column 118: Unclosed element div.

You'll need to fix these errors and post a revised example before we
can proceed further.
Thanks!
(Please note that this is a fully automated
https://github.com/cvrebert/lmvtfy comment.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/twbs/bootstrap/issues/20248#issuecomment-233954349,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGg2hXuveq85_DTL-cTc7XqlruU91FOUks5qXigcgaJpZM4JF939
.

Hey there!
We're automatically closing this issue since the original poster (or another commenter) hasn't yet responded to the question or request made to them 14 days ago. We therefore assume that the user has lost interest or resolved the problem on their own. Closed issues that remain inactive for a long period may get automatically locked.
Don't worry though; if this is in error, let us know with a comment and we'll be happy to reopen the issue.
Thanks!
(Please note that this is an automated comment.)

Hi
I have the same issue,
scroll works on desktop browser but doesn't entirely work on mobile browsers


Support —global flag

I am not sure how to export and import global scope packages since they don't have global scope buckets.

I am not sure how to export and import global scope packages since they don't have global scope buckets.

You already do it, as global apps are installed in %SCOOP_GLOBAL%, aka %ProgramData%\scoop.

Handle global packages via https://github.com/Cologler/ScoopBackup-pwsh/commit/1982e290c5440cdb96ae3a9fa159c7d672123cae.
Readme is updated.


🎮 Game Request
I want to add color-crush-game using HTML CSS javascript.
Can you please assign me this task under GSSOC'23 contribution @kunjgit
Point down the features
Game points
-200 for the Wrong One
+30, +50  for the Right One ( it's depends upon the box length)
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @Kalivarapubindusree !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Hey @Kalivarapubindusree ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Key-frames

Hi,
I'm a student  and I'm trying to use MuJoCo for project.
I'm looking for some help with Unity plugin.
I have installed the MuJoCo plugin in Unity and have successfully import the model from MuJoCo xml. This is what I get so far:

I need to add the key-frames to it. I have 2 txt files, the first one is a list of time stamps, and the second one is the data of rotations of the joint for each key-frame. But I do not know how can I import those into the Unity in order to have the same animation that I had in MuJoCo. Is there any suggestions?

If you have the full qpos and qvel vectors of your keyframes, you can assign them to the MjData.
Quick example code (you have to call it after the MjScene has been initialized, a good way to do it is to use the MjScene callback functions).

public void SetMjKeyFrame(double[] keyFrameQPos, double[] keyFrameQVel)
{
    for(int i=0; i<keyFrameQPos; i++)
    {
        MjScene.Instance.Data->qpos[i] = keyFrameQVel[i];
    }

    for(int i=0; i<keyFrameQvel; i++)
    {
        MjScene.Instance.Data->qvel[i] = keyFrameQVel[i];
    }
}

public void TrackReferenceData()
{
    var curQPos = GetQPos(Time.fixedTimeAsDouble) ; // Function you need to define that grabs the best QPos vector from the reference data
    var curQVel = GetQVel(Time.fixedTimeAsDouble)  // Function you need to define that grabs the best QPos vector from the reference data
    SetMjKeyFrame(curQPos, curQVel);
}

You may load your keyframes with the text file parser of your choice (storing it in JSON might be swiftest). Create a MonoBehaviour that loads your keyframes and stores them in a ragged array, then subscribes the TrackReferenceData() function to MjScene.Instance.ctrlCallback.
Let me know if you have trouble with that, or if you have a huge amount of data that is not great to be stored with JSON.

@

I have several questions.
The first one is that the appoarch that I tried yesterday is to write a function that to assign the angle of each joint to the "Control" in MjActuator for each actuators at each key-frames. After I doing this, the humanoid can somehow moved (but with completely wrong motion), I am wondering is this also an appoarch to let it move? Or I should do something like you mentioned above?
The second one is that here are two errors that I get when I run the scene:

I am wondering is it caused due to I have not pass a MjData to it? If so, how can I do it to deal with this error and what should the MjData be? Should it be like "the full qpos and qvel vectors of keyframes" that you mentioned above?
Thank you so much for your help in advance!

Actuators are used for a different goal than keyframes. Actuators apply forces to the degree of freedom they are paired with, which results in continuous motion. Keyframes can be used to discontinuously jump to a given state. What kind of behaviour are you looking to reproduce/simulate?
As far as the error messages go: are they alone or accompanied by another error? You dont need to pass MjData to the creation of the components, that should be handled automatically. If another error prevented the setting up of the MjScene that could result in this error too.
Can you run a simple mujoco scenes (e.g. just a mujoco cube) with no issue?

I am trying to simulate the motion similar to the one in this project:
https://xbpeng.github.io/projects/InterPhys/index.html
The motion I have looks quite good in MuJoCo. However, I want to render it more fancy (like the one shown in that project video) and therefore I am trying to do so using Unity plug-in. But the data that I have is only a list of angles to each joint for each keyframe (from MuJoCo). Do I have to get the data of "the full qpos and qvel vectors" that you mentioned in order to do so?
For the error messages, that two messages comes together, and no any other error occurs, like this:

Yeah if you just want to play back a prerecorded animation then you need to set the qpos on every frame, you dont need to use actuators. Are those errors from a minimal scene? Just a mujoco cube, and an MjGlobalSettings.

No I haven't try that yet. If I wanna build a minimal scene, do I need to build it in mujoco first and then import it to unity? Or can I directly create it in unity?

Both can work, but perhaps the easiest way to ensure you have all components is to write a minimal xml and import it, then press play. If that doesnt run it might mean you have an issue with the mujoco.dll. It should be placed either in the Assets folder or the MuJoCo package folder, and should match the version of the package.

This is the data loader that I have so far:
`public class SetControl : MonoBehaviour
{
public TextAsset qpos;
public TextAsset qvel;
public double[] keyFrameqpos;
public double[] keyFrameqvel;
void Start()
{
    string qposText = qpos.text;
    qposText = qposText.Replace("\n", "").Replace(" ", "");
    string[] qposNumbers = qposText.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
    keyFrameqpos = qposNumbers.Select(double.Parse).ToArray();

    string qvelText = qvel.text;
    qvelText = qvelText.Replace("\n", "").Replace(" ", "");
    string[] qvelNumbers = qvelText.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
    keyFrameqvel = qvelNumbers.Select(double.Parse).ToArray();
}

public unsafe void SetMjKeyFrame(double[] keyFrameQPos, double[] keyFrameQVel)
{
    for (int i = 0; i < keyFrameQPos.Length; i++)
    {
        MjScene.Instance.Data->qpos[i] = keyFrameQVel[i];
    }

    for (int i = 0; i < keyFrameQVel.Length; i++)
    {
        MjScene.Instance.Data->qvel[i] = keyFrameQVel[i];
    }
}

public void TrackReferenceData()
{
    SetMjKeyFrame(keyFrameqpos, keyFrameqvel);
}

}`
I am wondering where and how can I call the TrackReferenceData().

I tried to call this like this but it failed, also I try to use ctrlCallback that you mentioned above, but I do not how to use ctrlCallback to call it. The only place that I found the ctrlCallback is here:

You can perform the subscription in your SetControl component's Start() function.
public void Start()
{
    //... Whatever came before

    // Subscribe our handler to the control callback
    MjScene.Instance.ctrlCallback += (_, _) => TrackReferenceData()
}

Also, I realized you might need to call MujocoLib.mj_forward(MjScene.Instance.Model, MjScene.Instance.Data) to make sure other parts of the data structure are updated to reflect changes to qpos and qvel. I added this change to the original comment.
You can remove the edits you made to MjScene. The callback, and all handlers that have been will be invoked at the location you identified, at each timestep.
Multiple handlers can be subscribed to the callback, thats why use the += operator; we add a new handler to the list of handlers executed when the callback is called. The callback supplies additional arguements to its handlers we don't need. Thats why I wrapped our method with (_, _) => TrackReferenceData() , which discards the two arguements.
I noticed you only load a single keyframe. Setting that on every timestep will just give you a static pose. If you just want to jump to that pose and let the simulation run, you don't need to subscribe to the control callback at all, you can just call your method at the frame you want the reset. If its on the very first frame, to guarantee that the MuJoCo scene is ready, you can subscribe the tracking method to MjScene.Instance.postInitEvent, which is called only once after the scene is initialized.
If instead you want to play back a series of keyframes (essentially an animation) you need an array of arrays of your qpos (and potentially qvel), and to use the ctrlCallback.
As far as the exception goes, if you still get it at start up you might want to downgrade to 2.3.7 for now, as I confirmed I get the same issue on 3.0.0. In anticipation to an issue you might run into with 2.3.7, you need to set the "Size" property of the MjGlobalSettings in the scene to -1.
Unsafe code does indeed need to be enabled, there is a checkbox in the player settings called "Allow unsafe code". You might need to expand some of the dropdowns.

Thank you so much! I have changed the code to have double[][] and handle the animation. This is what I get so far:
https://github.com/google-deepmind/mujoco/assets/93419666/dcd4833b-8175-4d2d-9d4c-5faf7ccf471d
which is much closer to the animation that I had in MuJoCo. But still have a few problems:
Part of the humanoid went to underground, which is not expected. Is it something wrong with my data or with my code or something else? Also, it's hand is kind of floating on the ground, but the animation that I had in MuJoCo is fine, why is it?
Also, I am still getting these two error messages:

I tried to do what you suggested before -- to load a simpler scene instead. I tried to loaded the balloons.xml that is provided in your repo of xml but I still get some other different errors:

I did copy the dll into the package folder like this:

Could you try downgrading to mujoco 2.3.7? Along with the 2.3.7 dll. Or are these results with that already? The way you added the dll to the package looks correct.

Yes, it works! No error messages any more and the animation looks quite good! Thank you soooooo much for your help!
I have another quite quick question. I am wondering is there any way to speed up the animation without changing the qpos and qvel? Or I can only do it by changing the data that I have?

The speed of the animation will depend on the ratio of Unity timestep (you can set this) and the original MuJoCo timestep you recorded. You can also apply a transformation on how you look up the data in your arrays (e.g. you can skip every other frame for twice as fast)
Glad it works!

Hi, I am wondering if is there any way to have two humanoids with different motion data in the same scene at the same time?


fix(services/obs): Service test failed for content mismatch

Close #959
Signed-off-by: Xuanwo<EMAIL_ADDRESS>

Obs doesn't respond to our issue, maybe we need to add features like read_with_offset and read_with_size? @JinnyYi

Obs doesn't respond to our issue, maybe we need to add features like read_with_offset and read_with_size?

I think it is feasible.

We will resolve this problem in https://github.com/beyondstorage/go-storage/issues/1016


How to increase/expand D:\ Drive easily?

When defining a pool, we can define data disk.
This data disk should be automatically attached and expand D:\ drive where application and working directory used by batch
If not, is there any way to easily increase/expand D drive?

The ephemeral disk cannot be expanded - the disk is local and static according to the VM size. You have a few options here:

Use a different VM with a larger ephemeral disk. Consult the Azure VM size documentation.
Copy your completed task data with the output file feature to Azure Blob Storage. Delete the task after it completes or set a retention time on the task.
Attach a data disk and copy your data to the data disk after your task completes, then delete the task or set a retention time on the task. Alternatively, your task can directly write to somewhere on the data disk while it runs.
Mount an Azure Storage File Share and perform similar actions as 3 above. Note that Azure File Share may not meet your performance requirements.

@alfpark thank you for your reply