Unknown func bpf_skb_load_bytes

Hello,
I first followed the tutorial to get started with redbpf which worked very nicely. I then used the tutorial template and changed it to hook into the kernel function __dev_queue_xmit to read properties of network packets being transmitted. Compilation works without errors but the program panicks when trying to load the probe program. In the probe program, I use the struct SkBuff from redbpf_probes::socket::SkBuff, which internally calls bpf_skb_load_bytes. When running it, it panicks with the error "unknown func bpf_skb_load_bytes":
     Running `target/debug/redbpf-tutorial`
Nov 14 16:52:30.587 ERROR redbpf: error loading BPF program `__dev_queue_xmit' with bpf_load_program_xattr. ret=-1 os error=Invalid argument (os error 22): 0: (bf) r6 = r1
1: (b7) r8 = 0
2: (63) *(u32 *)(r10 -24) = r8
last_idx 2 first_idx 0
regs=100 stack=0 before 1: (b7) r8 = 0
3: (7b) *(u64 *)(r10 -32) = r8
4: (7b) *(u64 *)(r10 -40) = r8
5: (7b) *(u64 *)(r10 -48) = r8
6: (7b) *(u64 *)(r10 -56) = r8
7: (7b) *(u64 *)(r10 -64) = r8
8: (7b) *(u64 *)(r10 -72) = r8
9: (7b) *(u64 *)(r10 -80) = r8
10: (7b) *(u64 *)(r10 -88) = r8
11: (7b) *(u64 *)(r10 -96) = r8
12: (7b) *(u64 *)(r10 -104) = r8
13: (7b) *(u64 *)(r10 -112) = r8
14: (7b) *(u64 *)(r10 -120) = r8
15: (7b) *(u64 *)(r10 -128) = r8
16: (7b) *(u64 *)(r10 -136) = r8
17: (7b) *(u64 *)(r10 -144) = r8
18: (79) r7 = *(u64 *)(r6 +112)
19: (85) call bpf_ktime_get_ns#5
20: (7b) *(u64 *)(r10 -160) = r0
21: (85) call bpf_get_current_pid_tgid#14
22: (7b) *(u64 *)(r10 -152) = r0
23: (7b) *(u64 *)(r10 -8) = r8
24: (7b) *(u64 *)(r10 -16) = r8
25: (bf) r1 = r10
26: (07) r1 += -16
27: (b7) r2 = 16
28: (85) call bpf_get_current_comm#16
last_idx 28 first_idx 22
regs=4 stack=0 before 27: (b7) r2 = 16
29: (79) r1 = *(u64 *)(r10 -8)
30: (7b) *(u64 *)(r10 -128) = r1
31: (79) r1 = *(u64 *)(r10 -16)
32: (7b) *(u64 *)(r10 -136) = r1
33: (bf) r3 = r10
34: (07) r3 += -16
35: (bf) r1 = r7
36: (b7) r2 = 0
37: (b7) r4 = 4
38: (85) call bpf_skb_load_bytes#26
unknown func bpf_skb_load_bytes#26
processed 39 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1

thread 'main' panicked at 'error on Loader::load: LoadError("__dev_queue_xmit", BPF)', src/main.rs:22:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace`

I am not quite sure what the issue is here, I'd really appreciate any help!
This is my system info:
rustc 1.56.1
llvm 13.0.0-3
Kernel: Linux 5.10.78-1-lts

Hello @toasthorse
Specific type of BPF program can call only part of BPF helper functions.
The bpf_skb_load_bytes BPF helper function is allowed to some BPF program types: socket filter, tc cls act, sk skb, lwt out.
But XDP type BPF program is not allowed to call bpf_skb_load_bytes.
See kernel source for more information:

https://elixir.bootlin.com/linux/v5.10.78/source/net/core/filter.c#L7206
https://elixir.bootlin.com/linux/v5.10.78/source/kernel/bpf/verifier.c#L5329

Hi @rhdxmr, thanks for your answer! In my probe main.rs I use #[kprobe("__dev_queue_xmit")] before declaring my probe function. I am assuming this means kprobe cannot use this function then, right? I tried using the bpf_probe_read_kernelfunction instead ofloadto extract a field from thesk_buffbut I cannot seem to cast a&u32to a*mut c_void` to use this function properly. Is this the right approach?

@toasthorse
If the type of your BPF program is kprobe, then the context of the BPF program should be Registers.
See this example code for more information.
As a BPF terminology, the context means the parameter passed to the BPF program. And each type of BPF program has corresponding context. The context passed to kprobe BPF programs is registers.
You can get the first parameter passed to __dev_queue_xmit by calling Registers::parm1() and second parameter using Registers::parm2() and so on.
And if the target kernel function is inlined, attaching to that function won't work.

@toasthorse
If you have a few more problems, please let me know. And I guess I can help you better if I see your code. So if you don't mind, attach your code with your question.

@rhdxmr Thank you for your help with this, I really appreciate it!
This is my probe main.rs file:
#![no_std]
#![no_main]

// use one of the preludes
use redbpf_probes::kprobe::prelude::*;
use redbpf_probes::socket::{SkBuff, SocketError};
use redbpf_probes::socket_filter::{SkBuffAction, SkBuffResult};
use memoffset::offset_of;
use core::convert::TryInto;
use core::mem::size_of;
use core::ptr;
// Use the types you're going to share with userspace, eg:
use probes::openmonitor::*;

program!(0xFFFFFFFE, "GPL");

#[map]
static mut kernel_events: PerfMap<XmitEvent> = PerfMap::with_max_entries(2048);

#[kprobe("__dev_queue_xmit")]
fn dev_queue_xmit(regs: Registers) -> SkBuffResult {
    let mut event = XmitEvent::default();
    unsafe {
        let skb = SkBuff {
            skb: regs.parm1() as *const __sk_buff,
        };
        event.timestamp = bpf_ktime_get_ns();
        let pid_tgid = bpf_get_current_pid_tgid();
        event.pid = pid_tgid as u32;
        event.tgid = (pid_tgid >> 32) as u32;
        event.command = bpf_get_current_comm();

        // event.len = skb.load(offset_of!(__sk_buff, len))?;
        // let datalen:u32 = skb.load(offset_of!(__sk_buff, wire_len))?;

        let len_ptr: *const u32 = (skb.skb as usize + offset_of!(__sk_buff, len)) as *const u32;
        event.len = ptr::read(len_ptr);
        let datalen_ptr: *const u32 = (skb.skb as usize + offset_of!(__sk_buff, len)) as *const u32;
        let datalen = ptr::read(datalen_ptr);

        // let mut datalen:u32 = 0;
        // let ok = bpf_probe_read_kernel(
        //     &datalen as *mut _,
        //     size_of::<u32>().try_into().unwrap(),
        //     (*skb.skb).wire_len as *const _
        // );
        // if ok != 0 {
        //     return Err(SocketError::LoadFailed);
        // }

        // let ok = bpf_probe_read_kernel(
        //     &event.len as *mut _,
        //     size_of::<u32>().try_into().unwrap(),
        //     (*skb.skb).len as *const _
        // );
        // if ok != 0 {
        //     return Err(SocketError::LoadFailed);
        // }

        let actuallen:u32 = event.len - datalen;

        let readlen = match actuallen < BUFSIZE.try_into().unwrap() {
            true => actuallen,
            false => BUFSIZE.try_into().unwrap(),
        };

        //use regular bpf function to read only part of the data, not everything
        let ok = bpf_probe_read_kernel(
            event.data.as_mut_ptr() as *mut _,
            readlen.try_into().unwrap(),
            (*skb.skb).data as *const _,
            );
        if ok != 0 {
            return Err(SocketError::LoadFailed);
        }

        event.copied_len = readlen;
        kernel_events.insert(regs.ctx, &event);

        Ok(SkBuffAction::SendToUserspace)
    }
}

The skb.load statements which are commented out are the ones which produced the error with bpf_skb_load_bytes. Therefore my second approach was to use bpf_probe_read_kernel to read the len field of the __sk_buff struct (commented out here). In the first argument to that function, e.g. &datalen as *mut _, it won't let me cast &u32 to a *mut c_void.
Then I tried to access the fields directly by copying the pointer and dereferencing it with ptr::read. This will compile but at runtime will fail with the error invalid mem access 'inv'.
I also just tried executing the last bpf_probe_read_kernel function to see if reading the data works at least, but that one also fails with invalid mem access 'inv'. So it seems there is an issue with reading from the __sk_buff struct overall somehow.
The XmitEvent is a struct I use in mod.rs where I define a few fields like len, timestamp, pid and so on to pass this info to userspace.
Is this the wrong approach?

@toasthorse
Sorry for the late response.
I took the second shot of Moderna vaccine yesterday so I felt sick since last
night. And I got better after couple of hours ago.
I read your code and I corrected your code.
I give you a few background knowledge.

kprobe BPF program does not return anything
struct __sk_buff is different from struct sk_buff. __sk_buff is a view
of sk_buff and __sk_buff is provided by BPF infrastructure. In some BPF
program types, BPF infrastructure passes __sk_buff to the BPF program as a
context.

BPF program
#![no_std]
#![no_main]
use probes::devqueue::XmitEvent;
use redbpf_probes::kprobe::prelude::*;

program!(0xFFFFFFFE, "GPL");

use core::mem::{self, MaybeUninit};
#[map]
static mut XMIT_EVENTS: PerfMap<XmitEvent> = PerfMap::with_max_entries(2048);

#[map]
static mut DATA_BUF: PerCpuArray<XmitEvent> = PerCpuArray::with_max_entries(1);

#[kprobe("__dev_queue_xmit")]
unsafe fn dev_queue_xmit(regs: Registers) {
    let buf = DATA_BUF.get_mut(0).unwrap();
    buf.timestamp = bpf_ktime_get_ns();
    buf.pid = (bpf_get_current_pid_tgid() >> 32) as u32;
    buf.tgid = (bpf_get_current_pid_tgid() & 0xFFFFFFFF) as u32;
    buf.command = bpf_get_current_comm();
    let skbptr = regs.parm1() as *const u64 as *const sk_buff;
    let mut skb = MaybeUninit::<sk_buff>::uninit();
    if bpf_probe_read_kernel(
        skb.as_mut_ptr() as *mut _,
        mem::size_of::<sk_buff>() as u32,
        skbptr as *const _,
    ) < 0
    {
        bpf_trace_printk(b"error read skb\0");
        return;
    }
    let skb = skb.assume_init();
    buf.data_len = skb.data_len % 4096;
    if bpf_probe_read_kernel(
        buf.data.as_mut_ptr() as *mut _,
        buf.data_len,
        skb.data as *const _,
    ) < 0
    {
        bpf_trace_printk(b"error read data\0");
        return;
    }

    XMIT_EVENTS.insert(regs.ctx, buf);

    bpf_trace_printk(b"hello\0");
}

userspace program
use futures::stream::StreamExt;

use std::ptr;
use tokio::signal::ctrl_c;
use tracing::Level;
use tracing_subscriber::FmtSubscriber;

use probes::devqueue::XmitEvent;
use redbpf::{self, load::Loader};

#[tokio::main(flavor = "current_thread")]
async fn main() {
    let subscriber = FmtSubscriber::builder()
        .with_max_level(Level::WARN)
        .finish();
    tracing::subscriber::set_global_default(subscriber).unwrap();

    let mut loaded = Loader::load(probe_code()).expect("error on Loader::load");
    loaded
        .kprobe_mut("__dev_queue_xmit")
        .unwrap()
        .attach_kprobe("__dev_queue_xmit", 0)
        .unwrap();
    while let Some((name, events)) = loaded.events.next().await {
        for event in events {
            if name.as_str() == "XMIT_EVENTS" {
                let xmit_event = unsafe { ptr::read_unaligned(event.as_ptr() as *const XmitEvent) };
                println!("{} {}", xmit_event.pid, xmit_event.data_len);
            }
        }
    }
    ctrl_c().await;
}

fn probe_code() -> &'static [u8] {
    include_bytes!(concat!(
        env!("CARGO_MANIFEST_DIR"),
        "/target/bpf/programs/devqueue/devqueue.elf"
    ))
}

But I am not an expert of network subsystem of the Linux kernel. And I can't
guarantee that the BPF program I wrote makes sense. Because I am not sure about
the meaning of each fields of struct sk_buff and reading skb.data directly
is the correct way for reading whole data. Maybe there are special kernel
functions that correctly read data from the skb.data pointer.
If you have an issue please feel free to ask me anything. And if you are
willing to explain what is the correct way of reading data from the struct sk_buff, please let me know.
Thanks,

Ah.. I missed the mod.rs of the probes. Here it is:
#[repr(C)]
#[derive(Debug, Clone)]
pub struct XmitEvent {
    pub timestamp: u64,
    pub pid: u32,
    pub tgid: u32,
    pub command: [i8; 16],
    pub data: [u8; 4096],
    pub data_len: u32,
}

@rhdxmr No need to apologize, glad to hear you're feeling better. Health comes first!
Firstly, thank you for taking the time to write this out!
So I observed something peculiar. I first replaced the contents of BPF program, the userspace program and the mod.rs probe file with your code (I only replaced the devqueue path to the previous name). After compiling both the probe and userspace program, it worked nicely and printed the PIDs and the data_len field.
I then expanded this by adding the len field to the struct XmitEvent since this is another relevant field of struct sk_buff and attempted to read it, once by directly accessing it with skb.len and once with bpf_probe_read_kernel but ran into a permission error both times. I then undid all my changes but the permission error persists, even though the source is exactly as before when it was working. This is the complete output when I try to run it now:
warning: unused `Result` that must be used
  --> src/main.rs:32:5
   |
32 |     ctrl_c().await;
   |     ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_must_use)]` on by default
   = note: this `Result` may be an `Err` variant, which should be handled

warning: `redbpf-tutorial` (bin "redbpf-tutorial") generated 1 warning
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/redbpf-tutorial`
Nov 17 21:50:41.881 ERROR redbpf::btf: error on bpf_load_btf: magic: 0xeb9f
version: 1
flags: 0x0
hdr_len: 24
type_off: 0
type_len: 1008
str_off: 1008
str_len: 1724
btf_total_size: 2756
[1] PTR (anon) type_id=2
[2] INT u8 size=1 bits_offset=0 nr_bits=8 encoding=(none)
[3] PTR (anon) type_id=2
[4] INT usize size=8 bits_offset=0 nr_bits=64 encoding=(none)
[5] FUNC_PROTO (anon) return=1 args=(1 dest, 3 src, 4 n)
[6] FUNC memcpy type_id=5
[7] FUNC_PROTO (anon) return=1 args=(1 dest, 3 src, 4 n)
[8] FUNC memmove type_id=7
[9] INT i32 size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
[10] FUNC_PROTO (anon) return=1 args=(1 s, 9 c, 4 n)
[11] FUNC memset type_id=10
[12] FUNC_PROTO (anon) return=9 args=(3 s1, 3 s2, 4 n)
[13] FUNC memcmp type_id=12
[14] FUNC_PROTO (anon) return=9 args=(3 s1, 3 s2, 4 n)
[15] FUNC bcmp type_id=14
[16] PTR (anon) type_id=17
[17] ENUM c_void size=1 vlen=2
	__variant1 val=0
	__variant2 val=1
[18] FUNC_PROTO (anon) return=9 args=(16 ctx)
[19] FUNC outer_dev_queue_xmit type_id=18
[20] ARRAY (anon) type_id=2 index_type_id=21 nr_elems=4
[21] INT __ARRAY_SIZE_TYPE__ size=4 bits_offset=0 nr_bits=32 encoding=(none)
[22] VAR _license type_id=20 linkage=1
[23] INT u32 size=4 bits_offset=0 nr_bits=32 encoding=(none)
[24] VAR _version type_id=23 linkage=1
[25] STRUCT PerfMap_probes__openmonitor__XmitEvent_ size=20 vlen=2
	def type_id=26 bits_offset=0
	_event type_id=27 bits_offset=0
[26] STRUCT bpf_map_def size=20 vlen=5
	type_ type_id=23 bits_offset=0
	key_size type_id=23 bits_offset=32
	value_size type_id=23 bits_offset=64
	max_entries type_id=23 bits_offset=96
	map_flags type_id=23 bits_offset=128
[27] STRUCT PhantomData_probes__openmonitor__XmitEvent_ size=0 vlen=0
[28] VAR XMIT_EVENTS type_id=25 linkage=1
[29] STRUCT PerCpuArray_probes__openmonitor__XmitEvent_ size=20 vlen=2
	def type_id=26 bits_offset=0
	_element type_id=27 bits_offset=0
[30] VAR DATA_BUF type_id=29 linkage=1
[31] STRUCT MapBtf size=64 vlen=2
	key_type type_id=23 bits_offset=0
	value_type type_id=32 bits_offset=64
[32] STRUCT XmitEvent size=56 vlen=6
	timestamp type_id=33 bits_offset=0
	pid type_id=23 bits_offset=64
	tgid type_id=23 bits_offset=96
	command type_id=35 bits_offset=128
	data type_id=36 bits_offset=256
	data_len type_id=23 bits_offset=384
[33] INT u64 size=8 bits_offset=0 nr_bits=64 encoding=(none)
[34] INT i8 size=1 bits_offset=0 nr_bits=8 encoding=SIGNED
[35] ARRAY (anon) type_id=34 index_type_id=21 nr_elems=16
[36] ARRAY (anon) type_id=2 index_type_id=21 nr_elems=15
[37] VAR MAP_BTF_DATA_BUF type_id=31 linkage=1
[38] DATASEC .rodata size=21 vlen=0 vlen == 0

Nov 17 21:50:41.906 ERROR redbpf: error loading BPF program `__dev_queue_xmit' with bpf_load_program_xattr. ret=-1 os error=Permission denied (os error 13): 0: (bf) r6 = r1
1: (b7) r8 = 0
2: (63) *(u32 *)(r10 -224) = r8
last_idx 2 first_idx 0
regs=100 stack=0 before 1: (b7) r8 = 0
3: (bf) r2 = r10
4: (07) r2 += -224
5: (18) r1 = 0xffff9e551e23ce00
7: (85) call bpf_map_lookup_elem#1
8: (bf) r7 = r0
9: (55) if r7 != 0x0 goto pc+16

from 9 to 26: R0_w=map_value(id=0,off=0,ks=4,vs=56,imm=0) R6_w=ctx(id=0,off=0,imm=0) R7_w=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8_w=invP0 R10=fp0 fp-224=????mmmm
26: (85) call bpf_ktime_get_ns#5
27: (7b) *(u64 *)(r7 +0) = r0
 R0_w=inv(id=0) R6_w=ctx(id=0,off=0,imm=0) R7_w=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8_w=invP0 R10=fp0 fp-224=????mmmm
28: (85) call bpf_get_current_pid_tgid#14
29: (77) r0 >>= 32
30: (63) *(u32 *)(r7 +8) = r0
 R0_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) R6_w=ctx(id=0,off=0,imm=0) R7_w=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8_w=invP0 R10=fp0 fp-224=????mmmm
31: (85) call bpf_get_current_pid_tgid#14
32: (63) *(u32 *)(r7 +12) = r0
 R0_w=inv(id=0) R6_w=ctx(id=0,off=0,imm=0) R7_w=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8_w=invP0 R10=fp0 fp-224=????mmmm
33: (7b) *(u64 *)(r10 -216) = r8
34: (7b) *(u64 *)(r10 -224) = r8
35: (bf) r1 = r10
36: (07) r1 += -224
37: (b7) r2 = 16
38: (85) call bpf_get_current_comm#16
last_idx 38 first_idx 0
regs=4 stack=0 before 37: (b7) r2 = 16
39: (79) r1 = *(u64 *)(r10 -224)
40: (79) r2 = *(u64 *)(r10 -216)
41: (7b) *(u64 *)(r7 +24) = r2
 R0=inv(id=0) R1_w=inv(id=0) R2_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8=invP0 R10=fp0 fp-216=mmmmmmmm fp-224=mmmmmmmm
42: (7b) *(u64 *)(r7 +16) = r1
 R0=inv(id=0) R1_w=inv(id=0) R2_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8=invP0 R10=fp0 fp-216=mmmmmmmm fp-224=mmmmmmmm
43: (79) r3 = *(u64 *)(r6 +112)
44: (bf) r1 = r10
45: (07) r1 += -224
46: (b7) r2 = 224
47: (85) call bpf_probe_read_kernel#113
last_idx 47 first_idx 39
regs=4 stack=0 before 46: (b7) r2 = 224
48: (6d) if r8 s> r0 goto pc+21
 R0_w=inv(id=0,umax_value=9223372036854775807,var_off=(0x0; 0x7fffffffffffffff)) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8=invP0 R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=mmmmmmmm fp-64=mmmmmmmm fp-72=mmmmmmmm fp-80=mmmmmmmm fp-88=mmmmmmmm fp-96=mmmmmmmm fp-104=mmmmmmmm fp-112=mmmmmmmm fp-120=mmmmmmmm fp-128=mmmmmmmm fp-136=mmmmmmmm fp-144=mmmmmmmm fp-152=mmmmmmmm fp-160=mmmmmmmm fp-168=mmmmmmmm fp-176=mmmmmmmm fp-184=mmmmmmmm fp-192=mmmmmmmm fp-200=mmmmmmmm fp-208=mmmmmmmm fp-216=mmmmmmmm fp-224=mmmmmmmm
49: (61) r2 = *(u32 *)(r10 -108)
50: (57) r2 &= 4095
51: (79) r3 = *(u64 *)(r10 -24)
52: (63) *(u32 *)(r7 +48) = r2
 R0_w=inv(id=0,umax_value=9223372036854775807,var_off=(0x0; 0x7fffffffffffffff)) R2_w=inv(id=0,umax_value=4095,var_off=(0x0; 0xfff)) R3_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8=invP0 R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=mmmmmmmm fp-64=mmmmmmmm fp-72=mmmmmmmm fp-80=mmmmmmmm fp-88=mmmmmmmm fp-96=mmmmmmmm fp-104=mmmmmmmm fp-112=mmmmmmmm fp-120=mmmmmmmm fp-128=mmmmmmmm fp-136=mmmmmmmm fp-144=mmmmmmmm fp-152=mmmmmmmm fp-160=mmmmmmmm fp-168=mmmmmmmm fp-176=mmmmmmmm fp-184=mmmmmmmm fp-192=mmmmmmmm fp-200=mmmmmmmm fp-208=mmmmmmmm fp-216=mmmmmmmm fp-224=mmmmmmmm
53: (bf) r1 = r7
54: (07) r1 += 32
55: (85) call bpf_probe_read_kernel#113
 R0_w=inv(id=0,umax_value=9223372036854775807,var_off=(0x0; 0x7fffffffffffffff)) R1_w=map_value(id=0,off=32,ks=4,vs=56,imm=0) R2_w=inv(id=0,umax_value=4095,var_off=(0x0; 0xfff)) R3_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8=invP0 R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=mmmmmmmm fp-64=mmmmmmmm fp-72=mmmmmmmm fp-80=mmmmmmmm fp-88=mmmmmmmm fp-96=mmmmmmmm fp-104=mmmmmmmm fp-112=mmmmmmmm fp-120=mmmmmmmm fp-128=mmmmmmmm fp-136=mmmmmmmm fp-144=mmmmmmmm fp-152=mmmmmmmm fp-160=mmmmmmmm fp-168=mmmmmmmm fp-176=mmmmmmmm fp-184=mmmmmmmm fp-192=mmmmmmmm fp-200=mmmmmmmm fp-208=mmmmmmmm fp-216=mmmmmmmm fp-224=mmmmmmmm
 R0_w=inv(id=0,umax_value=9223372036854775807,var_off=(0x0; 0x7fffffffffffffff)) R1_w=map_value(id=0,off=32,ks=4,vs=56,imm=0) R2_w=inv(id=0,umax_value=4095,var_off=(0x0; 0xfff)) R3_w=inv(id=0) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=56,imm=0) R8=invP0 R10=fp0 fp-8=mmmmmmmm fp-16=mmmmmmmm fp-24=mmmmmmmm fp-32=mmmmmmmm fp-40=mmmmmmmm fp-48=mmmmmmmm fp-56=mmmmmmmm fp-64=mmmmmmmm fp-72=mmmmmmmm fp-80=mmmmmmmm fp-88=mmmmmmmm fp-96=mmmmmmmm fp-104=mmmmmmmm fp-112=mmmmmmmm fp-120=mmmmmmmm fp-128=mmmmmmmm fp-136=mmmmmmmm fp-144=mmmmmmmm fp-152=mmmmmmmm fp-160=mmmmmmmm fp-168=mmmmmmmm fp-176=mmmmmmmm fp-184=mmmmmmmm fp-192=mmmmmmmm fp-200=mmmmmmmm fp-208=mmmmmmmm fp-216=mmmmmmmm fp-224=mmmmmmmm
invalid access to map value, value_size=56 off=32 size=4095
R1 min value is outside of the allowed memory range
processed 55 insns (limit 1000000) max_states_per_insn 0 total_states 2 peak_states 2 mark_read 1

thread 'main' panicked at 'error on Loader::load: LoadError("__dev_queue_xmit", BPF)', src/main.rs:18:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

As you can see in the error line after all the bracketed numbers, it returns a Permission denied error, despite previously running. I cleaned and recompiled everything (using sudo) to make sure everything was in order but it still happens. The source files are exactly as you posted them. Do you have an idea what could cause this?

@toasthorse
Did you decrese the array length of XmitEvent::data to 16 or something?
This is what I posted before.
#[repr(C)]
#[derive(Debug, Clone)]
pub struct XmitEvent {
    pub timestamp: u64,
    pub pid: u32,
    pub tgid: u32,
    pub command: [i8; 16],
    pub data: [u8; 4096],
    pub data_len: u32,
}

The error message says that it is invalid to read memory out of value size.
invalid access to map value, value_size=56 off=32 size=4095

32 is offset of XmitEvent::data field.
4095 is read size that you passed to bpf_probe_read_kernel as the 2nd parameter.
56 is size of XmitEvent structure.

You're right, I changed it to a lower size and completely overlooked changing the amount to be read after. Sorry!
I do have one more question regarding the buffer; what is the idea behind using something like a PerCpuArray to buffer data instead of directly instantiating the struct XmitEvent and then adding it to the PerfMap?

@toasthorse
You should use PerCpuArray when you handle big size structures because bpf stack size limit is 512 bytes.

@rhdxmr I see, that makes sense. Thank you for all your help!

@toasthorse
You're welcome. Thanks for showing interest in RedBPF.

I'm closing this issue.
If you have any question related to this issue please feel free to re-open this.
Thanks,

Hi @rhdxmr,
I did actually just run into another small problem regarding this. It compiles without errors but when running, I get the following error: R2 min value is negative, either use unsigned or 'var &= const'. This is the affected part (I am assuming R2 refers to the second argument, readlen?):
    let mut readlen:u32 = min((skb.len - skb.data_len) % 100, BUFSIZE.try_into().unwrap());

    readlen &= 0x7FFFFFFF;

    if bpf_probe_read_kernel(
        event.data.as_mut_ptr() as *mut _,
        readlen as u32,
        skb.data as *const _,
    ) < 0
    {
        bpf_trace_printk(b"error reading skb.data\0");
    }

As you can see I tried both AND-ing it with a positive value and typecasting it but the error persists (I also tried them separately). I am doing this because I only want to read a certain number of bytes (<= 100) from the data contained in the skb.  This also happens when changing the size of the data field to 100 in your code, where there is no subtraction involved at all. With the previous size of 4096, it worked (for reference, event here is the same as buf in your code). Is there a way to make this work?

@toasthorse
I can't reproduce your issue by copy&paste your code.
I guess the error occurs because of skb.len - skb.data_len. BPF verifier assume this expression can be a negative value.
How about checking the value explictly and correct it as below:
let len: u32 = if skb.len - skb.data_len < 0 {
    0
} else {
    skb.len - skb.data_len
};

let readlen: u32 = len % 100;

@toasthorse
I just wonder what skb.len - skb.data_len means in the kernel network system?

Okay I figured it out; the size of the data field needs to be a power of 2 for some reason. I set it to 128 and now it works.
In a socket buffer there is also paged data; the size of that is referenced by skb.data_len. I only want to read non-paged data, which is calculated withskb.len - skb.data_len. Here it is explained nicely.

Hello @toasthorse
Specific type of BPF program can call only part of BPF helper functions. The bpf_skb_load_bytes BPF helper function is allowed to some BPF program types: socket filter, tc cls act, sk skb, lwt out.
But XDP type BPF program is not allowed to call bpf_skb_load_bytes. See kernel source for more information:

https://elixir.bootlin.com/linux/v5.10.78/source/net/core/filter.c#L7206
https://elixir.bootlin.com/linux/v5.10.78/source/kernel/bpf/verifier.c#L5329

@rhdxmr I am new to eBPF. Regarding an XDP program how can I transmit data using maps to the userspace program from the BPF program?

Hi @nitishm
I answered your question via the PR


Added Kitura Kit sources and example call with client

Instead of messing with it as a framework, I've just added the sourced into our model folder to be able to use it. No integration work required on your end as it's all pure Swift classes.
I've added a custom class to start making client calls as an extension of our model object. Let me know if this is unclear.

NB for reviewers: If any file starts with the path iOS/rainbow/Model/KituraKit/ then don't waste your time reviewing - I didn't write the source :)


UI: Node status is down, editing is not allowed

Environment:
Using rke to deploy kubernetes v1.11.1
Longhorn version: v0.3-rc5
Steps to Reproduce:
Edit the node with the status down.
Results:
Report 502 error.

Related to https://github.com/rancher/longhorn/issues/223

This issue has been fixed.


Can't initialise PvRecorder with Raspberry Pi 4 with Raspberry Pi OS (Linux kernel 6.6.51)

Have you checked the docs and existing issues?

[X] I have read all of the relevant Picovoice Porcupine docs
[X] I have searched the existing issues for Porcupine

SDK
Python
Porcupine package version
3.0.3
Framework version
Python 3.11.2
Platform
Raspberry Pi
OS/Browser version
Raspberry Pi OS Bookworm
Describe the bug
I'm using a ReSpeaker 4-Mic Array for Raspberry Pi with a Raspberry Pi 4.
I'm able to record sound using arecord -Dac108 -f S32_LE -r 16000 -c 4 test.wav.
I tried to run a quick test script using pvporcupine and pvrecorder as wrote on the doc:
import pvporcupine
from pvrecorder import PvRecorder

ACCESS_KEY = "xxxxxx-xxxx-xxxx-xxxx-xxxxxx"

INDEX_DEVICE = -1

keywords = [
    "picovoice",
    "computer",
    "alexa",
    "bumblebee",
    "jarvis",
    "terminator",
    "porcupine",
]

porcupine = pvporcupine.create(
    access_key=ACCESS_KEY,
    keywords=keywords,
)

print(f"Using {PvRecorder.get_available_devices()[INDEX_DEVICE]} as input device")

# It seems that the recorder is not working properly and there is an infinite loop in the read method
try:
    recoder = PvRecorder(device_index=INDEX_DEVICE, frame_length=porcupine.frame_length)
except Exception as e:
    print(e)
    exit()

try:
    recoder.start()

    while True:
        keyword_index = porcupine.process(recoder.read())
        if keyword_index >= 0:
            print(f"Detected {keywords[keyword_index]}")

except KeyboardInterrupt:
    recoder.stop()
finally:
    porcupine.delete()
    recoder.delete()

But I have this error message:
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave

Keyboard interrupt doesn't work to exit the script and any wake words are recognized.
arecord -L:
null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
playback
ac108
usbstream:CARD=Headphones
    bcm2835 Headphones
    USB Stream Output
usbstream:CARD=vc4hdmi0
    vc4-hdmi-0
    USB Stream Output
usbstream:CARD=vc4hdmi1
    vc4-hdmi-1
    USB Stream Output
hw:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, fe203000.i2s-ac10x-codec0 ac10x-codec0-0
    Direct hardware device without any conversions
plughw:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, fe203000.i2s-ac10x-codec0 ac10x-codec0-0
    Hardware device with all software conversions
sysdefault:CARD=seeed4micvoicec
    seeed-4mic-voicecard, fe203000.i2s-ac10x-codec0 ac10x-codec0-0
    Default Audio Device
dsnoop:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, fe203000.i2s-ac10x-codec0 ac10x-codec0-0
    Direct sample snooping device
usbstream:CARD=seeed4micvoicec
    seeed-4mic-voicecard
    USB Stream Output

Steps To Reproduce

git clone https://github.com/HinTak/seeed-voicecard/tree/v6.6
cd seeed-voicecard/
sudo ./install.sh
sudo apt-get install portaudio19-dev libatlas-base-dev
curl -LsSf https://astral.sh/uv/install.sh | sh
cd .. && uv venv
uv pip install pvporcupine
uv pip install pvrecorder
uv run main.py

Expected Behavior
The expected behavior would be to recognized the list of default wake words and be able to exit the program when using ctrl+D

pv_recorder_demo --show_audio_devices:
index: 0, device name: Discard all samples (playback) or generate zero samples (capture)
index: 1, device name: Rate Converter Plugin Using Libav/FFmpeg Library
index: 2, device name: Rate Converter Plugin Using Samplerate Library
index: 3, device name: Rate Converter Plugin Using Speex Resampler
index: 4, device name: JACK Audio Connection Kit
index: 5, device name: Open Sound System
index: 6, device name: PulseAudio Sound Server
index: 7, device name: Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
index: 8, device name: Plugin for channel upmix (4,6,8)
index: 9, device name: Plugin for channel downmix (stereo) with a simple spacialization
index: 10, device name:
index: 11, device name:
index: 12, device name:
index: 13, device name: seeed-4mic-voicecard, fe203000.i2s-ac10x-codec0 ac10x-codec0-0

pv_recorder_demo --audio_device_index 13--output_wav_path test.wav doesn't work and seems to cause an overflow error (can't exit the script/kill the process, had to reboot the Raspberry Pi)
porcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice:

Porcupine version: 3.0.0
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave

Seems like there's an issue connecting to your audio input device. PvRecorder uses miniaudio under the hood. Could you give their simple capture example a try and see if it works with your device? It may also be informative if you try a few other devices as well.

I didn't try with an other device (I have an Evo 4 souncard, will try with it tomorrow) but here is the result for the ReSpeaker :
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dsnoop.c:566:(snd_pcm_dsnoop_open) unable to open slave
Press Enter to stop recording...

Same error and I can't kill the process too, I had to reboot the Pi
I tested with the same Debian on a VM on my MacBook Pro using AirPods Pro 2 and it works perfectly

Since you're getting that same error, it seems like there's an issue with the ALSA configuration on your device. You'd need to get this working before PvRecorder and Porcupine can run.
I'm going to close this issue for now since it's not exactly a Porcupine issue, but feel free to re-open if you're still having trouble with Porcupine after getting ALSA working.

The issue is, as I said, ALSA seems to work perfectly when running arecord

I'm able to record sound using arecord -Dac108 -f S32_LE -r 16000 -c 4 test.wav.

I only get the error when running PvRecorder (or miniaudio).

It looks to me like you're using different devices between arecord and miniaudio/PvRecorder (ac108 vs seeed-4mic-voicecard)? What happens if you use seeed-4mic-voicecard for arecord or vice-versa?

Indeed I was a bit confused about it. I followed the ReSpeaker documentation to use Picovoice with it and to test the microphone they said to run arecord -D ac108 -f S32_LE -r 16000 -c 4 hello.wav here and it works.
So I naturally try to use ac108 soundcard as input but when I run PvRecorder.get_available_devices() I only got this list of devices:
['Discard all samples (playback) or generate zero samples (capture)', 'Rate Converter Plugin Using Libav/FFmpeg Library', 'Rate Converter Plugin Using Samplerate Library', 'Rate Converter Plugin Using Speex Resampler', 'JACK Audio Connection Kit', 'Open Sound System', 'PulseAudio Sound Server', 'Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)', 'Plugin for channel upmix (4,6,8)', 'Plugin for channel downmix (stereo) with a simple spacialization', '', '', '', 'seeed-4mic-voicecard, fe203000.i2s-ac10x-codec0 ac10x-codec0-0']

How can I use ac108 as input for PvRecorder?
If I run arecord -D seeed-4mic-voicecard -f S32_LE -r 16000 -c 4 seeed-4mic-voicecard.wav I have this error :
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM seeed-4mic-voicecard
arecord: main:831: audio open error: No such file or directory


Add time display to the left side of the timetable

Overview
The current timetable view does not show time indicators such as "11:20 - 16:00" on the left side. This feature needs to be implemented to improve user experience and align with the design.

Links

Design: https://www.figma.com/design/XUk8WMbKCeIdWD5cz9P9JC/DroidKaigi-2024-App-UI
Code: https://github.com/DroidKaigi/conference-app-2024/blob/27ea36f1ae39693bbdb51c4d90e2a126551c8fc0/feature/sessions/src/commonMain/kotlin/io/github/droidkaigi/confsched/sessions/TimetableScreen.kt#L91

🙋♂

Wow you are so fast! 🏎  Thanks Assigned 👍


Font not set correctly for OSK

A separate, embedded font  specified for the OSK is not being applied.

Fixed for build 377


set as index

There should be a function that can set a vector in dataframe as index.

DataFrame#set_index does that.


Add cpfp amount to gethistory events

Spend cpfp outputs is included:
https://github.com/revault/revaultd/pull/381/files#diff-199e327018a00974e887b09fe252e3aa2e16b4fd8c17b1cab4a648c5afbcbc4aR466


Run Flake Finder every 2h for 0.10.0 testing

Frequency should be reverted once 0.10.0 pre-release testing is done.
Run the Flake Finder every 2h to collect a lot of data about 0.10.0
leading up to the release.
Signed-off-by: Daniel Farrell<EMAIL_ADDRESS>

Ironic that we hit the upgrade flake on this PR. :wink:


No code suggestions when filling C++ extension snippets blanks

Version: 1.40.1
Commit: 8795a9889db74563ddd43eb0a897a2384129a619
Date: 2019-11-13T16:49:30.162Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 5.0.0-36-generic (Ubuntu 18.04.3 LTS)
Steps to Reproduce:

type if;
choose if snippet from the code suggestions;
type variables (or funtions, snippets ...) in the first blank which is /* condition */;
there's no code suggestions when typing ...

Does this issue occur when all extensions are disabled?:
the code snippets are provided by C++ Extension, so no ...

Please file the issue against the C++ extension


twm: 0.10.2 -> 0.11.0, move to pkgs/by-name

Description of changes
Updates twm to latest & move to pkgs/by-name so I can use mergebot in the future
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 345159 run on x86_64-linux 1

1 package built:

twm

builds on aarch64-darwin for me, checkPhase could be flaky

Result of nixpkgs-review pr 345159 run on aarch64-darwin 1

1 package built:

twm

builds on aarch64-darwin for me, checkPhase could be flaky

ah i didnt even notice it failed on darwin. will check that out, ty


Error: Building package curl:x64-windows failed with: BUILD_FAILED

vcpkg install curl:x64-windows
The following packages will be built and installed:
    curl[core,ssl]:x64-windows
Starting package 1/1: curl:x64-windows
Building package curl[core,ssl]:x64-windows...
-- Using cached D:/vcpkg-master/downloads/curl-curl-curl-7_61_1.tar.gz
-- Using source at D:/vcpkg-master/buildtrees/curl/src/url-7_61_1-e11be184c4
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_build_cmake.cmake:175 (message):
    Command failed: D:/vcpkg-master/downloads/tools/cmake-3.11.4-windows/cmake-3.11.4-win32-x86/bin/cmake.exe;--build;.;--config;Debug;--target;install;--;-v;-j1
    Working Directory: D:/vcpkg-master/buildtrees/curl/x64-windows-dbg
    See logs for more information:
      D:\vcpkg-master\buildtrees\curl\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/curl/portfile.cmake:90 (vcpkg_install_cmake)
  scripts/ports.cmake:71 (include)

Error: Building package curl:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: curl:x64-windows
  Vcpkg version: 2018.10.20-nohash

Additionally, attach any relevant sections from the log files above.

Hi @lloydgoodall, thanks for posting this issue. There are some changes on this port. Could you please update it to the latest version and try it again? I can install it successfully. Please let me know if you have any problem about this.

Please open a new issue if this is still a problem for you.


Animating an expandable row

Current Behavior

I am using this example posted here https://github.com/gregnb/mui-datatables/issues/214#issuecomment-450537961band it is a bit jarring when the table is expanded without a smooth transition. The new table row just appears.
Expected Behavior

Is there a way to animate the transition when a table row is being expanded? Or could it be easily implemented?
I have tried adding a transition by overriding styling as stated in the documentation, by using "createMuiTheme" but I have unfortunately not been able to make it work. My code looks like this:
const getMuiTheme = () =>     createMuiTheme({         MuiTableCell: {           body: {             transition: '0.55s',           },         },       },     });
I would really appreciate it if anyone can correct me and tell me what I'm doing wrong :)
Thank you for you hard work. I love the tables! 👍
Your Environment

Tech
Version

Material-UI

MUI-datatables

React

I think transitions would be a nice feature, and here's my research on the matter.
I found that to animate conditionally rendered items, which is the case with expandable rows, react needs some additional hooks, such as those provided by the react-addons-css-transition-group package. This SO explains it: https://stackoverflow.com/questions/46916118/conditional-rendering-and-reactcsstransitiongroup-animation.
The nex problem would be that the conditionally rendered element needs to be nested inside (I think, directly inside). I believe modifications would have to be made in this file (https://github.com/gregnb/mui-datatables/blob/master/src/components/TableBody.js) to allow that, along with additional options for transitions, which has implications for the API.
Not sure if this constitutes a good first issue for contributions or not, but if so, I can volunteer to work on it.

Hi!
Thank you for replying! and thank you so much for researching the issue!
Yes, I agree. Transitions would provide a consistent user experience.
Your findings sound great. I will definitely look into them.
Any work is really appreciated by me at least, so if you decide to work on it and if you make any progress I would be so glad if you could share it with me. Thanks again sir.

I would like to ask if it is possible now to render more than just 1 expandable row?

Hey been having the same issue lately, not sure if this was a thing back when this issue was opened, but I've had some success using <Collapse />, it animates in, but then the expansion panel just gets nuked out of existence and can't animate-out I guess if the expansion panel internally used Collapse to render the expansion panel itself, it could wait for the animation to end before removing the expansion panel from the tree.
The tricky thing is, not sure if I'm the only one who noticed this, but currently it seems the expansion panel is slapped right into  <tbody> which has been screaming at me if I try anything other than <tr><td> (which he is right to do it's against HTML's specification). What I mean is that we would need first to surround that with a tr and a td with 100% colspan and then render the collapse and then the expansion panel.
That will be a breaking change IMHO and require a major bump... Not sure how would @patorjk like that... Would love to work on this though.

I'm not sure how I'd feel about a version bump for a single feature. I'd be curious if there was a way to add a modifier option though that would give expandableRows the behavior you describe. And if this option was true, then expandableRows would work a little differently and allow the collapse/expand animation.

Okay, so the expand: true option would need a little magic other than simply using or not collapse, other than making the API a little too magical, seems a fine compromise to make.

hello has there been an update on this?


Add modular planner interface.

This PR adds a new planner interface that makes it easy to integrate and use new planners in pyrobosim.
The new interface does not break any existing pipelines as the APIs and behaviours remain the same.
Will close #81, #15
TODO :

[x] Add planner interface
[x] Planner base class
[x] A* planner implementation (grid)
[x] A* planner implementation (graph)
[x] RRT implementation (graph)
[x] Fix RRT connection issue
[x] PRM implementation (graph)
[x] Add method to print metrics
[x] Support displaying the planner graph
[x] Add Waypoint reduction for planners
[x] Add demo for new planner interface
[x] Update YAML loader to use new planner interface. (To be implemented after API unification PR is merged)
[x] Refactor search_graph and cascading changes.
[ ] Add documentation for how to use the interface to implement new planners.

Edit :  Add graph_from_world method (No planners currently need this, postponing till this is needed)
NOTE:  Might break the pipeline when loaded as the "world" global planner.  However I am not  sure if the world should have a planner as the "planning" is a behaviour of the robot and so, it makes sense for only robots to have planners.  Might be a good idea for a robot to have both a global and local planner , instead of the global planner being a part of the world.

However I am not sure if the world should have a planner as the "planning" is a behaviour of the robot and so, it makes sense for only robots to have planners. Might be a good idea for a robot to have both a global and local planner , instead of the global planner being a part of the world.

@sea-bass , I would like to know your opinion on this.

I think separating planners from the world is the way to go.
At some point I thought, why not just have 1 planner that multiple robots can call? But then if they're different sizes or have different dynamics, that doesn't reallt work.
Also, this tool's original definition of "global" vs "local" is different from what it typically means. All the planners available now are technically global planners, in that they use knowledge about the world to plan the whole path.
So go with your idea!

The above all seems reasonable -- thanks!

There are still stuff left to do here, but I think it is ready for a preliminary review.

The graphs can be displayed now.

@sea-bass
Only the documentation part remains now (tutorials and any docstring updates)
The issue with RRT* + Bidirectional seems to be fixed as well. Did not encounter it especially with compress_path = True.
Let me know if you encounter the issue in your testing.

Ah all the demos I did not try running are the failing ones lol.
I did not try running all the demos since the 59 tests were passing in pytest.

Ah all the demos I did not try running are the failing ones lol. I did not try running all the demos since the 59 tests were passing in pytest.

Yeah... unfortunately the test coverage doesn't really handle any of the GUI and/or ROS stuff now, so I tend to manually run and test the "main 4" demos. These being:

demo.py (with / without YAML file and multirobot)
demo_pddl.py (with multiple planning domain)
demo.launch.py (the ROS version of 1.)
demo_pddl.launch.py (the ROS version of 2)

Ah all the demos I did not try running are the failing ones lol. I did not try running all the demos since the 59 tests were passing in pytest.

Yeah... unfortunately the test coverage doesn't really handle any of the GUI and/or ROS stuff now, so I tend to manually run and test the "main 4" demos. These being:

demo.py (with / without YAML file and multirobot)
demo_pddl.py (with multiple planning domains, there are 5 at the moment)
demo.launch.py (the ROS version of 1.)
demo_pddl.launch.py (the ROS version of 2)

For the pddl demos, are all 5 domains supposed to complete all steps successfully ?
Is it expected for it to sometimes fail due to situations like not being able to sample a free pose at the placement location ?

For the pddl demos, are all 5 domains supposed to complete all steps successfully ? Is it expected for it to sometimes fail due to situations like not being able to sample a free pose at the placement location ?

Ah yes, this is expected with the first 3 domains I think. Sorry, didn't specify.

Ah all the demos I did not try running are the failing ones lol. I did not try running all the demos since the 59 tests were passing in pytest.

Yeah... unfortunately the test coverage doesn't really handle any of the GUI and/or ROS stuff now, so I tend to manually run and test the "main 4" demos. These being:

demo.py (with / without YAML file and multirobot)
demo_pddl.py (with multiple planning domains, there are 5 at the moment)
demo.launch.py (the ROS version of 1.)
demo_pddl.launch.py (the ROS version of 2)

All of these demos are now running.

The docstrings have been moved to the respective implementations instead of being in the PathPlanner class.
The major thing left now is the documentation for how to use and extend the planners.

I have added the documentation page for path planner and also updated the world_schema.rst
The added page is here : https://pyrobosim--82.org.readthedocs.build/en/82/usage/path_planners.html

When I ran demo.py I moved the robot to counter0 and tried to pick a water object, to which I got the following error:
[robot0] Picking water0
/home/sebastian/personal/pyrobosim_ws/src/pyrobosim/pyrobosim/pyrobosim/core/robot.py:230: UserWarning: water0 is at counter0_left and robot is at counter0. Cannot pick.

and same when I try place an object:
[robot0] Placing water0
/home/sebastian/personal/pyrobosim_ws/src/pyrobosim/pyrobosim/pyrobosim/core/robot.py:292: UserWarning: desk0 is not an object spawn. Cannot place object.
  warnings.warn(f"{loc.name} is not an object spawn. Cannot place object.")

So I think something broke in the robot's current location being the parent Location instead of the ObjectSpawn.

The robot is able to pick up the object when the navigation target is water0.
Is the robot expected to pick up or place  the object irrespective of if the object is on counter0_left or counter0_right when the robot is at counter0 ?

In the multirobot demo, it would be nice if the 3 robots had different path planners. Conveniently, we can have one of each here :)
And when running with the test world file, I get this:
python pyrobosim/examples/demo.py --world-file test_world_multirobot.yaml

/home/sebastian/personal/pyrobosim_ws/src/pyrobosim/pyrobosim/pyrobosim/gui/world_canvas.py:305: UserWarning: Robot does not have a planner
  warnings.warn("Robot does not have a planner")

In fact, I looked at the test_world_multirobot.yaml file and this one still has a global_path_planner field. So I guess it needs to be updated.

This has been fixed .

The robot is able to pick up the object when the navigation target is water0.

Great. It should also work if the target is just the object type (water) and if left blank, it should pick an object from that location at random.

Is the robot expected to pick up or place the object irrespective of if the object is on counter0_left or counter0_right when the robot is at counter0 ?

No, that should not work. Actually, the robot can't be at "counter0", which is the maik problem.
When you tell it to go to "counter0", it internally picks either the "counter0_left" or "counter0_right" location. So when you get the robot location after navigating, it should return one of those and the object resolution should "just work".

I am not sure if it is the docstring that is wrong or if the conversion should happen in WorldCanvas

I think the docstring is out of date. Both of these should resolve locations / objects all the way down to the specific instance.

When you tell it to go to "counter0", it internally picks either the "counter0_left" or "counter0_right" location. So when you get the robot location after navigating, it should return one of those and the object resolution should "just work".

In this case,  if the robot is at counter0_left but object is at counter0_right, is the robot  expected to be able to pick up the object ?

        if (
            isinstance(entity, ObjectSpawn)
            or isinstance(entity, Room)
            or isinstance(entity, Hallway)
        ):
            graph_nodes = entity.graph_nodes
        elif isinstance(entity, Object):
            graph_nodes = entity.parent.graph_nodes
        elif isinstance(entity, Location):
            graph_nodes = entity.children[0].graph_nodes
            # TODO: Select a child node
        else:
            warnings.warn(f"Cannot get graph node from {entity}")
            return None

The ObjectSpawn selection for Location here look hardcoded to the first one, which results in the robot always going to counter0_left when navigating to counter0
Changing  it to select a random ObjectSpawn like this takes care of the issue
   graph_nodes = entity.children[0].graph_nodes

to
graph_nodes = random.choice(entity.children).graph_nodes

        if (
            isinstance(entity, ObjectSpawn)
            or isinstance(entity, Room)
            or isinstance(entity, Hallway)
        ):
            graph_nodes = entity.graph_nodes
        elif isinstance(entity, Object):
            graph_nodes = entity.parent.graph_nodes
        elif isinstance(entity, Location):
            graph_nodes = entity.children[0].graph_nodes
            # TODO: Select a child node
        else:
            warnings.warn(f"Cannot get graph node from {entity}")
            return None

The ObjectSpawn selection for Location here look hardcoded to the first one, which results in the robot always going to counter0_left when navigating to counter0
Changing it to select a random ObjectSpawn like this takes care of the issue
   graph_nodes = entity.children[0].graph_nodes

to
graph_nodes = random.choice(entity.children).graph_nodes

This way you can move from one spawn location to another by trying to navigate to the same parent location.

Where is that code? Better to link it than copy-paste it.
Anyways, choosing the first vs. a random location won't fully address the issue, right? I think the problem is that whatever is grabbing robot.location is getting the parent Location and not the child ObjectSpawn. Even if you always picked the first spawn in a location, the information you get back should agree with where the robot actually is?

Anyways, choosing the first vs. a random location won't fully address the issue, right? I think the problem is that whatever is grabbing robot.location is getting the parent Location and not the child ObjectSpawn. Even if you always picked the first spawn in a location, the information you get back should agree with where the robot actually is?

The random selection mostly helps when you are using the GUI and the object you want to grab is at a different  ObjectSpawn that the first ObjectSpawn.
The code is in graph_node_from_entity()

The random selection mostly helps when you are using the GUI and the object you want to grab is at a different ObjectSpawn than the first ObjectSpawn.

The input to that text box is a query, so you could actually type in e.g. "counter water" or "water0" and the right object spawn should be automatically resolved. But anyways, in the event that the query has multiple possible answers, I have no strong preference on choosing the first spawn vs. a random one. It's just as arbitrary.

Or do you mean if it is at counter0_right and we hit Pick , it should only look for objects in counter0_right?

Exactly this!

I think the reason for high rendering times is because every edge is getting added twice now.
Edge(A, B) and Edge(B, A) while these are conceptually same, the current logic does not check if one or the other exist and restrict a redundant adding of edges.
https://github.com/sea-bass/pyrobosim/blob/a7afed2776cbafc57aac3c556c4d17a6187142f5/pyrobosim/pyrobosim/navigation/world_graph.py#L75

It's fine, and not a change introduced by your updates at all.

I was wondering what unit tests I should put in to make sure this was not breaking anything.
SInce the issue was not introduced from this PR.
We can get this in and add unit tests for small utility functions like entity_from_query etc as the next step.
Thanks for guiding me !!


abc9_ops: Add an assert ensuring that connected port actually exists.

(this otherwise blows up with a segmentation fault, as noticed in #1554 development)

This would turn the segfault into an assertion, but not give any more meaningful information. Is it worth putting something a bit more ~user~ developer friendly here?

Changed to a log_error.


Run exe file after downloading

Hello.
I use webtorrent in node, os windows 8.1.
I'm trying to run downloaded .exe file (webtorrent is running) and get the error "file is locked by another process".

Any news on this?

I guess that the reason is you need write file descriptor (fd) which block file reading, but after loading finish you need only read fd rights . So after finish we must free write fd (maby even before finish event).
Real kung fu is to request when we will request write rd only when we really need to write and close if we dont need, by using throtling by data length and time (for e.g. not often than 500kb and not ofter than 0.5s)

Call torrent.store.close helps.

this is a problematic issue to fix, TLDR for the chunk store to be... fast and not loose data during crashes, outages etc in performs in place writes and reads, those however require a file lock, the only way to not do this, is to do what the FSA does and do file swapping, aka you write data to a file with a different name, then once you close the file it swaps the filename for the wanted one, aka .crswap but this has an insane amount of issues, you use x3 as much storage while the file write is open, cannot perform in place writes and reads and have high chances of data loss or data duplication, so I do not see any other way of solving this issue without closing the store or the torrent
TLDR: if you want to run an .exe you need to destroy the torrent or close the store, or copy the file to another location and run if from there, there's no other clean way of solving this without sacrificing performance, reliability and speed


Render images without layout.

When config.base_controller = ApplicationController, images in modal form are rendered with main app layout.

Thanks for the fix! Do you mind using a more descriptive message in your commit and also adding an entry to CHANGELOG.md?

Update commit. But i'm afraid my english is too bad.

It is good enough, thank you for contributing!


Repeater Image Field Bug in ver 2.2.10

Hello @aristath
After updating to ver 2.2.10 the image repeater field is saving object array instead of image id.

Here, is the steps how it occurred.

First you choose image and the image id is being saved.
Now you logout from WP and re-login and navigate to customizer. Here if you have var-dump the field array you'll see that the image-id is change to object array.
You don't see image in customizer preview but frontend. And if you make some change on other field and save it. Now the object array is saved in place of image id.
Somehow in customizer preview the value of image id is being replaced by object array. Could you please look into this.

Thanks

@manandharsudin sorry about that! I'll look into this today and have a patch ready for @aristath tonight.

@manandharsudin I think I have a working patch.


Drastically curtail number of iterations for samplers tests

This should greatly reduce travis testing time.

Well, I think this is at least quicker, so maybe we can merge?
Some tests on large systems still take up to 2 minutes.

Going to merge this since the next PR is very different.


Please invite me to the GitHub Community Organization

Name
Divya Kelaskar
Discord Username (if applicable)
Divya#2384
Additional Context
No response

Welcome to Chryzhub @divyakelaskar 🥳😊🤩


[Bug]: User menu links aren't working

What happened?
Profile, Api Tokens and Team Settings links are broken. Nothing happens when clicked.
How to reproduce the bug
Fresh laravel install. Installed the package. Run the install command.
Package Version
0.0.13
PHP Version
8.2.0
Laravel Version
11.9
Which operating systems does with happen with?
macOS
Notes
No response

I saw the shouldRegisterMenuItem function and disabled the email verification.


Consider lowering IPHONEOS_DEPLOYMENT_TARGET to 8.1

Unless there is good reason I believe lowering IPHONEOS_DEPLOYMENT_TARGET to 8.1 would allow UIClosures to be integrated more easily into iOS projects.
I would be glad to arrange a PR if it is helpful.

would be appreciated :)

done! thank you :)


Create game object

Now it time is investigate the game object. Which one should I create as Game object?

But first thing first, we have to make it clean what the game object is. It must be only the objects that are able to render and also they must be able to update, render and handle the events. So in the current version(v0.2.0) we have shapes, text and texture are the core things are renderable.

But first thing first, we have to make it clean what the game object is. It must be only the objects that are able to render and also they must be able to update, render and handle the events. So in the current version(v0.2.0) we have shapes, text and texture are the core things are renderable.

OK Let do it

As what I have though recently, I think we should not call it Game object. Let call it UI Object instead


Add correct connection info for Peregrino

Peregrino does not work with the default auth as it is run on a different server that the other fields. There should be added a check that uses the correct auth info depending on the field that is being queried.

Blocked while we wait for updated auth information from the Aspen team

We are unable to fix this issue until the Aspen team does some work in the backend. This issue is closed for now and will be reopened in the future if the need arises.


normalize suite and test titles

This has bugged me since forever.
Some suites and tests have titles like #foo or .foo and some which correspond to a function have parens (#foo()) and some don't.
let's make sure this is consistent across the tests.  I propose doing away with any leading or trailing punctuation

Elsewhere I've seen # used to distinguish instance methods from static methods and parentheses used to distinguish methods from properties or around arguments where multiple overloads on different arguments are available. If we don't have any of that stuff, just non-overloaded instance methods, then we should be good getting rid of most of that syntax.

that’s a jsdoc convention. it’ll be further confused by the private field syntax on he horizon.
imo we should be decoupling the tests from the implementation as much as possible.  The goal being that refactors won’t result in a bunch of broken tests. I’ll try to come up with an example of what that looks like.

s/he/the. sorry GH on mobile sux


Odd behaviour when hiding side panel in HA

I don't know if the fact that the affected strings have two words rather than one is part of the issue, but that's the only thing I see that's different about them.
With side panel:

Without side panel:

This is affecting both Chrome and Safari on Mac.

Update with my latest config. This also seems to happen when manually resizing the window.
All good:

Gone wonky:

Bug in polymer?

I have, what might be related, a similar issue. I have the option to show the sliders if there is space. When I go to the UI, when I first see a tab, it looks fine, the sliders are hidden.   I don't get this with all tabs. It is like the render isn't triggered at the right time when clicking tabs.

Here is a quick video of what I was talking about. I hope I'm not jacking the thread. Just thought it might be related.
https://youtu.be/V3W31s7mmsc

@randellhodges Do you still have this issue?

Found the bug - will be fixed in the next release.

Oh nice. I had turned off sliders a while back. I'll give them a go later. Thanks for coming back to this!

Fixed in 20171214


DirectShape.ByGeometry hates view templates

DirectShape.ByGeometry needs a view to perform its operations and it tries to find that view by means of a FilteredElementCollector and subsequent filtering by ViewType. However, if the first suitable view it finds is a ViewTemplate, the node will throw the following error:
Exception: The view is not printable.
Parameter name: pDBView```
I think you will need to use ```IsTemplate``` as a secondary filter to make sure that doesn't happen.

Thanks. I'll add this in the next release.


Use .NET Core Task does not enforce the version

Question, Bug, or Feature?
Type: Bug
Enter Task Name: Use .NET Core
Environment

Azure Pipelines

account name : ascentsoftware
team project name: multiple impacted

Agent - Private:

OS : Windows

Issue Description
Use .NET Core installs a .Net Core version, but that version is not what used in the subsequent tasks.
We have numerous projects that are using different versions of .Net Core ( 3.1, 5.0, 6.0) .
The Task does indeed make sure the requested version is installed in the _work\tools folder.
Problem is that after that the highest available version is picked up. On almost all agents in our pool this is now 6.0.
The projects are not meant to be build with 6.0.
For puild that is not a problem, but on publish the task fails with " error NETSDK1152: Found multiple publish output files with the same relative path". The error is because of a breaking change that was introduced with 6.0 .
We are failing to enforce version 3.1 or 5.0 for the publish step.
Task logs
2021-12-06T12:40:55.0033158Z ##[section]Starting: Use .NET Core sdk 3.1.100
2021-12-06T12:40:55.0257291Z ==============================================================================
2021-12-06T12:40:55.0257683Z Task         : Use .NET Core
2021-12-06T12:40:55.0258139Z Description  : Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks. Additionally provides proxy support.
2021-12-06T12:40:55.0258556Z Version      : 2.195.0
2021-12-06T12:40:55.0258755Z Author       : Microsoft Corporation
2021-12-06T12:40:55.0258960Z Help         : https://aka.ms/AA4xgy0
2021-12-06T12:40:55.0259194Z ==============================================================================
2021-12-06T12:40:55.3799912Z Tool to install: .NET Core sdk version 3.1.100.
2021-12-06T12:40:58.1895476Z Found version 3.1.100 in channel 3.1 for user specified version spec: 3.1.100
2021-12-06T12:40:58.2340128Z Version: 3.1.100 was found in cache.
2021-12-06T12:40:58.2348659Z Creating global tool path and pre-pending to PATH.
2021-12-06T12:40:58.2371081Z ##[section]Finishing: Use .NET Core sdk 3.1.100
Troubleshooting
I trying uninstalling the .net 6.0 that comes with the VS Build tools installed on the agents, but as people can use the task to install 6.0 in the agent work folder, I cannot completely remove the version from the agent.
I've found a workaround.
With a PowerShell script I create a temporary global.json file in the '$(System.DefaultWorkingDirectory)' using
dotnet new globaljson --sdk-version 3.1.100 --force
But we have 10+ projects and now I have to add this to every pipeline.
Error logs
Determining projects to restore...
  All projects are up-to-date for restore.
  MiscProj.Common.Core -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common.Core\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.Core.dll
  MiscProj.Common -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.dll
  MiscProj.Common.Repositories.SqlServer -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common.Repositories.SqlServer\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.Repositories.SqlServer.dll
  MiscProj.Common.Repositories.CosmosDb -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common.Repositories.CosmosDb\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.Repositories.CosmosDb.dll
  MiscProj.Domain.Core -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Core\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Core.dll
  MiscProj.Common.Managers -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common.Managers\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.Managers.dll
  MiscProj.Domain.Repositories.CosmosDb -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Repositories.CosmosDb\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Repositories.CosmosDb.dll
  MiscProj.Common.Messaging -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common.Messaging\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.Messaging.dll
  MiscProj.Domain.Infrastructure.AzureCognitiveSearch -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Infrastructure.AzureCognitiveSearch\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Infrastructure.AzureCognitiveSearch.dll
  MiscProj.Domain.Infrastructure.SqlServer -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Infrastructure.SqlServer\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Infrastructure.SqlServer.dll
  MiscProj.Domain.Services -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Services\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Services.dll
  MiscProj.Common.Api -> C:\agent\_work\563\s\MiscProj.Common\MiscProj.Common.API\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Common.Api.dll
  MiscProj.Domain.Common -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Common\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Common.dll
  MiscProj.Domain.Managers -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Managers\bin\$(BuildConfiguration)\netcoreapp3.1\MiscProj.Domain.Managers.dll
C:\agent\_work\_tool\dotnet\sdk\6.0.100\Roslyn\Microsoft.CSharp.Core.targets(75,5): warning MSB3052: The parameter to the compiler is invalid, '/define:$(BUILDCONFIGURATION)' will be ignored. [C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Functions\MiscProj.Domain.Functions.csproj]
  MiscProj.Domain.Functions -> C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Functions\bin\$(BuildConfiguration)\netcoreapp3.1\bin\MiscProj.Domain.Functions.dll
C:\agent\_work\_tool\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: C:\Users\BuildAgentService\.nuget\packages\microsoft.azure.cosmos.direct\3.14.0\runtimes\win-x64\native\Microsoft.Azure.Cosmos.ServiceInterop.dll, C:\Users\BuildAgentService\.nuget\packages\microsoft.azure.cosmos\3.14.0\runtimes\win-x64\native\Microsoft.Azure.Cosmos.ServiceInterop.dll, C:\Users\BuildAgentService\.nuget\packages\microsoft.azure.cosmos.direct\3.14.0\runtimes\win-x64\native\Cosmos.CRTCompat.dll, C:\Users\BuildAgentService\.nuget\packages\microsoft.azure.cosmos\3.14.0\runtimes\win-x64\native\Cosmos.CRTCompat.dll. [C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Functions\MiscProj.Domain.Functions.csproj]
##[error]Error: The process 'C:\agent\_work\_tool\dotnet\dotnet.exe' failed with exit code 1
##[warning].NET 5 has some compatibility issues with older Nuget versions(<=5.7), so if you are using an older Nuget version(and not dotnet cli) to restore, then the dotnet cli commands (e.g. dotnet build) which rely on such restored packages might fail. To mitigate such error, you can either: (1) - Use dotnet cli to restore, (2) - Use Nuget version 5.8 to restore, (3) - Use global.json using an older sdk version(<=3) to build
Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts. Unless you have locked down a SDK version for your project(s), 5.x SDK might be picked up which might have breaking behavior as compared to previous versions. You can learn more about the breaking changes here: https://docs.microsoft.com/en-us/dotnet/core/tools/ and https://docs.microsoft.com/en-us/dotnet/core/compatibility/ . To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
##[error]Dotnet command failed with non-zero exit code on the following projects : C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.API\MiscProj.Domain.API.csproj,C:\agent\_work\563\s\MiscProj.Domain\MiscProj.Domain.Functions\MiscProj.Domain.Functions.csproj
Finishing: dotnet publish

Hello,
Any progress on this?
Thanks.

Hi,
I started seeing this on my builds since this morning. Have multiple .Net 3.1 applications, build pipeline specifies
TargetFramework : 'netcoreapp3.1', but get this same error /usr/share/dotnet/sdk/6.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: <list of random project appsettings.json and appsettings.Development.json files>
I worked around it by adding ErrorOnDuplicatePublishOutputFiles property to each of my projects, even though this is a property introduced in .Net 6 (https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#erroronduplicatepublishoutputfiles)
<PropertyGroup>
        <TargetFramework>netcoreapp3.1</TargetFramework>
	<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
  </PropertyGroup>

Build succeeded after this

Stay fresh please bot

I'm also having this issue in my cloud-hosted agents.
Incredible how such an issue is completely ignored with no word from the team.

Not stale.


#569 Update derive_agegr_fda function

Hi all, I've updated the derive_agegr_fda function to fix #569. It is designed to handle 4 different scenarios depending on the availability of AAGEU and age_unit:
1 - Both AAGEU and age_unit missing - Returns an error that units are missing
2 - AAGEU missing and age_unit specified - Use age_unit as unit
3 - AAGEU specified and age_unit missing - Use AAGEU as unit
4 - Both AAGEU and age_unit specified - Warning and use AAGEU as unit
This then uses the unit variable to convert the AAGE variable into years so that it can be grouped correctly.
The derive_agegr_ema function will also require an update to ensure it groups the ages correctly.

@malexthorpe The error from R CMD check is not related to your code but something on the devel branch you merged. I fixed this in the meantime. If you merge devel into your branch once more and push the changes then it should be fine.

@malexthorpe , just two lintr warning are left.


Add Examples

Should be separate binary projects, maybe using three_d to render meshes.

Writing an adaptor for cgmath / three_d
Primitives
Loading Obj
Using properties
Subdivision
Decimation

Merged recently #38


Identical keywords in build_kwargs and config_kwargs lead to TypeError in load_dataset_builder()

Describe the bug
In load_dataset_builder(), build_kwargs and config_kwargs can contain the same keywords leading to a TypeError("type object got multiple values for keyword argument "xyz").
I ran into this problem with the keyword: base_path. It might happen with other kwargs as well. I think a quickfix would be
builder_cls = import_main_class(dataset_module.module_path)
builder_kwargs = dataset_module.builder_kwargs
data_files = builder_kwargs.pop("data_files", data_files)
config_name = builder_kwargs.pop("config_name", name)
hash = builder_kwargs.pop("hash")
base_path = builder_kwargs.pop("base_path")

and then pass base_path into builder_cls.
Steps to reproduce the bug
from datasets import load_dataset
load_dataset("rotten_tomatoes", base_path="./sample_data")

Expected results
The docs state: **config_kwargs — Keyword arguments to be passed to the BuilderConfig and used in the DatasetBuilder.
So I would expect to be able to pass the base_path into load_dataset().
Actual results
TypeError("type object got multiple values for keyword argument "base_path").
Environment info

datasets version: 2.4.0
Platform: macOS-12.5-arm64-arm-64bit
Python version: 3.8.9
PyArrow version: 9.0.0

I am getting similar error - TypeError: type object got multiple values for keyword argument 'name' while follwoing this tutorial
datasets version: 2.4.0

In my case, this was happening because I defined multiple BuilderConfig for multiple types, but didn't had all the data files that are requierd by those configs.
I think this is different than the original issue by @bablf .

Hi ! I think this can be fixed by letting the config_kwargs take over the builder kwargs here:
https://github.com/huggingface/datasets/blob/7feeb5648a63b6135a8259dedc3b1e19185ee4c7/src/datasets/load.py#L1533-L1534
maybe something like this ?
    **{**builder_kwargs, **config_kwargs}

Let me know if you'd like to contribute this bug fix so I can assign you :)

In my case, this was happening because I defined multiple BuilderConfig for multiple types, but didn't had all the data files that are requierd by those configs.
I think this is different than the original issue by @bablf .

Feel free to to open an new issue, I'd be happy to help

@lhoestq On second thoughts, I think this might be expected behavior; although a better error message might help.
Reasoning: Given n configs, if no data file is provided for any config, then it should be an error. Then why it should not be the case if out of n configs, for some data files are provided but not for others.

Ok I see - maybe we should check the values of builder_kwargs raise an error if any key in config_kwargs tries to overwrite it ? The builder kwargs are determined from the builder's type and location (in some cases it forces the base_path, data_files and config name for example)


Can I run the project of. Net core 3.1 in Ubuntu 14.04.3 LTS

I don't know if this is what's causing your issue, but .Net Core 3.1 is only supported on Ubuntu 16.04 and newer.


Fix specific format management

use output of specific format callback or use standard one.
format is callback for all levels, cannot be undefined or false at log level detail.

I don't quite get this patch. This looks like it removes custom formatted messages, making them all formatted the same.
Am I missing something?

By the way, forgot to say thanks btw I'm just confused here.


with error code validation_error error message: modular models (schema version 1.2) are not supported

Checklist

[ ] I have looked into the README and have not found a suitable solution or answer.
[ ] I have looked into the documentation and have not found a suitable solution or answer.
[ ] I have searched the issues and have not found a suitable solution or answer.
[ ] I have upgraded to the latest version of OpenFGA and the issue still persists.
[ ] I have searched the OpenFGA Community and have not found a suitable solution or answer.
[ ] I agree to the terms within the OpenFGA Code of Conduct.

Description
when i run:  fga model write --store-id=$FGA_STORE_ID --file fga.mod
this is the tutorial: https://openfga.dev/docs/modeling/modular-models
Then, it happ:  with error code validation_error error message: modular models (schema version 1.2) are not supported
Expectation
I think it genegrated  a dsl file
Reproduction
https://github.com/xuanlongvts/authen-autho/tree/main/open-fga/16_modular_models
Store data
No response
OpenFGA version
latest
How are you running OpenFGA?
As a binary
What datastore are you using?
In-Memory
OpenFGA Flags
fga model write --store-id=$FGA_STORE_ID --file fga.mod
Logs
Error: failed to write model due to WriteAuthorizationModel validation error for POST WriteAuthorizationModel with body {"code":"validation_error","message":"modular models (schema version 1.2) are not supported"}
with error code validation_error error message: modular models (schema version 1.2) are not supported

As of v1.5.2, support for schema 1.2 is still experimental and you need to run the server with the following flag to enable it:
OPENFGA_EXPERIMENTALS=enable-modular-models
See the release notes: https://github.com/openfga/openfga/releases/tag/v1.5.1


Permission denied

I'm using window 7 and I had full permission but when I use preview button on templates backend it show message.
unlink(C:\Users\lvthu\AppData\Local\Temp/04

b854edea2a8e08d8007d212360ace1): Permission denied

Same on Windows 10, running under WampDeveloper Pro rather than XAMP, or under PHP built in webserver.

Hi,
this is an issue with dompdf library itself. It has been fixed in version 0.7.
https://github.com/dompdf/dompdf/pull/1096
My plugin is based on barryvdh/laravel-dompdf so I must wait for him to update his library first.
For now you can check this solution:
https://github.com/barryvdh/laravel-dompdf/issues/186#issuecomment-174359669

I updated plugin to use domPDF version 0.7. For now you will need to enable bleeding edge updates to update to version 2.1.1. You can do this by changing config/cms file and setting edgeUpdates to true.
Let me know if this resolves your problems.


Question: how generate nestd message field?

// example message
message t1 {
    string b = 1;
}

message c {
    t1 c1 = 1;
    string c2 = 2;
}

// load go struct by generate
type C struct {
    *T1 `protobuf:"bytes,1,opt,name=c1"`
    C2 string ...
}

type T1 {
    B string ...
}

no option to ignore name field.
https://github.com/protocolbuffers/protobuf-go/blob/fb0abd915897428ccfdd6b03b48ad8219751ee54/cmd/protoc-gen-go/internal_gengo/main.go#L425-L427

could add nestd option on FieldOptions?
type FieldOptions struct {
    ....
    Nestd *bool
}

const (
    ....
    Default_FieldOptions_Nestd = bool(false)
)

func (x *FieldOptions) GetNestd() bool {
	if x != nil && x.Nestd!= nil {
		return *x.Nestd
	}
	return Default_FieldOptions_Nestd
}

Altering the FieldOptions type would require a proposal upstream to the main protobuf group: https://github.com/protocolbuffers/protobuf
Oh, I think I understand what you’re trying to do. You want to have something like:
type S1 struct{
  Foo int
}

type S2 struct{
  S1
  Bar int
}

Unfortunately, such a concept does not really exist in protobuf. The protobuf is not a golang-data-type description language, but rather a portable language-neutral interchange format. As such, there are many semantics specific to protobuf that we are forced to comply with, even if if they are non-ideal for Golang, and we try to stick as tightly to the given semantics as we can.
As an example, we added the json tag before other languages, because it was so easy to do in Golang, but then when a JSON mapping was actually formally codified, we were suddenly out-of-spec, and had to redo how we encoded our JSON. Because of the pain caused in this situation, we’re quite shy towards unilaterally expanding the protobuf spec like this would require.

Altering the FieldOptions type would require a proposal upstream to the main protobuf group: https://github.com/protocolbuffers/protobuf
Oh, I think I understand what you’re trying to do. You want to have something like:
type S1 struct{
  Foo int
}

type S2 struct{
  S1
  Bar int
}

Unfortunately, such a concept does not really exist in protobuf. The protobuf is not a golang-data-type description language, but rather a portable language-neutral interchange format. As such, there are many semantics specific to protobuf that we are forced to comply with, even if if they are non-ideal for Golang, and we try to stick as tightly to the given semantics as we can.
As an example, we added the json tag before other languages, because it was so easy to do in Golang, but then when a JSON mapping was actually formally codified, we were suddenly out-of-spec, and had to redo how we encoded our JSON. Because of the pain caused in this situation, we’re quite shy towards unilaterally expanding the protobuf spec like this would require.

hello, thk reply.
FieldOptions is just a suggestion. Of course, if it is modified to the protocol itself, it is not a good suggestion. Everyone knows that this involves too much. However, nestd is a feature of go itself. I feel that it has nothing to do with the protobuf protocol. Nestd does not violate the protocol formulated by protobuf. Code generate can comply with the protobuf protocol. The characteristics of the language itself can still be customized. Changes in syntactic sugar.
The json int64 feature you said is really painful, it already involves the protocol specification, and the protocol itself should be followed instead of the compatible language. This is no problem.

The idea came from wanting to make nestd struct auto implement some interface, like kubernetes metadata field
// pb by generate
https://github.com/kubernetes/kubernetes/blob/25a3274a4f62be0d37937c069007cedb3116e467/staging/src/k8s.io/api/core/v1/generated.proto#L3017-L3021
// go struct
https://github.com/kubernetes/kubernetes/blob/25a3274a4f62be0d37937c069007cedb3116e467/staging/src/k8s.io/api/core/v1/types.go#L3962-L3967
Of course here is go struct to generate pb instead of pb generating go struct, but a good example.

Annotating fields to change the Go representation of them is currently not supported, and we don't plan to support it. A common approach to alleviate this is to wrap the proto types with some type that exposes the interface you want.

hi @aktau,  thk reply.
Why don't you want to support it? It doesn't confuse the protocol itself, and it doesn't create ambiguity for other languages. Just for go, there are many ways to implement my idea. It's also very fast, but it will be very twisted. Your method is also one of them.

It is also a good way to provide a tpl mechanism without polluting pb,
https://entgo.io/docs/templates

So, you’re actually incorrect. Nesting structs will lose some semantics of the protobuf representation, because messages are presence sensing. That is Foo: &pb.Foo{} is different from Foo: nil even though both will return all the same values when using bar.Foo.GetField().
I understand that nesting structs a common Go language feature, but it is not compatible with the strict protobuf semantics, and this is the official protobuf library, and thus must stick to the standards themselves.
I very much understand the frustration of there being features of Go that just aren’t possible to replicate in protobuf, but that is just how life is when using with a language-independent protocol format. We cannot fit every language with all its features, we must strictly adhere to the protobuf spec.

What semantics are lost? This example is not very straightforward.
Post some official explicit documentation and valid code examples to clarify which semantics are violated. @puellanivis

Given:
// example message
message t1 {
    string b = 1;
}

message c {
    t1 c1 = 1;
    string c2 = 2;
}

You can tell the difference between the protowire encoded 0A 00 12 03 66 6F 6F and 12 03 66 6F 6F. The former encodes &pb.C{ C1: &pb.T1{}; C2: "foo" } and the later encodes &pb.C{ C2: "foo" }. That presence needs to be tracked in order to properly maintain round-trippability. It’s difficult to tell just what kind of subtle difference the two have, as individuals can build their own pragmatics on top of the semantics of a message appearing empty, and a message not appearing at all. And we have to be widely compatible with any pragmatics someone might put into that protobuf semantic.

Regardless of the question of protobuf semantics, the design philosophy of the generated protobuf API is to provide a consistent representation of each protobuf language concept. Supporting multiple representations of a construct (such as choosing between an explicitly named field or an embedded one, or giving a Go field a name different from the protobuf field name) is not, in general, a design goal..

Given:
// example message
message t1 {
    string b = 1;
}

message c {
    t1 c1 = 1;
    string c2 = 2;
}

You can tell the difference between the protowire encoded 0A 00 12 03 66 6F 6F and 12 03 66 6F 6F. The former encodes &pb.C{ C1: &pb.T1{}; C2: "foo" } and the later encodes &pb.C{ C2: "foo" }. That presence needs to be tracked in order to properly maintain round-trippability. It’s difficult to tell just what kind of subtle difference the two have, as individuals can build their own pragmatics on top of the semantics of a message appearing empty, and a message not appearing at all. And we have to be widely compatible with any pragmatics someone might put into that protobuf semantic.

@puellanivis
It's a good explanation, and it can also be directly understood by other people with similar questions. After all, this is not strongly mentioned in the document.
thk reply.


building error: ‘status’ is not a class, namespace, or enumeration

When I build using cmake and make I get this error message. Any idea? Thanks in advance.
/home/gzhang8/course/UAV/code/gazebo-sitl/gzsitl/gzsitl_plugin.cc: In member function ‘void gazebo::GZSitlPlugin::OnUpdate()’:
/home/gzhang8/course/UAV/code/gazebo-sitl/gzsitl/gzsitl_plugin.cc:140:23: error: ‘status’ is not a class, namespace, or enumeration
         if (status == status::STANDBY) {
                       ^
/home/gzhang8/course/UAV/code/gazebo-sitl/gzsitl/gzsitl_plugin.cc:143:30: error: ‘status’ is not a class, namespace, or enumeration
         } else if (status == status::ACTIVE) {
                              ^
/home/gzhang8/course/UAV/code/gazebo-sitl/gzsitl/gzsitl_plugin.cc:173:23: error: ‘status’ is not a class, namespace, or enumeration
         if (status != status::ACTIVE) {
                       ^
/home/gzhang8/course/UAV/code/gazebo-sitl/gzsitl/gzsitl_plugin.cc:193:23: error: ‘status’ is not a class, namespace, or enumeration
         if (status == status::ACTIVE) {
                       ^
gzsitl/CMakeFiles/gzsitl_plugin.dir/build.make:62: recipe for target 'gzsitl/CMakeFiles/gzsitl_plugin.dir/gzsitl_plugin.cc.o' failed
make[2]: *** [gzsitl/CMakeFiles/gzsitl_plugin.dir/gzsitl_plugin.cc.o] Error 1
CMakeFiles/Makefile2:214: recipe for target 'gzsitl/CMakeFiles/gzsitl_plugin.dir/all' failed
make[1]: *** [gzsitl/CMakeFiles/gzsitl_plugin.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

That is odd. Here is compiling ok.  It is defined on mavlink_vehicles.hh which is indirectly included via gzsitl_plugin.hh.
Care to share how did you issue your cmake command and gcc version? Was you following the steps listed here?

Just cloned and build a fresh repo and was unable to reproduce the issue. Could to share your cmake output?

Thanks for your reply. I am using Ubuntu16.04 (GCC 5.4.0). Here is how I build.
First, I build and install https://github.com/ArduPilot/MAVProxy.git using
sudo python setup.py install

Second, I build Ardupilot using
./waf configure
sudo ./waf install

Third, I run
git submodule update --init --recursive
cd build
cmake ..
make

Then I get that error.
Here is the cmake .. output. It has some warnings inside. After that is gcc -v output (gcc 5.4.0)
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   thread
--   signals
--   system
--   filesystem
--   program_options
--   regex
--   iostreams
--   date_time
--   chrono
--   atomic
-- Boost version: 1.58.0
-- Looking for OGRE...
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib/x86_64-linux-gnu/libOgreMain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib/x86_64-linux-gnu/libOgrePaging.so;debug;/usr/lib/x86_64-linux-gnu/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so;debug;/usr/lib/x86_64-linux-gnu/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib/x86_64-linux-gnu/libOgreProperty.so;debug;/usr/lib/x86_64-linux-gnu/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so;debug;/usr/lib/x86_64-linux-gnu/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib/x86_64-linux-gnu/libOgreVolume.so;debug;/usr/lib/x86_64-linux-gnu/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so;debug;/usr/lib/x86_64-linux-gnu/libOgreOverlay.so
-- Looking for ignition-msgs - found
Validating /home/gzhang8/course/UAV/code/gazebo-sitl/modules/mavlink_vehicles/modules/mavlink/message_definitions/v1.0/common.xml
Parsing /home/gzhang8/course/UAV/code/gazebo-sitl/modules/mavlink_vehicles/modules/mavlink/message_definitions/v1.0/common.xml
Note: message GPS_STATUS is longer than 64 bytes long (109 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message ATTITUDE_QUATERNION_COV is longer than 64 bytes long (80 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GLOBAL_POSITION_INT_COV is longer than 64 bytes long (189 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOCAL_POSITION_NED_COV is longer than 64 bytes long (233 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIL_ACTUATOR_CONTROLS is longer than 64 bytes long (89 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIGHRES_IMU is longer than 64 bytes long (70 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIL_SENSOR is longer than 64 bytes long (72 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message SIM_STATE is longer than 64 bytes long (92 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message FILE_TRANSFER_PROTOCOL is longer than 64 bytes long (262 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message HIL_STATE_QUATERNION is longer than 64 bytes long (72 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOG_DATA is longer than 64 bytes long (105 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GPS_INJECT_DATA is longer than 64 bytes long (121 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message SERIAL_CONTROL is longer than 64 bytes long (87 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message ENCAPSULATED_DATA is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message RESOURCE_REQUEST is longer than 64 bytes long (251 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message FOLLOW_TARGET is longer than 64 bytes long (101 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message CONTROL_SYSTEM_STATE is longer than 64 bytes long (108 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message AUTOPILOT_VERSION is longer than 64 bytes long (68 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GPS_INPUT is longer than 64 bytes long (71 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message GPS_RTCM_DATA is longer than 64 bytes long (190 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message V2_EXTENSION is longer than 64 bytes long (262 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message CAMERA_INFORMATION is longer than 64 bytes long (94 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message CAMERA_IMAGE_CAPTURED is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOGGING_DATA is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Note: message LOGGING_DATA_ACKED is longer than 64 bytes long (263 bytes), which can cause fragmentation since many radio modems use 64 bytes as maximum air transfer unit.
Found 149 MAVLink message types in 1 XML files
Generating C implementation in directory /home/gzhang8/course/UAV/code/gazebo-sitl/build/modules/mavlink_vehicles/include/mavlink/common
Copying fixed headers for protocol 2.0 to /home/gzhang8/course/UAV/code/gazebo-sitl/build/modules/mavlink_vehicles/include/mavlink
-- Configuring done
-- Generating done
-- Build files have been written to: /home/gzhang8/course/UAV/code/gazebo-sitl/build

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)

cmake seems ok. I checked on a fresh install from ubuntu 16.10 that I had in a new machine and it worked fine. I'll try to get a fresh install of 16.04 to see if I can reproduce the issue.

Thank you @rchiossi.

I was able to reproduce the issue on ubuntu 16.04. The problem comes from gcc version. Version 5 was getting confusing with the variable/class naming (it may be a good idea to rework that bit of code). PR #48 solves the issue. @mbelluzzo can you take a look later today at this PR?


Can't install v0.2.13-203916 on Android 5.1.1

When I try to install v0.2.13-203916 on Android 5.1.1 manually, it fails with the following alert: "Parse error. There was a problem parsing the package". When I try to install it using VancedManager, it shows: "Error. Installation failed because the apk files are corrupted, please try again".
There's no such issue with this apk on newer Android versions.
Also I'm able to install the previous version 0.2.13-203915 on this Android 5.1.1 device without any issues.

Fixed.