Speed up TTR (time to recording)

An idea I had that could make Kap even nicer to use for quick Kaptures. Currently to record a simple gif you need to:

Click the kap icon in your menubar
Click the record button once to bring up the cropper
Position the cropper and press record
... export or do what you want

I propose we remove step 2 completely, and always have the cropper show as soon as the kap record window is shown, that way we save a click and make it so you can just:

Click the kap icon in your menubar (brings up the cropper too)
Position the cropper and hit record
... export or do what you want

I think https://github.com/wulkano/kap/pull/409 will solve this 🕵

Closing this now, if you're still interested in contributing to this @mrcolo you can see our progress so far on #223 at https://github.com/wulkano/kap/pull/450


Figure out the "history" screens, different views, and generate CSV

Users will have different use-cases, and we should need to adapt to their requirements.
Typically:
"Accounting view" with receive/spend
"transaction view" as in Bitcoin transaction
"detailed view" with fees, cancel, change, etc
We also should have a tool to extract a CSV for accounting purpose.

wrong tree, see GUI

wrong tree, see GUI


Segfaults on exit

I have written a personal finance application in Rust, using the gtk crate (and rusqlite for data storage). This is a re-write of a functionally identical application I originally wrote in C and have been using to manage my finances since 2013. I've been using the Rust version for about 6 months.
The problem I report here is that I am occasionally experiencing segfaults when I exit the application. Exiting the application occurs when the main window, which displays the tree of my accounts, is closed via the window manager. Here is the callback that handles that event:
// Set up callback to handle deletion of the accounts window
let globals_delete_event = globals.clone();
globals.accounts_window.connect_delete_event(move |_, _| {
    let mut non_zero_balance=false;
    let stmt:&mut Statement = cache_statement_locally!(UNBALANCED_TRANSACTIONS_SQL);
    for transaction_register in globals_delete_event.transaction_registers.borrow().values() {
        if stmt.query_row(&[&(*transaction_register.guid)], get_result!(f64)).unwrap() > EPSILON {
            non_zero_balance=true;
            break;
        }
    };
    if non_zero_balance {
        utilities::display_message_dialog("You have at least one open transaction register with a non-zero balance.
Please properly balance the transaction(s) before attempting to quit from Newcash", &globals_delete_event);
        Inhibit(true)
    } else {
        println!("Exiting Newcash");
        gtk::main_quit();
        // Let the default handler destroy the window.
        Inhibit(false)
    }
});

In the vast majority of the attempts to exit the application, non_zero_balance will be false and the block beginning with
println!("Exiting Newcash");
is executed. This is the case I'm concerned about. When the segfaults occur, "Exiting Newcash" gets printed prior to the crash. So I'm very suspicious that the issue is occurring in main_quit. I am happy to help debug this if you will make suggestions as to how to do so.
I should add that my C version of this application does not exhibit this behavior. It has a similar callback to handle closing of the main window.

Not sure why it crashes while C is not,
but if globals.accounts_window is main window then better do win.destroy()  instead gtk::main_quit(), see https://github.com/gtk-rs/examples/blob/master/src/bin/basic.rs#L24

Hm, I missed that we use gtk::ApplicationWindow in examples, so it may not work with normal window

As I know for debugging you can use usual gdb, only problem I see is need rbreak instead break due mangling.

I think I've found the culprit and it was me (although I would suggest that you document this if it turns out I'm right). Here's the theory:
For each of the windows my application creates, I create a struct, which I call a descriptor, that holds information about the window. In each case, I record the window (as returned from Window::new) and other related gtk objects, such as the view and the store. In some cases, I also use a scrolled_window.
But suppose, when I close the application using the window-manager close operation, the windows get deleted in the X world and the gtk world before those descriptors get released by Rust's memory management. If so, there are now pointers in those descriptors to gtk objects that have been deleted (which I believe will be followed by Rust memory management when the struct is de-allocated), because I provided no insurance that things would happen in the proper order.
What I've done is store those pointers in RefCelled Options (the structs can't be mutable because they are Rc-ed), e.g.,
pub struct RegisterCore {
    pub view:RefCell<Option<TreeView>>,
    pub window:RefCell<Option<Window>>,
}

and provided callbacks to handle the delete event for every window I create, which sets all these struct fields to None, thus causing any cleanup of the gtk objects pointed to to happen before the window actually goes away.
I just completed this modification to my application, so I don't have much experience with it yet (I tried a few different configurations of windows and then closed the application and got no seg-faults, which doesn't prove much, since the seg-faults did not happen deterministically in the first place). I will let you know as I continue to use my application whether I encounter seg-faults or, after what I consider a long enough test period, I do not.

Strange, Example with many structs by @mmstick use same idea as you previously and seems works without seg-faults.

Whatever is going on here, whether I've diagnosed the cause correctly or not, is definitely a race, because it did not happen every time with the un-modified version of my application. The timing of the example may be such that the probability of seg-faulting is lower than in my case. Obviously guesswork at this point.

Can you provide a complete testcase for reproducing the crash, and can you get a backtrace of the crash?

On Tue, 9 Oct 2018 at 14:04, Sebastian Dröge<EMAIL_ADDRESS>wrote:

Can you provide a complete testcase for reproducing the crash, and can you
get a backtrace of the crash?

I appreciate your trying to help, but it appears that you haven't read my
posts carefully enough.
First of all, as I've said before, the crash is intermittent; it does not
happen every time I exit my application. So I can't reproduce the problem
at will. Given that, I'm hardly in a position to provide you with a
"complete test-case".
Secondly, I described a fix to my code that would insure that all pointers
into gtk would be removed from the descriptor structs before allow gtk to
destroy windows. I have applied that change to my code and I mentioned in
my last post that some time needs to elapse without a crash to gain
confidence in the fix. Thus far, I've seen only one crash since my fix. And
that was after fixing an unrelated bug in my code, recompiling and
reinstalling, forgetting that I had an instance of the application running.
When I closed that instance, I got a seg-fault. I have no idea whether
re-installing the running executable caused the crash, but I can report
that overall, the seg-fault frequency is down dramatically. More time needs
to elapse to start to reach any conclusions as to whether I've solved the
problem.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gtk-rs/gtk/issues/713#issuecomment-428291623, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEzjJ0vLEQke_0zerJ0o2nQ668Vja652ks5ujOUfgaJpZM4XCg9o
.

I'll close this issue until we have more context. Don't hesitate to send it to us once you have more information!

On Tue, 9 Oct 2018 at 16:26, Sebastian Dröge<EMAIL_ADDRESS>wrote:

What you're describing above does not make much sense though. The objects
are all refcounted and your Rust structs own a reference to them. Even if
GTK is shutting down and the e.g. X11 resources behind the objects are
destroyed, the references to them would still be valid and it would be a
bug if a segfault would be caused by this.

The above is very helpful. Please clarify for me though -- obviously when
gtk is asked to create, say, a window, the object has a refcount of 1. When
gtk-rs returns that window as a result of a Window::new call, are you
saying the refcount is now 2, one for the pointer gtk handed to you and one
for the pointer you handed to me? If so, then I get your point  -- my "fix"
should not have been necessary and should have no effect.

So either there's something going wrong with the reference handling in the
bindings, or something goes wrong on the GTK side. In either case there's a
real bug to be solved here. Without a testcase for the crash (even if it
only happens once every 1000 times, let's just run it in a loop, or in
valgrind or with ASAN) or at least a backtrace of the crash there's not
much else I could help with then and you'd have to debug it yourself.

In any case, the "fix" you mention is more a workaround.

If the answer to my question above is 'yes', then I agree. In other words,
if the way I originally wrote the code, without trying to insure that the
descriptor structs held no references to gtk objects associated with
windows that were being destroyed, should have worked and that it doesn't
is the bug you are referring to above. One step I can try to take is to
revert my code to the way it was before I applied this fix and try to get a
backtrace in gdb.

Expect it to cause problems again sooner or later when something in the
environment or your application is changing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gtk-rs/gtk/issues/713#issuecomment-428338878, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEzjJ2LAiQhBhOnIzPbBLZ5PNWjRu2vlks5ujQaFgaJpZM4XCg9o
.

Not exactly as you describe it, but the idea behind it, yes.
When you create some GTK object from Rust, it will have a reference count of 1 on the C side and that single reference is what is passed to you and owned by you on the Rust side. If you clone() the object, the reference count will be increased, if you drop() it it will be decreased (basically the same as with Rc and Arc). Creating a button and adding it to some container, for example, would cause a reference count of 2 at the moment you add it to the container. The container increases the reference count to 2 because it keeps another reference around that is independent of the one you have, so the button stays around even if you get rid of your reference.
GTK might also keep more references to your objects around for other reasons, but that's all irrelevant. If you have e.g. a gtk::Window in Rust, then you own a strong reference to the object and it must be usable without segfaults until you get rid of that reference, independent of what GTK or other code is doing with that same object (unless of course that other code is buggy).

Thanks, let us know once you find something. That would be a really bad bug indeed and I'd like to see it fixed :)

But, ironically, the version written in memory-safe Rust segfaults; the C version does not. I completely understand that 'unsafe' means 'unsafe'. But there's a bug somewhere in gtk-rs + gtk that's causing this.

Well there are always bugs. The difference here is that for the Rust bindings (if it's indeed a bug there and not in GTK, which you simply might not hit in C because e.g. you drop the last references earlier already) we would have to fix this bug once, while in C every application again runs into the risk of this bug and any other kind of problem caused by manual memory management.

On Thu, 11 Oct 2018 at 02:46, Sebastian Dröge<EMAIL_ADDRESS>wrote:

Thanks, let us know once you find something. That would be a really bad
bug indeed and I'd like to see it fixed :)
But, ironically, the version written in memory-safe Rust segfaults; the C
version does not. I completely understand that 'unsafe' means 'unsafe'. But
there's a bug somewhere in gtk-rs + gtk that's causing this.
Well there are always bugs. The difference here is that for the Rust
bindings (if it's indeed a bug there and not in GTK, which you simply might
not hit in C because e.g. you drop the last references earlier already)

Your description of what I do in the C version is not quite right. But
let's talk about the Rust problem. My theory is that I have a struct that
contains a handle to a window returned from Window::new. The window gets
destroyed by the user and I am guessing that the destruction of the window
invalidates that handle. But in my original code, the struct and the handle
in it could outlive the window and therefore the invalidation of the
handle. So when Rust finally de-allocates the struct, I believe it also
de-allocates anything the struct owns, which would include the window
handle, which is now invalid, possibly leading to a seg-fault, depending on
the timing of things I don't know about. This is all supposition on my
part. Based on that supposition, I made all entries in the struct obtained
from gtk-rs calls Options, e.g., Option. In the callback for the
window destruction event, I set those slots in the struct to None before
exiting the callback with Inhibit(false). I believe that guarantees that
those slots are set to None before the actual destruction of the window
within gtk-rs and gtk. This has clearly improved the situation. In many
uses of the application, I have seen only one seg-fault, and that was in an
unusual situation, where I fixed a bug, rebuilt and reinstalled the
application, forgetting to first close the running instance of the
application where I noticed the bug. When I closed it, it seg-faulted. I
have no idea whether my pulling the table cloth out from under the dishes
was the cause of this or not. But it's the only seg-fault I've seen since
making the Option change. Before that change, they were much more frequent.
Moving on, you wrote that when I obtain a window handle from Window::new,
its refcount will be 1. In the original code, without the use of Option,
when a window gets destroyed, you seem to be arguing that because the
refcount is still one after the destroy has been fully processed, the
handle in the struct should still be valid, which invalidates my theory. So
I downloaded the latest stable copy of gtk and grepped (with find) all .c
files for the regexp "gdk_object_unref.*window". There were a lot of hits,
but I found one that really interests me. It's in gdk/gdk_window.c:
/**

gdk_window_destroy:
@window: a #GdkWindow

Destroys the window system resources associated with @window and
decrements @window's
reference count. The window system resources for all children of @window
are also
destroyed, but the children’s reference counts are not decremented.

Note that a window will not be destroyed automatically when its
reference count
reaches zero. You must call this function yourself before that happens.

**/
void
gdk_window_destroy (GdkWindow *window)
{
_gdk_window_destroy_hierarchy (window, FALSE, FALSE, FALSE);
g_object_unref (window);
}
Now I don't even know enough about the innards of gtk/gdk to be dangerous,
but this sure looks to me like it might get called when a window gets
destroyed. If so, it's decrementing the refcount. Based on our discussion,
that should result in a refcount of zero and deallocation of the internal
gtk/gdk data structure representing the window. I'm guessing that that is
precisely the data structure to which the handle in my Rust structure
points.
So I still think my theory is plausible and my experience with my fix based
on it seems to support it, though I have, as noted, seen one seg-fault
since applying the fix. I also do not have any idea why the original
problem was probabilistic. My Rust application is single-threaded and I
believe the application, gtk-rs and gtk/gdk are all running in that single
thread. But there's the window manager and the X server, both running in
separate processes. But I can't stitch together even a guess as to where
the race is.
/Don Allen

we would have to fix this bug once, while in C every application again
runs into the risk of this bug and any other kind of problem caused by
manual memory management.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gtk-rs/gtk/issues/713#issuecomment-428840302, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEzjJ1QMT2ktpK4DKCgRTq5tw_02iKI_ks5ujulcgaJpZM4XCg9o
.

See example below (no difference between calling window.destroy() explicitly or not: Inhibit(false) will cause it to be called directly anyway.
This is valgrind clean on wayland and X11, and the actual reference to the window is only dropped at the very end after the window is "destroyed". The function you mention about is called when the window is unrealized, which happens as part of that.
So you're right that it decreases the reference count and what I wrote about was a simplification. The GTK window will internally hold reference to the GDK window (not GTK window) for keeping track of the window and being able to handle X11/etc events on it. It will drop this reference once the GTK window is unrealized (which happens when it's closed/destroyed). GTK might also hold other references to the GTK (not GDK) window internally for keeping track of things, but that's all something that does not really concern us. The important part for us is that we own a reference to the GTK window, and we release that reference once we're done with it and will never use it again (which might be after the GDK window is destroyed, etc.). But even if we would hold an additional reference to the GDK window, there is no problem (try it, store window.get_window() somewhere and drop it at the very end). That's the whole point of reference counting after all, as long as you own a reference it is not gone :)
extern crate gtk;

use gtk::prelude::*;

fn main() {
    gtk::init().unwrap();

    // strong reference to the window here
    let window = gtk::Window::new(gtk::WindowType::Toplevel);

    window.connect_delete_event(|window, _ev| {
        println!("delete event");
        //window.destroy();
        gtk::main_quit();
        gtk::Inhibit(false)
    });

    window.connect_destroy(|_window| {
        println!("destroy");
    });

    window.show_all();

    gtk::main();

    // reference to the window is being dropped after
    // it was closed/destroyed
    println!("dropping window reference");
    drop(window);
}

A couple more comments, below.
On Thu, 11 Oct 2018 at 02:46, Sebastian Dröge<EMAIL_ADDRESS>wrote:

Thanks, let us know once you find something. That would be a really bad
bug indeed and I'd like to see it fixed :)
But, ironically, the version written in memory-safe Rust segfaults; the C
version does not. I completely understand that 'unsafe' means 'unsafe'. But
there's a bug somewhere in gtk-rs + gtk that's causing this.
Well there are always bugs. The difference here is that for the Rust
bindings (if it's indeed a bug there and not in GTK, which you simply might
not hit in C because e.g. you drop the last references earlier already)

If my main theory is right, in the C version, the pointers in the
descriptor struct will also outlive the structs they point to. The
difference is that in C, when the descriptor struct eventually gets
deallocated, there's nothing chasing those bad pointers over a cliff in a
futile attempt to de-allocate what they point to.

we would have to fix this bug once, while in C every application again
runs into the risk of this bug and any other kind of problem caused by
manual memory management.

I certainly accept the contention that over a universe of applications
written in Rust vs  the same applications written in C, all by a bunch of
random programmers, the Rust versions will have fewer bugs. But just as
it's possible for someone to smoke two packs of Lucky Strikes every day and
die from old age at 100, it's possible for a particular C application to be
more stable than the same application written in Rust. That is exactly the
situation here. I started work on the C version in 2012 and have been
managing my finances with it since early 2013. Sure, there were bugs early
on (and after adding new features), but they weren't difficult to find and
fix. I've also run it under Valgrind to check for memory leaks periodically
and have not found any. The thing is rock solid now.
But the Rust version is so much more readable and less cluttered (e.g.,
with casts between C's 14 different varieties of strings and the Rust
compiler telling you about unused things). So I'd really like to make this
work with Rust.
/Don

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gtk-rs/gtk/issues/713#issuecomment-428840302, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEzjJ1QMT2ktpK4DKCgRTq5tw_02iKI_ks5ujulcgaJpZM4XCg9o
.

On Thu, 11 Oct 2018 at 10:07, Sebastian Dröge<EMAIL_ADDRESS>wrote:

See example below (no difference between calling window.destroy()
explicitly or not: Inhibit(false) will cause it to be called directly
anyway.
This is valgrind clean on wayland and X11, and the actual reference to the
window is only dropped at the very end after the window is "destroyed". The
function you mention about is called when the window is unrealized, which
happens as part of that.
So you're right that it decreases the reference count and what I wrote
about was a simplification. The GTK window will internally hold reference
to the GDK window (not GTK window) for keeping track of the window and
being able to handle X11/etc events on it. It will drop this reference once
the GTK window is unrealized (which happens when it's closed/destroyed).
GTK might also hold other references to the GTK (not GDK) window internally
for keeping track of things, but that's all something that does not really
concern us. The important part for us is that we own a reference to the GTK
window, and we release that reference once we're done with it and will
never use it again (which might be after the GDK window is destroyed,
etc.). But even if we would hold an additional reference to the GDK window,
there is no problem (try it, store window.get_window() somewhere and drop
it at the very end). That's the whole point of reference counting after
all, as long as you own a reference it is not gone :)

Yes, I do understand what reference counting is about:-) My guess about
what's happening with my application is based on the supposition that the
reference count on one of the objects obtained from gtk-rs is going to zero
prematurely.
Your example below certainly works as one would hope, at least the small
number of times I ran it. But I would mention two things:

My experience with the seg-faults in my application is not
deterministic. They happen (with the original) only some fraction of the
time, < .5. So there's a timing issue here. The timing of your example may
be different, and more favorable, than my application.
I am dealing with multiple objects -- windows, views, scrolled windows,
stores, etc. that are pointed to by my descriptor struct and so each one is
vulnerable to a reference counting error. So my situation is somewhat more
complex than the example below.

extern crate gtk;
use gtk::prelude::*;
fn main() {
gtk::init().unwrap();
// strong reference to the window here
let window = gtk::Window::new(gtk::WindowType::Toplevel);

window.connect_delete_event(|window, _ev| {
    println!("delete event");
    //window.destroy();
    gtk::main_quit();
    gtk::Inhibit(false)
});

window.connect_destroy(|_window| {
    println!("destroy");
});

window.show_all();

gtk::main();

// reference to the window is being dropped after
// it was closed/destroyed
println!("dropping window reference");
drop(window);

}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gtk-rs/gtk/issues/713#issuecomment-428963597, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEzjJ9G5yRmDOP1z8dGAJ4S6ly51Fy4Pks5uj1CUgaJpZM4XCg9o
.

If my main theory is right, in the C version, the pointers in the descriptor struct will also outlive the structs they point to. The difference is that in C, when the descriptor struct eventually gets deallocated, there's nothing chasing those bad pointers over a cliff in a futile attempt to de-allocate what they point to.

There's no difference between C and Rust in that regard, apart from Rust calling g_object_ref() and g_object_unref() for you. You might have only (pseudo-)borrowed reference to your widgets in the C version though (or maybe you leak them?): e.g. in the following code
button = gtk_button_new();
gtk_container_add(container, button);
// the button reference is now owned by the container and
// the container will unref it at the end: see floating references
// that's what I mean with a (pseudo-) borrowed reference here.

The same in Rust would be equivalent to the following C code (if you look at the assembly output of an optimized Rust build, it's basically indistinguishable from this C code)
button = gtk_button_new();
g_object_ref_sink(button); // this is new
gtk_container_add(container, button);
// we now have a reference and the container, the reference
// count is at least 2 and we have to unref ours in the end
g_object_unref(button);

Yes, I do understand what reference counting is about:-) My guess about what's happening with my application is based on the supposition that the reference count on one of the objects obtained from gtk-rs is going to zero prematurely.

That's exactly my guess too. Either on the Rust binding side or in GTK, we'll see :)
Can you run your application (the sometimes crashing version) in valgrind with G_SLICE=always-malloc in the environment and --track-origins=yes --leak-check=no? Maybe that gives us an invalid read/write of already freed memory, for example. These don't always cause crashes but valgrind would at least complain about it. And running in valgrind also changes timing a lot, which might help.

I am dealing with multiple objects -- windows, views, scrolled windows, stores, etc. that are pointed to by my descriptor struct and so each one is vulnerable to a reference counting error. So my situation is somewhat more complex than the example below.

Ack, the example was only to make my point clear that there is no conceptual problem here and it's not a problem generally to have a reference to GTK objects as long as you want. There might just be a bug somewhere.

On Thu, 11 Oct 2018 at 11:50, Sebastian Dröge<EMAIL_ADDRESS>wrote:

If my main theory is right, in the C version, the pointers in the
descriptor struct will also outlive the structs they point to. The
difference is that in C, when the descriptor struct eventually gets
deallocated, there's nothing chasing those bad pointers over a cliff in a
futile attempt to de-allocate what they point to.
There's no difference between C and Rust in that regard, apart from Rust
calling g_object_ref() and g_object_unref() for you. You might have only
(pseudo-)borrowed reference to your widgets in the C version though (or
maybe you leak them?): e.g. in the following code
button = gtk_button_new();gtk_container_add(container, button);// the button reference is now owned by the container and// the container will unref it at the end: see floating references// that's what I mean with a (pseudo-) borrowed reference here.
The same in Rust would be equivalent to the following C code (if you look
at the assembly output of an optimized Rust build, it's basically
indistinguishable from this C code)
button = gtk_button_new();g_object_ref_sink(button); // this is newgtk_container_add(container, button);// we now have a reference and the container, the reference// count is at least 2 and we have to unref ours in the endg_object_unref(button);
Yes, I do understand what reference counting is about:-) My guess about
what's happening with my application is based on the supposition that the
reference count on one of the objects obtained from gtk-rs is going to zero
prematurely.
That's exactly my guess too. Either on the Rust binding side or in GTK,
we'll see :)
Can you run your application (the sometimes crashing version) in valgrind
with G_SLICE=always-malloc in the environment and --track-origins=yes
--leak-check=no? Maybe that gives us an invalid read/write of already
freed memory, for example. These don't always cause crashes but valgrind
would at least complain about it. And running in valgrind also changes
timing a lot, which might help.

I am dealing with multiple objects -- windows, views, scrolled
windows, stores, etc. that are pointed to by my descriptor struct and so
each one is vulnerable to a reference counting error. So my situation is
somewhat more complex than the example below.

Ack, the example was only to make my point clear that there is no
conceptual problem here and it's not a problem generally to have a
reference to GTK objects as long as you want. There might just be a bug
somewhere.

I've backed out my workaround and have made many attempts to provoke a
seg-fault and have not been able to do so. I am doing this on up-to-date
Arch Linux systems and this led me to check when the last update to gtk3
occurred. It's dated 2018-10-05, so very recently and pretty much
coinciding with the disappearance of the segfaults in normal use, which I
thought were due to my "fix". Maybe they fixed a bug? At this point, I
think the best strategy is for me to just use the application (without the
workaround) as I usually do and see if the problem recurs.
/Don

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/gtk-rs/gtk/issues/713#issuecomment-429008761, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEzjJ17TS7hI7u-5PVEXJW4j8U5iH-_9ks5uj2jYgaJpZM4XCg9o
.

Maybe there was a bug between those gtk releases, yes. Can you check which version you were running with the segfaults and which now?


[CODE TASK] Superfluous branches 'dev', 'main', 'release'

The Chullo branches include misleading branches that have not been updated in over 15 months.
All branches are behind 1.x (the three commits on main that are "ahead" have to do with branch renaming.)
Can we delete them?

Done.


[question] Fibaro Thermostat FGT001 - too many batteries

Hello, I'm migration from openzwave to zwavejs now.
I have fibaro thermostats FGT001. Such thermostat have external temperature sensors with it's separate battery. On openzwave I was able to see only two batteries (one for thermostat and one for sensor). With zwavejs2mqtt I can see three batteries ([5-128-x-level] Battery level, where x=0,1,2). And first two have same values - thermostats battery state.
As I understand the first one value is from single channel and the second one is from multi channel number one. I am developer and already made small commits to openzwave, but I have no good knowledge of z-wave protocol yet. I will appreciate if somebody could tell me if this problem can be fixed somehow - is there something in openzwave code which helps to avoid duplicating of such values.
I'm attaching node interview logs.
zwavejs_14580.log_2021-05-23.log
p.s.: also it seems that clock is not supported on this device while openzwave was able to show it.

@AlCalzone


Fix Slack icon

The Slack icon, when we're pushing notifications, is the default icon.

Solved with PR #47

Still doesn't work, maybe a vendor-sided issue?


Describe both recommended and default file structure in documentation

Commit 50a38b5 wrongly mentions this one.

Done in #312


Flatten musbehaves with multi-word fields.

What happened?
When querying a field from frontmatter that consists of multiple words, like Tea of the Day and flattening that with row["Tea of the Day"], the output does not acutally flatten. It doubles the output and still keeps the doubled bullet points.

In the given example I have two entries for the field Tea of the Day:

Sencha Yame-Cha (Kyushu)
Gyokuro Uji

DQL
LIST WITHOUT ID
	row["Tea of the Day"]
WHERE
	file = this.file
FLATTEN
	row["Tea of the Day"]

Expected Behaviour
For comparison, if i have a different field without whitespaces like Tea_of_the_Day and adjust the DQL accordingly:
LIST WITHOUT ID
	row["Tea_of_the_Day"]
WHERE
	file = this.file
FLATTEN
	Tea _of_the_Day

it results in the expected:

Dataview Version
0.5.64
Obsidian Version
1.5.2
OS
Linux

Solved it by the following query:
LIST WITHOUT ID
Tea
WHERE
file = this.file
FLATTEN
row["Tea of the Day"] as Tea
``


Add Migrating to Mill doc page

This is a manual playbook for running such a migration, that will likely be useful even in the presence of semi-automated scaffolding generators
Resolves https://github.com/com-lihaoyi/mill/issues/4036

One challange I sometimes had to port builds:
The existing build tasks rely on stamping all over the file system to collaborate between parts. Like Maven puts something in one place, then a webpack step picks up from these pieces and places its stuff yet in another place. And so on and so forth. Especially if tools (webpack, bazel, etc) then rely on 'implicit' paths to find configuration etc.
This are portable, but sometimes a bit a head ache. You can give up and do dirty writes outside the Task.dest but then get the more fragile builds. Or be somewhat creative on how to wire the tasks so these stuff works better in isolation.
Anyway, not sure how to formulate this at this point. Probably would need a public example of this tension.


[This is not issue..] hi, i branch boom with another option, another ouput

Thank you for this great boom~
I'm newbie in golang, and English
I made just for fun and learning golang
see https://github.com/heshed/boom

delete csv output
show option values
show stat per second
add -i input file (required... some stupid feature.. want to solve it)
read line and append URL at GET method
change output format
change histogram scale
change stats : second to millisecond

Closing this non-issue.


icmp: fix ExtendedEchoRequest extension object

RFC8335 1 Sec 2: "When applied to the ICMP
Extended Echo Request message, the ICMP Extension Structure MUST
contain exactly one instance of the Interface Identification Object."
The InterfaceIdent by name object seems to be a copy/paste issue.

Did you mean for this to be part of PR #23?

Did you mean for this to be part of PR #23?

As this is another issue as fixed with #23 I've opened a own PR.


typo: alrady -> already

@nschonni : Thanks for your contribution! The author, @, has been notified to review your proposed change.

@tfosmark : Thanks for your contribution! The author, @, has been notified to review your proposed change.


Bootstrap Node is not serving ignition files.  HTTP 500 error.  OKD 4.5 UPI & FCOS 32

OKD Version: 4.5.0-0.okd-2020-06-29-110348
FCOS Version: 32.20200615.3.0 (stable)
BootKube logs stop at:
Jul 01 17:11:14 okd4-bootstrap.deadpool.od4apps.com bootkube.sh[6440]: "99_openshift-machineconfig_99-worker-ssh.yaml": unable to get REST mapping for "99_openshift-machineconfig_99-worker-ssh.yaml": no matches for kind "MachineConfig" in version "machineconfiguration.openshift.io/v1"
Jul 01 17:11:15 okd4-bootstrap.deadpool.od4apps.com bootkube.sh[6440]: Created "99_openshift-machineconfig_99-master-disable-mitigations.yaml" machineconfigs.v1.machineconfiguration.openshift.io/99-master-disable-mitigations -n
Jul 01 17:11:15 okd4-bootstrap.deadpool.od4apps.com bootkube.sh[6440]: Created "99_openshift-machineconfig_99-master-ssh.yaml" machineconfigs.v1.machineconfiguration.openshift.io/99-master-ssh -n
Jul 01 17:11:15 okd4-bootstrap.deadpool.od4apps.com bootkube.sh[6440]: Created "99_openshift-machineconfig_99-worker-disable-mitigations.yaml" machineconfigs.v1.machineconfiguration.openshift.io/99-worker-disable-mitigations -n
Jul 01 17:11:15 okd4-bootstrap.deadpool.od4apps.com bootkube.sh[6440]: Created "99_openshift-machineconfig_99-worker-ssh.yaml" machineconfigs.v1.machineconfiguration.openshift.io/99-worker-ssh -n

Master is waiting for ignition:
[   ***] A start job is running for Ignition (fetch) (14min 9s / no limit)
[***   ] A start job is running for Ignition (fetch) (14min 12s / no limit)
[***   ] A start job is running for Ignition (fetch) (14min 17s / no limit)
[  *** ] A start job is running for Ignition (fetch) (14min 20s / no limit)
[***   ] A start job is running for Ignition (fetch) (14min 24s / no limit)

HTTP 500 error from Bootstrap Node
curl --insecure -v https://api-int.okd4-lab.deadpool.od4apps.com:22623/config/master
* About to connect() to api-int.okd4-lab.deadpool.od4apps.com port 22623 (#0)
*   Trying <IP_ADDRESS>...
* Connected to api-int.okd4-lab.deadpool.od4apps.com (<IP_ADDRESS>) port 22623 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* 	subject: CN=api-int.okd4-lab.deadpool.od4apps.com
* 	start date: Jul 01 16:46:52 2020 GMT
* 	expire date: Jun 29 16:46:54 2030 GMT
* 	common name: api-int.okd4-lab.deadpool.od4apps.com
* 	issuer: CN=root-ca,OU=openshift
> GET /config/master HTTP/1.1
> User-Agent: curl/7.29.0
> Host: api-int.okd4-lab.deadpool.od4apps.com:22623
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Content-Length: 0
< Date: Wed, 01 Jul 2020 17:15:58 GMT
<
* Connection #0 to host api-int.okd4-lab.deadpool.od4apps.com left intact

log-bundle-20200701131851.tar.gz

E0701 17:14:48.888053       1 api.go:131] failed to translate {master} config: failed to convert Ignition config spec v2 to v3: unable to convert Ignition spec v2 config to v3: Config has conflicting inodes: "File: /etc/containers/registries.conf" and "File: /etc/containers/registries.conf".  All files, directories and links must specify a unique `path`.

That's a dupe of #237, should be fixed by https://github.com/openshift/machine-config-operator/pull/1889

Not sure if it's the same issue, but it's the same error I'm still getting, and can't fetch the ignition file from the bootstrap node.
[core@bootstrap ~]$ curl --insecure -I https://api-int.dokd.ag04.io:22623/config/master
HTTP/2 500
content-length: 0
date: Wed, 29 Jul 2020 15:28:47 GMT

Was it resolved for the GA release?
Tried with both:
4.5.0-0.okd-2020-07-14-153706-ga

I0729 15:28:43.836646       1 bootstrap_server.go:64] reading file "/etc/mcs/bootstrap/machine-pools/master.yaml"
I0729 15:28:43.840066       1 bootstrap_server.go:84] reading file "/etc/mcs/bootstrap/machine-configs/rendered-master-c0a8758d72533a2c5cd1373e7f9a3124.yaml"
E0729 15:28:47.648191       1 api.go:133] failed to prepare {master} config: config version not supported: 7.69.1
I0729 15:28:57.187681       1 api.go:111] Pool master requested by address:"<IP_ADDRESS>:45434" User-Agent:"curl/7.69.1"

You'd need to set a different user-agent so that it would contain Ignition version, e.g. Ignition/3.1.0

Ignition/2.3.0 will work (3.1.0 is the config spec version, not the Ignition binary version that's in the User Agent).

Thanks, that did the trick! I was using curl in a wrong way to debug a seemingly broken bootstrap node, turns out the cloud providers load balancer was broken.


Allow empty-ish JSON values in group.GroupFeatures

The JSONField object inherits empty_values from django's base Field class, which defines it as [ None, '', {}, [], () ].  However, an entered JSON string of '[]' or '{}' will be interpreted as [] or {}, respectively, which will cause it to be evaluated as empty, which causes it to fail its validation for required, which is added when the field is defined as blank=False.
This change set allows a developer to control what JSON will be considered blank/empty.

Oops, just realized I did not assign this back.

Closing without merging, because #67 replicated these changes and merged in to 7.38.1.


npm install not installing some packages

Browser & Platform:
Ubuntu/Linux
Issue or Feature Request Description:
Running npm install did not install two packages needed by gulp documentation. Specifically gulp-sourcemaps and tmp.

Hmm, that's weird, as both of those are dependencies of other modules (vinyl-fs has gulp-sourcemaps as a dependency, and selenium-webdriver has tmp as a dependency), so they should have gotten picked up transitively as part of the npm install. That's what happened with me when I just tried it after blowing away my existing node_modules/.
But explicitly listing them as top-level dependencies is definitely a best practice. I can file a PR.

Is there a reason you closed this, @jpmedley? It's still a problem, right?
The PR to fix it wasn't merged yet, and once it's merged, it would have auto-closed this issue.


Inference for token classification.

Hi @uakarsh, I trained docformer on a custom dataset and got a checkpoint file. I have no idea how to perform inference on test images. Can you show me how to do inference on images or if possible share a code snippet for the same.

I found this Kaggle notebook to be really helpful. You may refer to the last section of notebook for inferencing.
Did you pre-train the model ? Several of us found the model to be overfitting on training data without prior pre-training. Could you share you observation regarding the same?


Problem dowloading GeoIP.dat.gz

When running bundle install, got that error
open-uri.rb:377:in `open_http': 404 Not Found (OpenURI::HTTPError)
GeoIP.dat.gz link is broken.
Ok sorry, my bad it's a GeoIP problem.

@organicweb : sorry the gem was broken again. it is fixed.


Filter/Search functions

search through functions to find the one you want.

Simple search in place.


Synonyms

Added real synonyms which will be created at index time (will require a re-index)

Coverage remained the same at 95.728% when pulling 1a0c79b1cdf712d45a5cdd0eb00411452519aa89 on synonymsChange into f00829339bd6576d25a0d371d81fb09bb05bbf31 on master.

Coverage remained the same at 95.728% when pulling c0f00b18baeb43366cdabeafa9342c75bacab64a on synonymsChange into f00829339bd6576d25a0d371d81fb09bb05bbf31 on master.

Coverage remained the same at 95.728% when pulling 91fcff0d2887b5cc17183ffd8b3388279fd9ccc6 on synonymsChange into f00829339bd6576d25a0d371d81fb09bb05bbf31 on master.


ENH: Added GeneLength semantic type

This PR was created to fix #42.

Added GeneLength type
Added GeneLengthFormat and GeneLengthDirectoryFormat
Added transformer from CARDAlleleAnnotationDirectoryFormat/CARDGeneAnnotationDirectoryFormat -> GeneLengthDirectoryFormat
Like described in #42, this type is needed for TPM and FPKM normalization methods, that will be implemented later (#23).

Download test file: gene_length.txt

Test it out!

qiime tools import --input-path gene_length.txt --output-path gene_length.qza --type GeneLength

Hi @misialq
Is the handling with the transformer correct like this?
So that my normalize function would take a GeneLengthDirectoryFormat as input.
Because I also saw that if i want to give a FeatureTable as an input somewhere i give directly the biom.Table. So maybe it would make more sense to write a transformer that converts to pd.Series directly, because this would be needed in the end by the normalize function.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c181f29) 93.36% compared to head (fe1d3a8) 93.76%.

:exclamation: Current head fe1d3a8 differs from pull request most recent head 6dce0d8. Consider uploading reports for the commit 6dce0d8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   93.36%   93.76%   +0.39%
==========================================
  Files          18       18
  Lines        1055     1122      +67
==========================================
+ Hits          985     1052      +67
  Misses         70       70

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

Hi @Sann5 :)
Could you review this PR for me?
It's a small one with just an added Semantic type.

Hey @VinzentRisch. I'll take a look! How urgent is this? Cus I have an important task that Michal left me atm. If its not urgent I would review this only after I'm finished with that.

No worries :)
I'll ask @ChristosMatzoros to do it.


Adds missing patterns and a screenshot

@darron just wondering if you've had a chance to look at this pull request yet? Thanks.

Sorry - have been traveling and didn't see this. LGTM.

Cool. Thanks!


Radar Graph styling is not applied

Setting a style e.g,
RadarSeries series = chart.addSeries("data", data, labels);
series.setLineWidth(5);
The line width is not applied as the BasicStroke is not used. It is missing in PlotContent_Radar doPaint.

Yes, it may be that the developer is missing. In the PlotContent_Radar.doPaint(Graphics2D g) method, forget to set g.setStroke(series.getLineStyle());
There may be very few people who care about this feature and have been discovered by you.


[DERCBOT-768] AI Orchestrator API - Check LLM/EM provider setting

I think we should rename the LLM Orchestrator project to AI Orchestrator.


Document positioning error within the API document by clicking on the sidebar button

[x] I've looked at the documentation to make sure the behavior is documented and expected
[x] I'm sure this is a Leaflet code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
[x] I've searched through the issues to make sure it's not yet reported

Steps to reproduce
Expected behavior

Current behavior

Environment

Leaflet version: 1.7.1
Browser (with version): Google Chrome
OS/Platform (with version): Windows10

#7972


RFC 2136: Dynamic updates

https://datatracker.ietf.org/doc/html/rfc2136

2.4.3 - RRset Does Not Exist
....
For this prerequisite, a requestor adds to the section a single RR
whose NAME and TYPE are equal to that of the RRset whose nonexistence
is required.  The RDLENGTH of this record is zero (0), and RDATA
field is therefore empty.  CLASS must be specified as NONE in order
to distinguish this condition from a valid RR whose RDLENGTH is
naturally zero (0) (for example, the NULL RR).  TTL must be specified
as zero (0).

These are normal RRs where the RDATA is cut off, CLASS is not important here.
This issue will detail how to make those and where this lib currently fails to do so (or for which RR types)

[x] Parsing with NewRR into RR with rdlenght=0
[ ] Making directly from struct
[ ] Setting Rdlength to zero yourself

this little test shows that all defined RRs parse correctly and give back an RR with RDLENGTH set to 0
package dns

import (
	"sort"
	"testing"
)

func TestUpdateNoRdata(t *testing.T) {
	ex := "example.org. IN "

	types := sort.IntSlice{}
	for i := range TypeToString {
		types = append(types, int(i))
	}
	types.Sort()

	for _, ty := range types {
		if uint16(ty) == TypeNone || uint16(ty) == TypeReserved {
			continue
		}
		name := TypeToString[uint16(ty)]
		str := ex + name
		rr, err := NewRR(str)
		if err != nil {
			t.Fatalf("Failed to parse %s: %s", str, err)
		}
		t.Logf("%s => %#v", str, rr)
	}
}

packing also works
func TestUpdate2NoRdataPack(t *testing.T) {
	types := sort.IntSlice{}
	for i := range TypeToString {
		types = append(types, int(i))
	}
	types.Sort()

	for _, ty := range types {
		if uint16(ty) == TypeNone || uint16(ty) == TypeReserved {
			continue
		}
		m := new(Msg)
		if _, ok := TypeToRR[uint16(ty)]; !ok {
			t.Logf("no new function for %s", TypeToString[uint16(ty)])
			continue
		}

		rr := TypeToRR[uint16(ty)]()
		rr.Header().Name = "example.org."
		rr.Header().Rrtype = uint16(ty)
		m.Answer = []RR{rr}
		t.Logf("msg: %s\n", m)
		_, err := m.Pack()
		if err != nil {
			t.Fatalf("error packing expected msg: %v", err)
		}
	}
}

With the few RR that don't have an actual type:
    update2_test.go:44: no new function for NXT
    update2_test.go:44: no new function for UNSPEC
    update2_test.go:44: no new function for ATMA
    update2_test.go:44: no new function for ISDN
    update2_test.go:44: no new function for IXFR
    update2_test.go:44: no new function for AXFR
    update2_test.go:44: no new function for MAILB
    update2_test.go:44: no new function for MAILA

(and maybe a few other that I forgot)

Adding TestNoRdataUnpack things get indeed a bit fishy:
diff --git msg_helpers.go msg_helpers.go
index acec21f7..270be228 100644
--- msg_helpers.go
+++ msg_helpers.go
@@ -202,6 +202,11 @@ func packUint16(i uint16, msg []byte, off int) (off1 int, err error) {
 }

 func unpackUint32(msg []byte, off int) (i uint32, off1 int, err error) {
+       // for dynamic update purposes this uint32 may not be there
+       println(off, len(msg))
+       if off+1 == len(msg) {
+               return 0, off, nil
+       }
        if off+4 > len(msg) {
                return 0, len(msg), &Error{err: "overflow unpacking uint32"}

this prints:
41 43
    update2_test.go:72: failed to unpack RR with zero rdata: SOA: dns: overflow unpacking uint32

so off=41 and len(msg) = 43, this is ineed a off-by-one, because we should have reached the end of the message.
Happens only for RR's that have an longer uint (uint32) as the first rdata field.
This hints in a problem with the packing


Implement UperReader for ScopedBitReader over Bits

Previous implementations of UperReader required that a user have an implementation of Bits or a handful of other types (some primitives) in order to get a UperReader instance.  However, the underlying implementation was designed to be generic over anything implementing ScopedBitReader.  This commit removes the hard reliance on Bits in favor of being generic over ScopedBitReader.  Users can now provide their own type implementing ScopedBitReader so and get their own implementation of UperReader.  This is useful for streams of data which may not be easily represented as a Bits.

Thanks!


Fix generation of FK insert statements with related model with auto increment key

During generation of the insert statement for a foreign key column, the related model should be saved before it's ID parameter is bound. This allows the ID to be the generated (in the case of inserting a related object with auto increment primary key) before it is used to the parameter list.  Fixes #557 fixes #377

great find. contributions like this make DBFlow a much better library.


[FEATURE] CLI to list module inter-dependancies

Add CLI support to list all the currently deployed modules that a single module is dependent on:
ex:  seedfarmer list dependancies -d <deployment> -g <group> -m <module> will return a table

Added, but list output is in a string, not a table


⚠ Bofrost.lu has degraded performance

In f3e9833, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1066 ms

Resolved: Bofrost.lu performance has improved in ed129ff after 18 minutes.


Add missing refresh token when rotate and blacklist app are enabled

The simplejwt package that this project uses has a rotate and blacklist option that are really nice and easy to use.
I found something missing in the dj-rest-auth in the token_refresh url.
If ROTATE_REFRESH_TOKENS setting is set to True and blacklist app is enabled the refresh token that's sent when you call the token_refresh url is blacklisted.
The issue is that there is no new refresh token cookie sent back to the client and since the previous refresh token was blacklisted the client can't make anymore request to the server.
This PR resolve that by creating and sending back a new refresh token as a cookie to the client.

Hey @SpicyPaper,
We recently merged a PR related to refresh tokens. Sorry for the late response, but would you mind rebasing those changes into your branch?
Thanks,
Michael

I'll try to do it asap @iMerica, ty!

Ok I checked with the new version of the master branch and apparently someone else also had this issue and resolved it.
I've tested the new master branch without my changes and it looks good.
I believe that my changes are not usefull any more :(
I close the PR!


Ensure compatibility with non-Windows platforms

Actually, only Windows x64 is supported as a C wrapper (the "plugin") is necessary to call the algorithms used from OpenCV.
The plugin should be build also for Windows x86, Linux, Mac, Android, iOS, UWP.
An alternative would be to replace to library with one of the following open-source project:

EmguCV
OpenCvSharp
OpenCV.NET

Added support of Linux: https://github.com/NormandErwan/ArucoUnityPlugin/releases/tag/v2.0.0

What steps are required to replace the library with EmguCV for utilizing this package on macOS?
I have been pointed to this repository from the Unity Virtual Production forums with regard to my ongoing search for a workflow (mimicking this Unreal Engine Workflow) for aligning real world environments with virtual environments.
I'm less computer scientist than storytelling creative. I stand on the shoulders of knowledgeable others to accomplish much of what I aim to accomplish - hence my desire for step-by-step directions (on how to replace windows specific components with cross-platform components such as EmguCV).
Will ArucoUnity (modified with EmguCV) be enough for aligning real-world environments with virtual environments (or will additional assets be required such as OpenCV for Unity)?


Link getProps with react-dom 16, warning: Invalid attribute name

Link getProps throws warnings
Using getProps in Link results in console warnings in development for react-dom "Warning: Invalid attribute name: 0"
Replicated here:
https://codesandbox.io/s/reach-router-starter-v1-14hk7
React-dom 16+ allows for arbitrary attributes, however this warning is at a minimum annoying and triggers testers.
Any advice?

@fred-king this is because when isPartiallyCurrent is false, you are returning a string instead of an object. Props have to be an object.
I'm going to close this issue as it's not a bug with the router. The only action item I could see here would be to log a warning if a user passes a type different than {} | null. If you think that would be beneficial, feel free to submit a PR!


Realtime point cloud visualization in Python

Required Info

Camera Model
{ R200 / F200 / SR300 / ZR300 / D400 }

Firmware Version
(Open RealSense Viewer --> Click info)

Operating System & Version
{Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS

Kernel Version (Linux Only)
(e.g. 4.14.13)

Platform
PC/Raspberry Pi/ NVIDIA Jetson / etc..

SDK Version
{ legacy / 2.. }

Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }

Segment
{Robot/Smartphone/VR/AR/others }

Issue Description
Hello, I am wondering if there is build-in code for realtime point cloud visualization in Python for realsense? Thanks.

If you prefer to generate the point cloud in Python within the SDK instead of using an external solution such as pyntcloud, the Python tutorial linked to below may be helpful to you.
https://github.com/dorodnic/binder_test/blob/master/pointcloud.ipynb

Check out Open3D
We will add a tutorial soon for that as well

[Realsense Customer Engineering Team Comment]
Hi ljc19800331,
Did you try what MartyG-RealSense suggested? Still need any help?
Thanks!

Oh sorry for the late update. I have solved the problem with open3d. Thanks for your help.
This is an interesting question and I high recommend to have an example of realtime colorized point cloud visualization in python similar to https://github.com/IntelVCL/Open3D/issues/473#issuecomment-431506955 or https://github.com/toinsson/pyrealsense/blob/master/examples/show_vtk.py


Add User data using restli exemple in doc doesn't work

In version 0.8.40
Describe the bug
When reading the documentation :
https://datahubproject.io/docs/how/add-user-data/#using-restli-api
If we try, it gives Error 404.
To Reproduce
Steps to reproduce the behavior:

Follow the documentation JSON curl query format.

Expected behavior
A user has been added into the data catalog

Solved,
Issue with authorization.


Add Linter

Add the google/gts linter to the project.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (bc2afe1) 61.39% compared to head (f284bec) 77.63%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #72       +/-   ##
===========================================
+ Coverage   61.39%   77.63%   +16.24%
===========================================
  Files          25        4       -21
  Lines         474      161      -313
  Branches       51       21       -30
===========================================
- Hits          291      125      -166
+ Misses        180       36      -144
+ Partials        3        0        -3

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


Expose AddArgument on tx interface

Thank you for contributing to Coraza WAF, your effort is greatly appreciated
Before submitting check if what you want to add to coraza list meets quality standards before sending pull request. Thanks!
Exposing the  AddArgument function allows the control of the arguments evaluated in a transaction.
Especially for custom protocols/library usage where it may not be possible for Coraza to get the raw body to parse. Having the add argument provides a way to add the arguments manually and still retail the behavior.

Make sure that you've checked the boxes below before you submit PR:

[x] My code includes positive and negative tests.
[x] I have an appropriate description with correct grammar.
[x] I have read Contribution guidelines, maintainers note and Quality standard.
[x] My code is properly linted and passes pre-commit tests.

Thanks for your contribution :heart:

Codecov Report
Base: 78.04% // Head: 78.04% // No change to project coverage :thumbsup:

Coverage data is based on head (eee19c8) compared to base (128e9a3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           v3/dev     #508   +/-   ##
=======================================
  Coverage   78.04%   78.04%
=======================================
  Files         145      145
  Lines        6861     6861
=======================================
  Hits         5355     5355
  Misses       1268     1268
  Partials      238      238

Flag
Coverage Δ

default
73.30% <ø> (ø)

examples
27.20% <ø> (ø)

ftw
55.54% <ø> (ø)

tinygo
71.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Shall we use three methods, for get, post, response? Or we could use constants

I'd rather have an enum (aka constants) for the first argument and
definitively not call it orig but method or something like that instead.
On Sun, 20 Nov 2022, 01:05 Juan Pablo Tosso, @.***>
wrote:

Shall we use three methods, for get, post, response? Or we could use
constants
—
Reply to this email directly, view it on GitHub
https://github.com/corazawaf/coraza/pull/508#issuecomment-1320996153,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXOYAXEAUETJURN7OKLZWTWJFTL3ANCNFSM6AAAAAASFFU2LM
.
You are receiving this because your review was requested.Message ID:
@.***>

@piyushroshan could you change the variable name to something like variableName or method? Also transform it into a constant int for get, post, and response.


[rocketmq_proxy] assert failure with untrusted buffer when onData()

Since documentation of rocketmq_proxy shows it is still an alpha version, and only accept trusted data, I think this is not a security issue, so I post it here.
The assert failure is here:
ASSERT(frame_length > header_length);
(https://github.com/envoyproxy/envoy/blob/master/source/extensions/filters/network/rocketmq_proxy/codec.cc#L40)
There is an assert() for input data. I think it should use an if-block to check the validity instead of using an assert:
if(frame_length <= header_length){
    has_error = true;
    return nullptr;
}

Even though it doesn't accept untrusted data now, in the future, all stable versions of network-layer filters should eventually accept untrusted data.  If the data is invalid(from untrusted sender or modified in the network), it will potentially cause a crash here.
Above is a possible fix for this issue. If anyone has a better idea, please let me know. I'm working on fuzz test for network-layer filters.
/cc @aaron-ai
/cc @samkerner
/cc @asraa

cc @lizhanhui @lizan

To reproduce this failure, this test case can be added to test/extensions/filters/network/rocketmq_proxy/conn_manager_test.cc
TEST_F(RocketmqConnectionManagerTest, AssertFailure) {
  const std::string yaml = R"EOF(
  stat_prefix: test
  )EOF";
  initializeFilter(yaml);
  buffer_.add(std::string({'\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00', '\x00'}));
  EXPECT_EQ(conn_manager_->onData(buffer_, false), Network::FilterStatus::StopIteration);
  EXPECT_EQ(1U, store_.counter("test.request").value());

  buffer_.drain(buffer_.length());
}

Since no other suggestions were proposed here, I'm going to make a pull request to fix it.


chore(jsonnet): update to 0.19.0

Updated go.mod and ran go mod tidy.
ref: https://github.com/google/jsonnet/releases/tag/v0.19.0

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


White spaces before open bracket is removed

VSCode Version:  1.9.1
OS Version: Windows 7

Steps to Reproduce:

I define a function in Javascript:
function myFunction () {

I press [Enter]

The space before the open bracket is suppressed, but I want to keep it.

Do you have "editor.formatOnType" enabled in your user / workspace settings?
Do you still see this behavior if you disable all extensions?

Yes it's enabled because I want the auto-formatting feature.
What do you meand by "disable all extensions"? Those you can see with [Ctrl + Maj + X]?

Well the formating defines how to treat the whitespace around the brackets but all of this should be confiurable.
So you should simply configure your formatter.
If that does not suite you you should install a custom formatter extension for javascript.

It's not a question it a feature request.


A POC for a Clowder Config Source.

%dev.use-clowder-source=true can be used to enable/disable for dev mode.

#17 is the way to go forward.


Anyway to manually rotate scrcpy view on PC without changing orientation on phone ?

From this other issue report (https://github.com/Genymobile/scrcpy/issues/2), I learnt that some Camera apps don't reinitialize (and thus scrcpy I presume doesn't detect orientation change), when shooting in landscape mode (when phone was initially in portrait orientation).
Is there some possibility to manually force only the view on PC to rotate (to landscape orientation), without impacting the device orientation ?
This will allow scrcpy view for camera (default camera app on stock Android) to show correct orientation. If camera app is closed and another app is started, I believe scrcpy can detect the right orientation to display, over-riding the previous manual view (not device) orientation change.

I used the desktop orientation as a workaround. It's not exactly practical, especially since it seems there aren't any keyboard shortcut to do that on my PC, but hey, it works.

Upvote this feature request.
For example, we can add "--output-orientation" or abbr "--oo" to scrcpy command:
scrcpy --oo  0         //default orientation
scrcpy --oo  1         //rotate 90 degrees
scrcpy --oo  2         //rotate 180 degrees
scrcpy --oo  3         //rotate 270 degrees

I used the desktop orientation as a workaround. It's not exactly practical, especially since it seems there aren't any keyboard shortcut to do that on my PC, but hey, it works.

Thank you for the idea. Since I use dual monitors your idea is a fast workable workaround for the meantime for recording and seeing landscaped videos properly as they are recording.
Another option for me when I need to record landscaped videos is to use Open Camera. The image is displayed correctly on screen but unfortunately records in portrait mode, regardless of phone orientation. But post-recording editing flips the videos back into landscape layout.  Is an extra step but better than not being able to see recorded landscaped videos in proper layout while recording if all a person has is a single monitor.
Scrcpy has not run into rotation issues on my phone in any other type of app so far. Only camera apps. Looking forward  to this forced rotation of the PC window without affecting the cellphone itself.

Created a pull request #1151 for the orientation (client) feature.
Cheers :)

A new option --lock-video-orientation has been implemented on dev branch, by #1151. :tada:

Please review #1274, which adds Ctrl+← and Ctrl+→ shortcuts to rotate the scrcpy window.

Released in v1.13.

wget https://github.com/Genymobile/scrcpy/archive/v1.13.tar.gz
wget https://github.com/Genymobile/scrcpy/releases/download/v1.13/scrcpy-server-v1.13
tar -xzpf v1.13.tar.gz
cd v1.13.tar.gz
meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=./scrcpy-server-v1.13
ninja -Cx
sudo ninja -Cx install
adb connect <IP_ADDRESS>:5555   #my cellphone ip
scrcpy
ctrl+→

The screen orientation on my computer is OK now.
Great thanks to  @Stamoulohta  for this client-only rotation feature.

The screen orientation on my computer is OK now.

@diyism Glad that your problem is solved :)

Great thanks to @Stamoulohta for this client-only rotation feature.

@Stamoulohta did a great work on mirroring orientation (#1151 --lock-video-orientation, that you could use instead if you want to record your game in the correct orientation), but I did the client-only rotation feature (#1274 --rotation, Ctrl+← and Ctrl+→) :wink:

Haha,  thank you for your fantastic work! @rom1v

Upvote this Feature Request, for version scrcpy 1.24 (07.01.2023)
if you wish to rotate the scrcpy output screen on PC,
for example, we can add "--lock-video-orientation=1" command:
--lock-video-orientation=0 //default orientation
--lock-video-orientation=1 //rotate 90 degrees
--lock-video-orientation=2 //rotate 180 degrees
--lock-video-orientation=3 //rotate 270 degrees
--lock-video-orientation=1
for most of the users

If it a desktop setting I'm not aware of, or was it updated to ALT + LEFT and ALT + RIGHT ? (scrcpy 2.3.1 ; Ubuntu 22.04)

@perrette Yes, the default shortcuts modifier has been changed a long time ago (since v1.15 by https://github.com/Genymobile/scrcpy/pull/1598).
https://github.com/Genymobile/scrcpy/blob/master/doc/shortcuts.md


switch back to CL_INVALID_MEM_OBJECT for clGetPipeInfo

Fixes #945.
This PR aligns the CTS feature consistency test with the spec changes in KhronosGroup/OpenCL-Docs#418, which originally specified that clGetPipeInfo should return CL_INVALID_MEM_OBJECT if pipes are not supported, but recently switched back to CL_INVALID_MEM_OBJECT for this case.

I fixed the error message - thanks Alastair! - and then fixed the resulting formatting issue.  If you reviewed previously, this was the only change.

I'm going to merge this, the only change since the initial reviews was cosmetic.


Version 2.4.1 crashes a lot

The new version is very unstable for me. It crashes from random clicks or searches or trying to add new tree. I add my debug.txt. For example I have a reproducable crash trying to open this URL:
debug.txt
http://poeurl.com/QMC

Same issue here. Whenever I create a new top level build and load a tree there is a high chance for a crash. For example I have a reproducible crash trying to load this tree on a new top level tree:
https://www.pathofexile.com/fullscreen-passive-skill-tree/AAAABAUBAQPuCaoMUg0fDXwOSA5cES8RUBGWEmkXHBhWGGoabBslHNwdFB1PHaodviL0Jogo-imLKwotHzLRM4c1uTwoQYdDyEVHRX5FnUZxSVFJsUuuTLNObU8EU1JWSFfJWAdboFxrXIpd8mh0aPJq-mwLbRlxeXgve9d8Dnzlf8aAMIKbgseDCYRIi4yPGo9Gj_qTJ5itmjua4Jtum6GcMpx7nL6drqEvpcSnCKcrp1WoubQMtzC4k76KwGbAmsHFw23K09Af1abXz9gk2VvZ_Npi2t3fhuGI5CLoWukC6rrr7uwY7TztYe-I7-vw1ffB99f5N_nd-ej-SQ==
debug.txt

This is a duplicate of #401 as far as I can tell.


Update Version numbers, README's, etc.

Description
Update Version numbers, README's, etc.
Tasks

[x] Update version numbers.
[x] Review if we can issue any releases.
[x] Update README's.

Done


Improve formatting

@charlierudolph @allewun @ricmatsui
Improves the formatting and sorts alphabetically

:ship:

Implemented in a7c608fd0461e7873e59f86adcb4fa389a1800cd


zsh completion

A good majority of the completion works with zsh if you put this into your .zshrc
autoload bashcompinit
bashcompinit
_get_comp_words_by_ref() { :; }
compopt() { :; }
_filedir() { :; }
eval "$(beet completion)"

Those dummy functions are AFAIK not yet implemented in zsh's bash completion wrapper; if you remove them from the .zshrc it will still work, but with annoying errors.

Interesting. Do you think we should detect whether we're running in bash and stub out those functions automatically? Or perhaps we should provide a --zsh flag that just drops those parts? Either way, contributions would be great.

I believe it's better to have one script if all you're doing is providing a dirty workaround like this (that way I only have to save one file in my home dir to source).  I think the best course of action is to leave the script as-is, and perhaps provide that code snippet in the documentation with a warning that it is a hack (until someone can provide native zsh commpletion, the zsh bash-completion support improves, or for all eternity).

Thank you! Instructions added.

This does not appear to support plugin options, at least in my case (tested with the duplicates plugin).

I think there might be a better way than defining dummy functions for the ones that throw errors, but I'm not sure.  In setting up completion for mosh in bash, there is a variable COMPREPLY, and setting it to () seems to be their way of sending error messages away from the shell, check it out here: https://github.com/andersk/mosh/commit/c2ff878d48092792123fef5777e1520598346b87
So, maybe there is something similar in zsh...


findOne with postgreSQL throws exception

What steps will reproduce the problem?
With a postgreSQL db call the ::findOne Method with a invalid column value.
E.g.: Customer::findOne(['id' => 1, 'age' => $customer->name]);
Column age is integer; wheras $customer->name is string
What is the expected result?
Calling the same findOne method as shown above with an mysql db, will return an empty ActiveRecord.
What do you get instead?
An exception: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer:
Additional info

Q
A

Yii version
2.0.11

PHP version
7.0.15

Operating system
ubuntu 16.10

postgreSQL
9.5.6

mysql
5.7.17

nginx
1.10.1

Well, that's how PostgreSQL works. Yii API forms a request, DB responds. If you have an idea on how to solve that, let us know in comments and I'll reopen the issue.

Ok i understand. I just thought calling api methods on different db will have the same result; wouldn't it be possible to catch the exception and return an ActiveRecord?

How do I tell if it's kind of real error or the case we have in this issue?

I got the point. alright, thanks for the clarification.

You're welcome.


Adding telnet to celeryworker

Description
Adding busybox-extras to the celery dockerfile

https://pkgs.alpinelinux.org/package/edge/main/x86/busybox-extras
https://github.com/pydanny/cookiecutter-django/blob/master/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile#L14

  # local debugging dependencies ( aka telnet )
  && apk add busybox-extras

Rationale
Allowing a user to then run something like:
# in the celery task

@celery_app.task()
def some_task(model_id: int):
     rdb.set_trace()

# in the shell of the local dev computer
docker-compose -f local.yml exec celeryworker busybox-extras telnet <IP_ADDRESS> 6902

Use case(s) / visualization(s)
$ docker-compose -f local.yml exec celeryworker busybox-extras telnet <IP_ADDRESS> 6902
-> pass
(Pdb) l
10 @celery_app.task()
11 def some_task(model_id: int):
12     rdb.set_trace()
13     pass
(Pdb) print(f"whats the model_id {model_id}")
whats the model_id 123
(Pdb) c
Connection closed by foreign host

extra note
If it's something that would be of interest let me know and I can try to open a PR.
Thanks for the great repo!

The links are for the Alpine distribution, however, we've recently switched to the Debian based python-slim image. Can you confirm whether this is still a problem with the new setup & possibly update the suggestion? Thanks

Haven't been able to test this. Closing.


build: add tasks for 'unit' and 'integration' tests

This PR adds two new tasks for both modules and engine-tests to run only either unit tests (gradlew unitTest) or integration tests (gradlew integrationTest).
To run all tests regardless of any tags use the default command gradlew test.
The descriptions of all tasks have been adjusted, and the new tasks were added to the "Verification" group (see gradlew :modules:tasks).
Resolves #4606

@mahela97 Have you had a chance to test this out?
Does it behave as you expect?
Is there anything unclear about how it's written?

@mahela97 Have you had a chance to test this out?
Does it behave as you expect?
Is there anything unclear about how it's written?

Yes, I tested it. There was one test case that failed because of gson but it happened because there is a problem with gson library in my environment. So I think it is fine.

Looks like it's working to me!
From these initial test runs, I expect we'll probably end up re-tagging some things, as the "fast" version of the omega module tests is far from fast right now. We'll figure out those details as we go; this sets us up with a good starting place.


Data loss issue when saving large data at once when using LokiFileSystemAdapter

I have a weird issue, that is when saving large amount of data in one shot at a time and in the mean time if I close the app or due to any other reason if the app gets closed, all the saved data are lost. This is happening only when I am using LokiFileSystem Adapter.
Before I was using localstorage of browser implementation of loki, for saving the data. As there is a limitation on the amount of data that can be saved on the browser, I moved to Loki FileSystem Adapter.
I have created a sample project here. In viewController if I change the value to 1000 and during save if I close the app, the size of the DB file created in the application folder is reduced to 0.
   `function insertData(n) {
        var insertingData = [];
        var iValue = n > 99 ? n : 0;
        var toValue = iValue + 1000; // Changed from 100 to 1000
        for (var i = iValue ; i < toValue; i++) {
            var insertDataSet = {
                Id: i, personId: i + 100, empId: i + 1000, name: i + "-TestPerson",
                address: i + "-Address"
            };
            insertingData.push(insertDataSet);
        }

        return insertingData;
    }`

To reproduce the issue

Hit the add button on the view to insert the data

On the second time click, add a BREAKPOINT near fs.root.getFile
`FileSystemAdapter.prototype.saveDatabase = function (name, data, callback) {
  fs.root.getFile( // Add a BREAKPOINT here
     this.options.base_dir + "/" + name,
  {
     create: true
 },
 function (fileEntry) {
     fileEntry.createWriter(
         function (fileWriter) {
             fileWriter.onwriteend = function () {
                 if (fileWriter.length === 0) {
                     var blob = new Blob(
                         [data],
                         {
                             type: 'text/plain'
                         }
                     );
                     fileWriter.write(blob);
                 }
             };
             fileWriter.truncate(0);
             callback(null);
         },
         function (err) {
             throw new FileSystemAdapterError("Unable to write file" + JSON.stringify(err));
         }
     );
 },
 function (err) {
     throw new FileSystemAdapterError("Unable to get file" + JSON.stringify(err));
 }
);
};`

Now close the app at the break point

If you look at the file size in the app folder its either 0 or a lesser value.

Kindly let me know if am I doing something wrong.

So you are creating your own persistence adapter to work with cordova and not using built in LokiFsAdapter right?

In node that might mean using the 'sync' versions of the fs methods but i'm guessing you can't use those.
If your problem was overlapping saves that would be easier to fix using throttledSaves loki option... but since your repro says to shut down the app I'm guessing you need synchronous adapter.

Yes I am using a custom adapter this one and also I tried using loki-cordova-fs-adapter this one.
Both I tried out, but in vain. Using both of them gives same issue of data loss on immediate close of application (Forcefully kill the app). Both the adapters uses truncate method of file writer, at that point if the app is closed data is lost completely because in both adapters fileWriter.truncate(0) is done.
`fileEntry.createWriter(
            function (fileWriter) {
                fileWriter.onwriteend = function () {
                    if (fileWriter.length === 0) {
                        var blob = new Blob(
                            [data],
                            {
                                type: 'text/plain'
                            }
                        );
                        fileWriter.write(blob);
                    }
                };
                fileWriter.truncate(0); // At this point while updating an existing file, its been truncated to 0 length then again created a new file.
                callback(null);
            },
            function (err) {
                throw new FileSystemAdapterError("Unable to write file" + JSON.stringify(err));
            }
        );`

Same thing is done in loki-cordova-fs-adapter.
`fileWriter.onwriteend = function () {
                        if (fileWriter.length === 0) {
                            var blob = _this._createBlob(dbstring, "text/plain");
                            fileWriter.write(blob);
                            callback();
                        }
                    };
                    fileWriter.truncate(0);
  // At this point while updating an existing file, its been truncated to 0 length then again created a new          file.`

Is there any solution for this?
As an alternative I tried using LokiFsAdapter, but was not able to include in the existing cordova project I was getting LokiFsAdapter not defined error.
Can LokiFsAdapter be included on an existing Cordova project? If so could you share a sample application link.

I am not very familiar with cordova, but techfort was... I believe we made the default persistence for cordova to be localstorage so perhaps not.
Well the synchronous vs asynchronous nature of each persistence method are probably the key issue.  After a brief search I see only localstorage as a synchronous option.  Are you tapping into any of the app lifecycle events available to you (Like here if that is still accurate)? Is that where you are firing off a saveDatabase?  How long does it take to save the amount of data normally?
Using loki in a web page with the (async) indexeddb adapter exhibits the same behavior... if you try to save 100megs of data in 5 seconds or so and you shutdown the whole browser your data will not have been saved correctly.
If cordova provides you a way to synchronously issue some command to delay shutting down the process you might force delay to allow async io time to complete but I am guessing hacks for environments I am not familiar with.
If anyone else knows if cordova lifecycle events and ability to guarantee safely persisting asynchronously, please chime in.


[Bug] | Guest User causes Wizarr to remove server access for everyone

Are you using the latest release?

[X] Yes, I am using the latest release.

Have you checked a bug report doesn't already exist?

[X] Yes, I have checked the existing bug reports.

What happened?
When I clicked to "Scan Users" I got a 500 error. Logging into Plex shows the server completely missing from my account. Restarting the Plex server fixes the issue. After disabling my Guest user, the issue seems to have fixed itself. I haven't scanned again, but it could just be an issue with me having a picture on my account.
Virtualisation
Unraid
What operating system are you seeing the problem on?
Windows
What browsers are you seeing the problem on?
Chrome
Project Location
Local
Bug Description
When I clicked to "Scan Users" I got a 500 error. Logging into Plex shows the server completely missing from my account. Restarting the Plex server fixes the issue. After disabling my Guest user, the issue seems to have fixed itself. I haven't scanned again, but it could just be an issue with me having a picture on my account.
Steps to Reproduce

Scan Users with Guest account enabled

Relevant Log Output
06:59:35 ERROR Exception on /api/users/310486303/profile-picture [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/views.py", line 109, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_restx/resource.py", line 46, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_jwt_extended/view_decorators.py", line 170, in decorator
    return current_app.ensure_sync(fn)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_caching/__init__.py", line 399, in decorated_function
    rv = self._call_fn(f, *args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_caching/__init__.py", line 175, in _call_fn
    return ensure_sync(fn)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/api/routes/users_api.py", line 52, in get
    picture = global_get_user_profile_picture(user_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/helpers/universal.py", line 238, in global_get_user_profile_picture
    return get_plex_profile_picture(user_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/helpers/plex.py", line 318, in get_plex_profile_picture
    user = get_plex_user(user_id=user_id, server_api_key=server_api_key, server_url=server_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/helpers/plex.py", line 220, in get_plex_user
    response: MyPlexUser = plex.myPlexAccount().user(user_id)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/plexapi/myplex.py", line 659, in user
    raise NotFound(f'Unable to find user {username}')
plexapi.exceptions.NotFound: Unable to find user 310486303
06:59:35 INFO <IP_ADDRESS> - - [2024-03-24 06:59:35] "GET /api/users/310486303/profile-picture HTTP/1.0" 500 383 1.088817

Just tested again, and it happened this time with no 500 error. The sever is completely removed from my dashboard. I have to restart Plex for it to show up again.


Mobiflight test mode in output shifter does not turn off last led when mode is turned off

Describe the bug
In recent tests with two output registers, Mobiflight test mode turned all 16 leds on in sequence correctly, but when test mode was turned off, the last LED being tested remains on.
Steps To Reproduce

Configure arduino board for output shift register with 8 leds (I actually did 16)
Create output configs for 16 leds
Press Test to initiate test mode
Note leds light up in sequence
Press Stop
Note last LED remains on.

Expected behavior
After turning off test mode, all LEDs should be off.
Actual behavior
Last LED remains on.
Details

MobiFlight Version: <IP_ADDRESS>
FlightSim: irrelevant
AddOn: irrelevant

Additional context
Recent test mode fix apparently did not catch this minor bug.

This is a firmware bug can you open this in the MobiFlight-FirmwareSource repo @JaimeLeon2? Thanks!

fixed by #878


build(deps): upgrade tower-http and centralize tower

I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Catch up tower deps.
Checklist

[ ]  I have written the necessary rustdoc comments.
[ ]  I have added the necessary unit tests and integration tests.
[x]  This PR does not require documentation updates.

This needs http 1.0 also.


chore(release): v1.3.0 🎉

:robot: I have created a release *beep* *boop*
1.3.0 (2022-11-25)
Features

resiliance: automatically recover from malformed cache files; just warn and move on (9bb3569)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ehmpathy/simple-on-disk-cache/releases/tag/v1.3.0 :sunflower:


about the audio recording :)

Hi guys,
First of all, I really thank you all about this software ,it is a very nice free tool to help me do many works .
I just want to know whether the audio recording feature is possible to be supported in the future ??
Many thanks for your reply :D

OBS works for me! Thanks for the recommendation @vatterspun

Im looking to record audio and format it in .MP4
Example to record a screenration with Teams voice/audio example.
Is that possible? @vatterspun If not which application do you recommand?

Is that possible? @vatterspun If not which application do you recommand?

Already covered earlier in the thread by @ericpyle -- OBS is the way to go.  I've tested it at length and it's just unbeatable.

ShareX is exactly what I was looking for.  Thank you for suggesting it.
ScreenToGif is amazing for GIF purposes.

I really would love to see this feature added to ScreenToGif - (ie ability to record audio while doing a screen cap , or even worst-case record after a cap and overlay the audio).
I get the argument that audio is not directly related to screen capture,  but if you all have the webCam functionality, i think its not a stretch to consider audio recording within the scope of this project (and within the scope of screen capture utilities).
In my case it was the difference between using just ScreenToGif as i frequently do,  and having to install another separate screen cap app (when i needed to do an audio recording + screen cap)  (not ideal)
thanks

@bob454522 I'm currently working on a complete rewrite to the app (adding support for multiple layers).
With that, I'll be possible to ass support for audio tracks more easily.


Dependency error google-chrome, though Chromium installed

Ubuntu, gives an error for dependency. It needs google-chrome to work. Enable it to work with Chromium at t least. They are essentially the same.

@mraduldubey  I have installed the google-chrome-beta through the given instruction as follow

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
apt update
apt install google-chrome-beta python3 wget
As it is provided in the README.MD and everything look fine

@mraduldubey provide us with an error message or something please, otherwise there's no way we can help you.

@pirate  Thanks. Though that would be 'chromium-browser' not 'chromium'. Thanks for the script. It's awesome.


Gif compression

5.6 -> 3.9MB (30%)
For the slow internet bois

THIS IS TO COMPRESS, FURTHER BEYOND.

Hi @ghostslayer989,
I'll close this issue since it's just the demo gif and could be frequently changed.


Should the TCK jars be published to Maven Central?

When we make a final specification, we will publish the results, including the TCKs, to https://github.com/osgi/materials. We will also publish the API jars to Maven Central as we have done in the past at the OSGi Alliance.
The question here is whether it make sense to publish the TCK jars to Maven Central.
Having the TCK jars in Maven Central can make it useful for implementations to include TCK testing in their builds since they can easily reference the TCK jars from Maven Central. But to run the TCK, you generally need more than the TCK jar itself. Our complete TCK build includes necessary supporting jars such as the proper JUnit and assertj jars required as well as bnd file which define the proper execution of the TCK.
So a build wishing to use the TCK jars from Maven Central to test an implementation would need more than just the TCK jars. The build would need to also provide all the other dependencies and configuration for proper TCK execution.

The question here is whether it make sense to publish the TCK jars to Maven Central.

I would be strongly in favor of deploying the TCKs. We would as suggest integrate it in our normal tests.

So a build wishing to use the TCK jars from Maven Central to test an implementation would need more than just the TCK jars. The build would need to also provide all the other dependencies and configuration for proper TCK execution.

Do we? It would be nice to have a batteries included version, so everybody can run them without any deeper knowledge. I would expect however that any decent software engineer will be able to setup a decent test with some dependencies. We might want to ask the Eclipse Fdn, but I don't think there is a requirement that TCKs cant have external dependencies.
I would love if we reach the state, where I only need to add the TCK and the supporting bundles to my workspace, throw it to the resolver and bnd runs the tests.
If I see it correctly, we need to do the following steps to achieve this goal:

Migrate the tests to run with the normal bnd test mechanism, instead of the hand crafted mechanism we use to install bundles
Define the set of required and allowed bundles (junit, assertj, OSGitest etc.)
Document the requirements and how we expect the tests to be run.

The TCK already uses the normal bnd test mechanism. The TCK jars include Test-Cases headers which bnd runtests command uses. The TCK jars have all the proper imports for the JUnit/assertj APIs they use, but you need more than that. You need to set the -tester, -runfw, -runproperties and also the -runbundles/-runrequires for the impl you want to test. That cannot all be pre-specified in the TCK build. The bnd files we build as part of the osgi.tck project are that documentation but they are NOT in the TCK jars we would put in Maven Central. They are in the osgi.tck project's jars which aggregate the TCK jars and supporting jars and bnd files.


⚠ ClamAV has degraded performance

In dfc5590, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 203 ms

Resolved: ClamAV performance has improved in bae19a0.


fix(cosmos): crypto amount validation fixes

Description

add validation on zero crypto/fiat amount
fix removing a one-char input defaulting to zero

Notice

[x] Have you followed the guidelines in our Contributing guide?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Pull Request Type

[x] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)
N/A
Risk
N/A
Testing

Continue button should be disable on cosmos stake/unstake with 0
Pressing the delete key on a single digit in staking should bring back empty input

Screenshots (if applicable)

I'd like to see the validation function pulled out into something like lib/math.ts and renamed to isGreaterThanZero with tests added.

Since the data that comes in is already sanitized, and we just return a call to bignumber.js API, wouldn't tests effectively just tests the BN API?
I can see the value of abstracting it into its own util however, but as a reusable crypto/fiat amount validation function: if it's going to live in lib/math and be named something general purpose like isGreaterThanZero, I'd probably just stick with the current implementation, else we end up rewriting bignumber.js


Tumor deformations

Hi, thank you for your excellent work.  This work is really meaningful and seems to indeed solve the clinical challenges.
However, I have the following questions and hope to figure them out.
First, is there any deformation between the pre-operative and follow-up scans? As shown in Fig.2 of your paper, I guess that there are no severe deformations because most parts are aligned between the pre-operative and follow-up scans. But the results show that the tumor has a large deformation. So I worry about the rationality behind it.
Second, if we get the forward prediction ubf, why the inverse transformation ufb is not -ubf? Maybe it doesn't need another prediction?

Hi @lajipeng,

First, is there any deformation between the pre-operative and follow-up scans? As shown in Fig.2 of your paper, I guess that there are no severe deformations because most parts are aligned between the pre-operative and follow-up scans. But the results show that the tumor has a large deformation. So I worry about the rationality behind it.

Ans: Yes, the main source of misalignment is caused by tumor's mass effect and tumor resection. Since the pre-operative and follow-up scans are pre-affine registered to a standard atlas. You will observe there are only little affine misalignments such as translation and rotation etc. However, the non-linear deformation between the pre-operative and follow-up scans cannot be resolved by the affine/rigid registration, which is the main goal of this work. Yet, in some extreme cases, the misalignment can be up to ~30 mm. For more details, you may refer to the BraTS-Reg dataset, which is publicly available at https://www.med.upenn.edu/cbica/brats-reg-challenge/.

Second, if we get the forward prediction ubf, why the inverse transformation ufb is not -ubf? Maybe it doesn't need another prediction?

Ans: The inverse transformation of ufb is not as trivial as -1*ufb. This paper  (see Figure. 1) offers a great explanation about the fallacy of true inverse transformation. Moreover, due to the missing correspondence problem caused by tumor mass effect, the groundtruth deformation field of the tumor region is absent/not well defined in general. In our approach, we aim to maximize the similarity between the regions with valid correspondence while ignoring the similarity measure in regions with absent correspondence in order to alleviate the impact of the tumor mass effect on the registration.

@cwmok Thanks very much. I get it~


Fix t3c reload and updPending unset

Fixes t3c to do an ATS Reload and un-set the update-pending flag
for various things that need them, matching ort.pl.
No docs, no changelog, no tests, t3c is still experimental and in-development.

[x] This PR is not related to any other Issue

Which Traffic Control components are affected by this PR?

Traffic Ops ORT

What is the best way to verify this PR?
Run t3c with changes to a header rewrite in TO and nothing else, without this fix t3c won't do a Service Reload or un-set the Update Pending flag. With the fix, it does both.
If this is a bug fix, what versions of Traffic Control are affected?
Bug fix, but t3c isn't stable for production use yet.

master
5.0.0

The following criteria are ALL met by this PR

[x] This PR includes tests OR I have explained why tests are unnecessary
[x] This PR includes documentation OR I have explained why documentation is unnecessary
[x] This PR includes an update to CHANGELOG.md OR such an update is not necessary
[x] This PR includes any and all required license headers
[x] This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Additional Information

@rob05c this looks good to me.  I tested t3c using the ORT integration tests and it passed on the update pending and reval state change tests.


handle ? and U characters in GISAID format files

I came across both in GISAID downloaded sequence data today, and they caused imports to fail. I think this should be handled by first replacing any U or u characters in sequences with a T, and then dropping any sequences that still contain characters that are outside of the IUPAC DNA alphabet (the ? probably implies N, but I'm not comfortable with generally, silently making that assumption).

fixed in #42


Add cool whitelisting section to PSSA settings.

Also updated Invoke-Plaster to eliminate unnecessary PSSA rule suppressions for PSSA 1.8.0.  @kapilmb - is there anything else you've added recently for the settings file that we should highlight in the NewModule settings file?
@davidgreen - I also added an Analyze task to the VSCode tasks.json file.

@rkeithhill Yes, in addition to passing whitelist to PSAvoidUsingCmdletAliases, the Rules section can also contain a key for PSUseCompatibleCmdlets.

@kapilmb Cool! I'll add this (commented out) to the New Module ScriptAnalyzerSettings.psd1 file.

@kapilmb Nevermind, you've already done that. Awesome and thanks!