text:
On the new Bear Beta, Search Note doesn't seem to work[Bear Notes] ...

Extension
https://www.raycast.com/hmarr/bear
Description
I tried to search and I get an error:
here is the log
Error: no such table: Z_7TAGS
ZT:index.js:116:8406

113: ,this.lastOut=
114: ;for(var e=this.indentLevel;e>0;e--)this.buffer+=this.indent}}function Ure(e,t,r){var n="<"+e;if(t&&t.length>0)for(var u=0,a;(a=t[u])!==void 0;)n+=" "+a[0]+'="'+this.esc(a[1])+'"',u++;return r&&(n+=" /"),n+=">",n}hr.prototype=Object.create(On.prototype);hr.prototype.render=Yre;hr.prototype.out=Wre;hr.prototype.cr=Hre;hr.prototype.tag=Ure;hr.prototype.esc=vr;var Q_=He(wn());var Je=require("@raycast/api"),Y_=He(s_()),qn=require("react");var Mt=require("react/jsx-runtime");function W_({note:e}){let[t,r]=Gc(),[n,u]=(0,qn.useState)(),[a,i]=(0,qn.useState)();return(0,qn.useEffect)(()=>{t!=null&&(u(t.getBacklinks(e.id)),i(t.getNoteLinks(e.id)))},[t]),r&&(0,Je.showToast)(Je.Toast.Style.Failure,"Something went wrong",r.message),(0,Mt.jsxs)(Je.List,{isLoading:n==null,navigationTitle:e.title,children:[(0,Mt.jsx)(Je.List.Section,{title:"Note Backlinks",children:n?.map(s=>(0,Mt.jsx)(Je.List.Item,{title:s.title===""?"Untitled Note":s.encrypted?"\u{1F512} "+s.title:s.title,subtitle:s.formattedTags,icon:{source:"command-icon.png"},keywords:[s.id],actions:(0,Mt.jsx)(Tt,{isNotePreview:!1,note:s}),accessoryTitle:edited ${(0,Y_.formatDistanceToNowStrict)(s.modifiedAt,{addSuffix:!0})}},s.id))}),(0,Mt.jsx)(Je.List.Section,{title:"Note Links",children:a?.map(s=>(0,Mt.jsx)(Je.List.Item,{title:s.title===""?"Untitled Note":s.encrypted?"\u{1F512} "+s.title:s.title,subtitle:s.formattedTags,icon:{source:"command-icon.png"},keywords:[s.id],actions:(0,Mt.jsx)(Tt,{isNotePreview:!1,note:s}),accessoryTitle:edited ${(0,Y_.formatDistanceToNowStrict)(s.modifiedAt,{addSuffix:!0})}},s.id))})]})}var $T=require("@raycast/api"),zT=require("os");var UT=require("react/jsx-runtime"),HT=(0,zT.homedir)()+"/Library/Group Containers/9K33E3U3T4.net.shinyfrog.bear/Application Data/Local Files";function ud(e,t=!0){if(e===null)return"";let r=e,n=r.matchAll(/\[(?<type>file|image):(?<path>.+)\]/g);for(let u of n){if(u.groups===void 0)return r;let a="";if(u.groups.type==="image"&&!t)a=![](${${HT}/Note Images/${u.groups.path}});else{let i=encodeURI(file://${HT}/${u.groups.type==="file"?"Note Files":"Note Images"}/${u.groups.path});a=Show attached ${u.groups.type}}r=r.replace(u[0],a)}return r}function H_({note:e}){let t=e.encrypted?# ${e.title}
115:
116: This note's content is encrypted:e.text;return(0,UT.jsx)($T.Detail,{markdown:ud(t),navigationTitle:e.title,actions:(0,UT.jsx)(Tt,{isNotePreview:!0,note:e})})}var xe=require("@raycast/api"),QT=He(wn()),At=require("react/jsx-runtime");function jre(){async function e({url:t,tags:r,pin:n}){if(!t){(0,xe.showToast)(xe.Toast.Style.Failure,"URL is required");return}(0,QT.default)(bear://x-callback-url/grab-url?url=${encodeURIComponent(t)}&tags=${encodeURIComponent(r)}&pin=${n?"yes":"no"}),await(0,xe.popToRoot)({clearSearchBar:!0})}return(0,At.jsx)(xe.Action.SubmitForm,{icon:xe.Icon.Globe,title:"Capture in New Note",onSubmit:e})}function U_(){return(0,At.jsxs)(xe.Form,{navigationTitle:"Grab URL",actions:(0,At.jsx)(xe.ActionPanel,{children:(0,At.jsx)(jre,{})}),children:[(0,At.jsx)(xe.Form.TextField,{id:"url",title:"URL",placeholder:"URL of web page to capture (eg. http://raycast.com)"}),(0,At.jsx)(xe.Form.TextField,{id:"tags",title:"Tags",placeholder:"comma,separated,tags"}),(0,At.jsx)(xe.Form.Checkbox,{id:"pin",label:"Pin note to top of note list"})]})}var Q=require("@raycast/api"),GT=He(wn()),ad=require("react"),le=require("react/jsx-runtime");function ene(e){let t=/(^|\n)(?<level>#{1,6})[^\S\t\n\r](?<text>.*)\n/g,r=e.matchAll(t),n=[];for(let u of r){let a={level:u.groups?.level.length??1,text:u.groups?.text??"Some Header"};n.push(a)}return n}function $_({note:e}){let[t,r]=(0,ad.useState)([]);(0,ad.useEffect)(()=>{r(ene(e.text))},[]);let n=()=>{let u=async a=>{if(!a.text){(0,Q.showToast)(Q.Toast.Style.Failure,"Please enter text");return}(0,GT.default)(bear://x-callback-url/add-text?id=${e.id}${a.header==="none"?"":"&header="+encodeURIComponent(a.header)}&mode=${a.mode}&new_line=${a.newLine?"yes":"no"}&tags=${encodeURIComponent(a.tags)}&open_note=${a.openNote!=="no"?"yes":"no"}&new_window=${a.openNote==="new"?"yes":"no"}&show_window=${a.openNote!=="no"?"yes":"no"}&edit=${a.openNote==="no"?"no":"yes"}&timestamp=${a.timestamp?"yes":"no"}&text=${encodeURIComponent(a.text)},{background:a.openNote==="no"}),await(0,Q.closeMainWindow)(),await(0,Q.popToRoot)({clearSearchBar:!0})};return(0,le.jsx)(Q.Action.SubmitForm,{icon:Q.Icon.Plus,title:"Append Text",onSubmit:u})};return(0,le.jsxs)(Q.Form,{navigationTitle:Add Text To: ${e.title},actions:(0,le.jsx)(Q.ActionPanel,{children:(0,le.jsx)(n,{})}),children:[(0,le.jsxs)(Q.Form.Dropdown,{id:"mode",title:"Mode",children:[(0,le.jsx)(Q.Form.Dropdown.Item,{value:"prepend",title:"Prepend"}),(0,le.jsx)(Q.Form.Dropdown.Item,{value:"append",title:"Append"}),(0,le.jsx)(Q.Form.Dropdown.Item,{value:"replace",title:"Replace"}),(0,le.jsx)(Q.Form.Dropdown.Item,{value:"replace_all",title:"Replace All"})]}),(0,le.jsx)(Q.Form.TextArea,{id:"text",title:"Text",placeholder:"Text to add to note ..."}),(0,le.jsx)(Q.Form.Separator,{}),(0,le.jsx)(Q.Form.TextField,{id:"tags",title:"Tags",placeholder:"comma,separated,tags"}),(0,le.jsxs)(Q.Form.Dropdown,{id:"header",title:"Append To Header",children:[(0,le.jsx)(Q.Form.Dropdown.Item,{value:"none",title:"-"}),t.map(({level:u,text:a})=>(0,le.jsx)(Q.Form.Dropdown.Item,{value:a,title:h${u}: ${a}},a))]}),(0,le.jsxs)(Q.Form.Dropdown,{id:"openNote",title:"Open Note",children:[(0,le.jsx)(Q.Form.Dropdown.Item,{value:"no",title:"Don't Open Note"}),(0,le.jsx)(Q.Form.Dropdown.Item,{value:"main",title:"In Main Window"}),(0,le.jsx)(Q.Form.Dropdown.Item,{value:"new",title:"In New Window"})]}),(0,le.jsx)(Q.Form.Checkbox,{id:"newLine",label:"Force new line"}),(0,le.jsx)(Q.Form.Checkbox,{id:"timestamp",label:"Prepend time and date"}),(0,le.jsx)(Q.Form.Checkbox,{id:"pin",label:"Pin note in notes list"})]})}var te=require("@raycast/api"),VT=He(wn()),Te=require("react/jsx-runtime");function tne(){async function e(t){if(!t.text){(0,te.showToast)(te.Toast.Style.Failure,"Please enter text");return}(0,VT.default)(bear://x-callback-url/create?title=${encodeURIComponent(t.title)}&tags=${encodeURIComponent(t.tags)}&open_note=${t.openNote!=="no"?"yes":"no"}&new_window=${t.openNote==="new"?"yes":"no"}&show_window=${t.openNote!=="no"?"yes":"no"}&edit=${t.openNote==="no"?"no":"yes"}&timestamp=${t.timestamp?"yes":"no"}&text=${encodeURIComponent(t.text)},{background:t.openNote==="no"}),await(0,te.closeMainWindow)(),await(0,te.popToRoot)({clearSearchBar:!0})}return(0,Te.jsx)(te.Action.SubmitForm,{icon:te.Icon.Document,title:"Create Note",onSubmit:e})}function z_(){return(0,Te.jsxs)(te.Form,{navigationTitle:"Create Note",actions:(0,Te.jsx)(te.ActionPanel,{children:(0,Te.jsx)(tne,{})}),children:[(0,Te.jsx)(te.Form.TextField,{id:"title",title:"Title",placeholder:"Note Title ..."}),(0,Te.jsx)(te.Form.TextArea,{id:"text",title:"Text",placeholder:"Text to add to note ..."}),(0,Te.jsx)(te.Form.TextField,{id:"tags",title:"Tags",placeholder:"comma,separated,tags"}),(0,Te.jsx)(te.Form.Separator,{}),(0,Te.jsxs)(te.Form.Dropdown,{id:"openNote",title:"Open Note",children:[(0,Te.jsx)(te.Form.Dropdown.Item,{value:"no",title:"Don't Open Note"}),(0,Te.jsx)(te.Form.Dropdown.Item,{value:"main",title:"In Main Window"}),(0,Te.jsx)(te.Form.Dropdown.Item,{value:"new",title:"In New Window"})]}),(0,Te.jsx)(te.Form.Checkbox,{id:"timestamp",label:"Prepend time and date"}),(0,Te.jsx)(te.Form.Checkbox,{id:"pin",label:"Pin note in notes list"})]})}var re=require("react/jsx-runtime");function rne(e){let t=new S_,r=new C_,n;try{let u=ud(e,!1);return n=r.render(t.parse(u)),n}catch(u){return console.log(Error rendering with commonmark: ${String(u)}),(0,N.showToast)(N.Toast.Style.Failure,"Error rendering markdown"),""}}function nne({note:e}){return(0,re.jsx)(N.Action.Push,{title:"Show Note Preview",target:(0,re.jsx)(H_,{note:e}),icon:N.Icon.Text,shortcut:{modifiers:["cmd"],key:"p"}})}function Tt({isNotePreview:e,note:t}){let{focusCursorAtEnd:r}=(0,N.getPreferenceValues)(),n=r?"yes":"no";return(0,re.jsxs)(N.ActionPanel,{children:[(0,re.jsxs)(N.ActionPanel.Section,{title:"Open",children:[(0,re.jsx)(N.Action.Open,{title:"Open in Bear",target:bear://x-callback-url/open-note?id=${t.id}&edit=${n},icon:N.Icon.Sidebar}),t.encrypted?null:(0,re.jsx)(N.Action.Open,{title:"Open in New Bear Window",target:bear://x-callback-url/open-note?id=${t.id}&new_window=yes&edit=${n},icon:N.Icon.Window})]}),t.encrypted?null:(0,re.jsxs)(N.ActionPanel.Section,{title:"Edit",children:[(0,re.jsx)(N.Action.Push,{title:"Add Text",icon:N.Icon.Plus,shortcut:{modifiers:["cmd"],key:"t"},target:(0,re.jsx)($_,{note:t})}),(0,re.jsx)(N.Action,{title:"Move to Archive",onAction:()=>{(0,Q_.default)(bear://x-callback-url/archive?id=${t.id}&show_window=yes,{background:!0}),(0,N.showToast)(N.Toast.Style.Success,"Moved note to archive")},icon:{source:N.Icon.List,tintColor:N.Color.Orange},shortcut:{modifiers:["ctrl","shift"],key:"x"}}),(0,re.jsx)(N.Action,{title:"Move to Trash",onAction:()=>{(0,Q_.default)(bear://x-callback-url/trash?id=${t.id}&show_window=yes,{background:!0}),(0,N.showToast)(N.Toast.Style.Success,"Moved note to trash")},icon:{source:N.Icon.Trash,tintColor:N.Color.Red},shortcut:{modifiers:["ctrl"],key:"x"}})]}),(0,re.jsxs)(N.ActionPanel.Section,{title:"Show in Raycast",children:[e?null:(0,re.jsx)(nne,{note:t}),(0,re.jsx)(N.Action.Push,{title:"Show Note Links",target:(0,re.jsx)(W_,{note:t}),icon:N.Icon.Link,shortcut:{modifiers:["cmd"],key:"l"}})]}),(0,re.jsxs)(N.ActionPanel.Section,{title:"Copy",children:[t.encrypted?null:(0,re.jsx)(N.Action.CopyToClipboard,{title:"Copy Markdown",content:ud(t.text,!1),icon:N.Icon.Clipboard,shortcut:{modifiers:["cmd"],key:"c"}}),t.encrypted?null:(0,re.jsx)(N.Action.CopyToClipboard,{title:"Copy HTML",content:rne(t.text),icon:N.Icon.Terminal,shortcut:{modifiers:["cmd","shift"],key:"c"}}),(0,re.jsx)(N.Action.CopyToClipboard,{title:"Copy Link to Note",content:bear://x-callback-url/open-note?id=${t.id},icon:N.Icon.Link,shortcut:{modifiers:["cmd","opt"],key:"c"}}),t.encrypted?null:(0,re.jsx)(N.Action.CopyToClipboard,{title:"Copy Unique Identifier",content:"note.id",icon:N.Icon.QuestionMark,shortcut:{modifiers:["cmd","opt","shift"],key:"c"}})]}),(0,re.jsxs)(N.ActionPanel.Section,{title:"Create",children:[(0,re.jsx)(N.Action.Push,{title:"New Note",icon:N.Icon.Document,shortcut:{modifiers:["cmd"],key:"n"},target:(0,re.jsx)(z_,{})}),(0,re.jsx)(N.Action.Push,{title:"New Web Capture",icon:N.Icon.Globe,shortcut:{modifiers:["cmd","shift"],key:"n"},target:(0,re.jsx)(U_,{})})]})]})}var Re=require("react/jsx-runtime");function ZT(){let[e,t]=(0,Pn.useState)(""),[r,n]=Gc(),[u,a]=(0,Pn.useState)();(0,Pn.useEffect)(()=>{r!=null&&a(r.getNotes(e))},[r,e]),n&&(0,ye.showToast)(ye.Toast.Style.Failure,"Something went wrong",n.message);let i=(u??[]).length>0&&(0,ye.getPreferenceValues)().showPreviewInListView;return(0,Re.jsx)(ye.List,{isLoading:u==null,onSearchTextChange:t,searchBarPlaceholder:"Search note text or id ...",isShowingDetail:i,children:u?.map(s=>(0,Re.jsx)(ye.List.Item,{title:s.title===""?"Untitled Note":s.encrypted?"\u{1F512} "+s.title:s.title,subtitle:i?void 0:s.formattedTags,icon:{source:"command-icon.png"},keywords:[s.id],actions:(0,Re.jsx)(Tt,{isNotePreview:!1,note:s}),accessoryTitle:i?void 0:edited ${(0,id.formatDistanceToNowStrict)(s.modifiedAt,{addSuffix:!0})},detail:(0,Re.jsx)(ye.List.Item.Detail,{markdown:s.encrypted?"*This note's content is encrypted*":s.text,metadata:(0,Re.jsx)(une,{note:s})})},s.id))})}function une({note:e}){return(0,Re.jsxs)(ye.List.Item.Detail.Metadata,{children:[(0,Re.jsx)(ye.List.Item.Detail.Metadata.TagList,{title:"Tags",children:e.tags.length===0?(0,Re.jsx)(ye.List.Item.Detail.Metadata.TagList.Item,{text:"Untagged"}):e.tags.map(t=>(0,Re.jsx)(ye.List.Item.Detail.Metadata.TagList.Item,{text:t,color:ye.Color.Yellow},t))}),(0,Re.jsx)(ye.List.Item.Detail.Metadata.Label,{title:"Last modified",text:(0,id.formatDistanceToNowStrict)(e.modifiedAt,{addSuffix:!0})}),(0,Re.jsx)(ye.List.Item.Detail.Metadata.Label,{title:"Created",text:(0,id.formatDistanceToNowStrict)(e.createdAt,{addSuffix:!0})}),(0,Re.jsx)(ye.List.Item.Detail.Metadata.Label,{title:"Word count",text:${e.wordCount} words`})]})}0&&(module.exports={});
117: /*! http://mths.be/fromcodepoint v0.2.1 by @mathias /
118: /! http://mths.be/repeat v0.2.0 by @mathias */
119:
Nr:index.js:5:2490
at ray-navigation-stack
ko:index.js:5:2088
Who will benefit from this feature?
Everyone
Anything else?
No response

Also looking for Bear 2 Beta x Raycast support :)

I opened pull request #5706 adding Bear 2 support to the extension 🙂
@raycastbot close this issue

authors: lucaschultz ohong roamnovice


text:
Update qrcode-generator extension

Description

Screencast

Checklist

[ ] I read the extension guidelines
[ ] I read the documentation about publishing
[ ] I ran npm run build and tested this distribution build in Raycast
[ ] I checked that files in the assets folder are used by the extension itself
[ ] I checked that assets used by the README are placed outside of the metadata folder

Hi @Melvynx and @darmiel 👋
I updated the extension, do you mind checking it out 🙂

source: gharchive/pull-request

repo: raycast/extensions

license: MIT

license_type: permissive

license_source: github-api


text:
[Typeform Navigator] choose endpoint + update logo + cache + add icons + move to hooks + show basic responses

Description
I wanted a basic overview of Responses in a certain form which is why we have the following CHANGELOG:

Choose EU or Default API
Updated Typeform logo
Items are now cached for a better experience
Added more icons for list items
Added a very basic view for Responses
Updated dependencies + removed got

By utilizing useFetch, we have 2 slightly generic hooks which provide us with pagination and error handling. We might need to bring back got in the future if any "POST" endpoints are added but that's a problem to discuss later.
Screencast
Unfortunately, I can not share responses from a real form so I am sharing a screencast from a sample account:
https://github.com/user-attachments/assets/ba51424e-acde-4ecc-97bc-396a32307146
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Thanks for the update @xmok
@jdvr do you want to check this?

authors: pernielsentikaer xmok


text:
Remove duplicate bookmarks from search results.

The bookmark search was showing duplicate entries when a URL was bookmarked
multiple times. This was caused by the query returning all bookmark entries
for a URL, including tag-related entries.
The fix uses a window function (ROW_NUMBER) to partition bookmarks by their
foreign key (URL reference) and selects only the entry with the lowest ID
for each URL. This ensures each bookmarked URL appears only once in the results while preserving all bookmark metadata including optional titles.
fixes #15442
Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

I was also getting some db locked and read issues periodically, so I added some retry logic.

Awesome stuff man! Thanks for the contribution.

authors: Keyruu theherk


text:
Updated Any Website Search extension

Extension: extensions/any-website-search
Description
The initial release had bug that ignored the selected search suggestion; this PR fixes it. Also added a setting for search suggestions provider and improved how DDG bang-related intelligence works.

Can you also add so when I change to another engine in the dropdown, then the search results are refreshed?

The suggestion always come from the user's configured search suggestions provider: Google or DuckDuckGo (or none). The selected site in the dropdown is only the "destination" and is not used to get suggestions. So there is nothing to refresh when changing the search engine.


text:
Update obsidian-smart-capture extension

Description
Adding support to fetch links from more browsers: "Arc", "Edge", "Firefox", "Brave" & "Opera"
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

@pernielsentikaer I planned to use them in Readme but forgot to update it.


text:
rayon thread pool coredump

hey, I have a problem with rayon thread pool，Probabilistic coredump. the core like:
rayon::ThreadPoolBuilder::new()
                                    .stack_size(8 * 1024 *1024)
                                    .num_threads((num_cpus::get() * 6 / 8).min(32))
                                    .panic_handler(rayon_panic_handler)
                                    .build()
                                    .expect("Failed to initialize a thread pool for worker")
thread_pool.install(move || {
                                                loop {
                                                    //debug!("mine_one_unchecked");
                                                    let block_header =
                                                        BlockHeader::mine_once_unchecked(&block_template, &terminator_clone, &mut thread_rng())?;
                                                    //debug!("mine_one_unchecked end");
                                                    // Ensure the share difficulty target is met.
                                                    if N::posw().verify(
                                                        block_header.height(),
                                                        share_difficulty,
                                                        &[*block_header.to_header_root().unwrap(), *block_header.nonce()],
                                                        block_header.proof(),
                                                    ) {
                                                        return Ok::<(N::PoSWNonce, PoSWProof<N>, u64), anyhow::Error>((
                                                            block_header.nonce(),
                                                            block_header.proof().clone(),
                                                            block_header.proof().to_proof_difficulty()?,
                                                        ));
                                                    }
                                                }
                                            })

the backtrace:
gdb) bt #0  <alloc::vec::Vec<T,A> as core::ops::deref::Deref>::deref (self=0xf58017d4cd80e144)     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/vec/mod.rs:2402 #1  <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index (self=0xf58017d4cd80e144, index=1)     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/vec/mod.rs:2496 #2  rayon_core::sleep::Sleep::wake_specific_thread (self=0xf58017d4cd80e134, index=1)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/sleep/mod.rs:355 #3  0x000055e3c542dbe0 in rayon_core::sleep::Sleep::notify_worker_latch_is_set (self=0xf58017d4cd80e134, target_worker_index=1)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/sleep/mod.rs:245 #4  rayon_core::registry::Registry::notify_worker_latch_is_set (target_worker_index=1, self=<optimized out>)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:544 #5  <rayon_core::latch::SpinLatch as rayon_core::latch::Latch>::set (self=0x7facd9bec448)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/latch.rs:214 #6  <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute (this=0x7facd9bec448)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/job.rs:123 #7  0x000055e3c53da4b1 in rayon_core::job::JobRef::execute (self=<optimized out>)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/job.rs:59 #8  rayon_core::registry::WorkerThread::execute (self=<optimized out>, job=...)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:749 #9  rayon_core::registry::WorkerThread::wait_until_cold (self=<optimized out>, latch=<optimized out>)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:726 #10 0x000055e3c5633534 in rayon_core::registry::WorkerThread::wait_until (self=0x7facd8be4800, latch=<optimized out>)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:700 #11 rayon_core::registry::main_loop (registry=..., index=9, worker=...)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:833 #12 rayon_core::registry::ThreadBuilder::run (self=...)     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:55 #13 0x000055e3c5635581 in <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}} ()     at /mnt/fstar/.aleo/aleo1/.cargo/registry/src/mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b/rayon-core-1.9.1/src/registry.rs:100 #14 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...)     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:123 #15 0x000055e3c5630994 in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} ()     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/mod.rs:483 #16 <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs:271 #17 std::panicking::try::do_call (data=<optimized out>)     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403 #18 std::panicking::try (f=...) at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367 #19 std::panic::catch_unwind (f=...) at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133 #20 std::thread::Builder::spawn_unchecked::{{closure}} ()     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/mod.rs:482 #21 core::ops::function::FnOnce::call_once{{vtable-shim}} ()     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227 #22 0x000055e3c585ce05 in <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once ()     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691 #23 <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once ()     at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691 #24 std::sys::unix::thread::Thread::new::thread_start () at library/std/src/sys/unix/thread.rs:106 #25 0x00007fb41d7696db in start_thread (arg=0x7facd8be5700) at pthread_create.c:463 #26 0x00007fb41cef061f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

https://github.com/rayon-rs/rayon/blob/v1.5.1/rayon-core/src/sleep/mod.rs#L355 index out of range

cpu: 3970x 7542 with hyperthreading open

This seems similar to #913 and #919, but I was never able to reproduce those myself. Do you have a full example that you can share for your case?

my code is based on a complex library(https://github.com/AleoHQ/snarkVM), It is the client part of a complex system. I don't know if the code will help,  It cannot run alone. I will try to reproduce it in a simple code, and if I reproduce it, I will share the code with you. thanks for your reply！！！

Interesting, #913 also happens to be related to Aleo... but #919 is not, so there still might be a more general bug here.

diff --git a/rayon-core/src/registry.rs b/rayon-core/src/registry.rs
index 4dd7971..06f21da 100644
--- a/rayon-core/src/registry.rs
+++ b/rayon-core/src/registry.rs
@@ -437,8 +437,10 @@ impl Registry {
unsafe {
let worker_thread = WorkerThread::current();
if worker_thread.is_null() {

           println!("in_worker_cold");
           self.in_worker_cold(op)
       } else if (*worker_thread).registry().id() != self.id() {

           println!("in_worker_cross");
           self.in_worker_cross(&*worker_thread, op)
       } else {
           // Perfectly valid to give them a `&T`: this is the

diff --git a/rayon-core/src/thread_pool/mod.rs b/rayon-core/src/thread_pool/mod.rs
index 5edaedc..23f7ab7 100644
--- a/rayon-core/src/thread_pool/mod.rs
+++ b/rayon-core/src/thread_pool/mod.rs
@@ -108,6 +108,7 @@ impl ThreadPool {
OP: FnOnce() -> R + Send,
R: Send,
{

   println!("install");
   self.registry.in_worker(|_, _| op())

}

i can't find any extra pool.install invoke in func "BlockHeader::mine_once_unchecked"

ThreadPool::join, scope, and scope_fifo each call install as well.
If this is specifically an issue between multiple pools, per in_worker_cross, that's new information.
Can you capture a backtrace of all threads? In gdb that's thread apply all backtrace (t a a bt for short), and you can use logging to write that to a text file.

By the way, I have edited your comments to use fenced code blocks for readability, as described here:
https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks

ThreadPool::join, scope, and scope_fifo each call install as well.
If this is specifically an issue between multiple pools, per in_worker_cross, that's new information.
Can you capture a backtrace of all threads? In gdb that's thread apply all backtrace (t a a bt for short), and you can use logging to write that to a text file.

thanks， i will try to capture a backtrace

i test a patch below, the coredump frequency has decreased.
diff --git a/rayon-core/src/job.rs b/rayon-core/src/job.rs
index a71f1b0..9dd1aa4 100644
--- a/rayon-core/src/job.rs
+++ b/rayon-core/src/job.rs
@@ -4,6 +4,7 @@ use crossbeam_deque::{Injector, Steal};
 use std::any::Any;
 use std::cell::UnsafeCell;
 use std::mem;
+use std::sync::Mutex;

 pub(super) enum JobResult<T> {
     None,
@@ -73,6 +74,7 @@ where
     pub(super) latch: L,
     func: UnsafeCell<Option<F>>,
     result: UnsafeCell<JobResult<R>>,
+    m: Mutex<bool>,
 }

 impl<L, F, R> StackJob<L, F, R>
@@ -86,6 +88,7 @@ where
             latch,
             func: UnsafeCell::new(Some(func)),
             result: UnsafeCell::new(JobResult::None),
+            m: Mutex::new(false),
         }
     }

@@ -114,6 +117,15 @@ where
         }

         let this = &*this;
+        {
+            let mut guard = this.m.lock().unwrap();
+            if *guard {
+                println!("job has been comsumed.");
+                return
+            }
+            *guard = true;
+        }
+        let _holder = this.latch.hold();
         let abort = unwind::AbortIfPanic;
         let func = (*this.func.get()).take().unwrap();
         (*this.result.get()) = match unwind::halt_unwinding(call(func)) {
diff --git a/rayon-core/src/latch.rs b/rayon-core/src/latch.rs
index 1d573b7..c4f3275 100644
--- a/rayon-core/src/latch.rs
+++ b/rayon-core/src/latch.rs
@@ -41,6 +41,9 @@ pub(super) trait Latch {
     /// and it's typically better to read all the fields you will need
     /// to access *before* a latch is set!
     fn set(&self);
+    fn hold(&self) -> Option<Arc<Registry>> {
+        None
+    }
 }

 pub(super) trait AsCoreLatch {
@@ -214,6 +217,11 @@ impl<'r> Latch for SpinLatch<'r> {
             registry.notify_worker_latch_is_set(target_worker_index);
         }
     }
+
+    #[inline]
+    fn hold(&self) -> Option<Arc<Registry>> {
+        Some(Arc::clone(self.registry))
+    }
 }

On the 3970X platform， Coredump disappeared for 2 days +
#!/bin/bash
export RUST_BACKTRACE=full

ulimit -c unlimited
x=1
name="sh-94"
if [ $# == 1 ];then
        x=$1
        echo $x-$1
fi
while true
do
for ((i=1; i<=$x; i++))
do
        echo "process $i"
        ./target/debug/worker --address aleo1nuhl5vf8xdldzxsfnzsnsdgfvqkuufzex2598fzjuxkq2qrl5qzqupr666 --tcp_server "36.189.234.195:4133"  --ssl_server "36.189.234.195:4134" --ssl --custom_name $name --parallel_num 6 >> log_$i 2>&1 &
        # sudo prlimit --core=unlimited --pid $!
done

wait
cur_dateTime="`date +"%Y-%m-%d %H:%M:%S"`"
echo "restart $cur_dateTime" >> running_history
done

aleo1@x3970x-94:~/snarkOS$ cat running_history
restart 2022-04-24 15:06:30
restart 2022-04-24 18:58:54
restart 2022-04-25 10:59:33
restart 2022-04-25 17:47:02
restart 2022-04-26 03:13:02
restart 2022-04-26 13:33:20
restart 2022-04-26 14:40:14
restart 2022-04-26 17:18:15
aleo1@x3970x-94:~/snarkOS$
aleo1@x3970x-94:~/snarkOS$
aleo1@x3970x-94:~/snarkOS$ date
Fri Apr 29 09:59:04 CST 2022

On the 3990X platform， Coredump occurred once in two days. Unfortunately, I did not grab the Coredump file when the coredump occurred.
At first I suspected that stackJob was consumed twice, but I didn't catch the log "job has been comsumed" when I coredump on 3990x. so my guess was wrong.

Can you try it with just the "hold" addition?
There are comments in SpinLatch::set about making sure the pool is kept alive, dating back to #739. In review, it still seems like we're doing the right thing there, but I could be wrong.

the coredump frequency has decreased in my case.

Coredump occurred once in two days.

Oh, it's still not completely fixed? In that case, it might be that the Mutex is adding enough synchronization to make some race condition harder to fail, but that's just a guess.

Can you try it with just the "hold" addition?
There are comments in SpinLatch::set about making sure the pool is kept alive, dating back to #739. In review, it still seems like we're doing the right thing there, but I could be wrong.

I've tried that， the mutex lock i added dind't work, the "holder" seems to be working, because the coredump frequency has dropped significantly on both of my platforms，but it still not completely fixed. For the same reson.
## 3970x
aleo1@x3970x-94:~/snarkOS$ cat running_history
restart 2022-04-24 15:06:30
restart 2022-04-24 18:58:54
restart 2022-04-25 10:59:33
restart 2022-04-25 17:47:02
restart 2022-04-26 03:13:02
restart 2022-04-26 13:33:20
restart 2022-04-26 14:40:14
restart 2022-04-26 17:18:15
restart 2022-05-01 08:31:29
restart 2022-05-04 02:25:54
aleo1@x3970x-94:~/snarkOS$ date
Thu May  5 09:51:18 CST 2022

## 3990x since 2022-04-28
ps@filecoin-21891:~/6pool-worker-file$ cat running_history
restart 2022-05-03 05:15:09
restart 2022-05-04 08:54:47
ps@filecoin-21891:~/6pool-worker-file$ date
2022年 05月 05日 星期四 09:52:40 CST

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./target/debug/worker --address aleo1nuhl5vf8xdldzxsfnzsnsdgfvqkuufzex2598fzjux'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  <alloc::vec::Vec<T,A> as core::ops::deref::Deref>::deref (self=0x1b8)
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/vec/mod.rs:2402
2402	/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/vec/mod.rs: No such file or directory.
[Current thread is 1 (Thread 0x7f92f87fb700 (LWP 118675))]
warning: Missing auto-load script at offset 0 in section .debug_gdb_scripts
of file /mnt/fstar/.aleo/aleo1/snarkOS/target/debug/worker.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) bt
#0  <alloc::vec::Vec<T,A> as core::ops::deref::Deref>::deref (self=0x1b8)
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/vec/mod.rs:2402
#1  <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index (self=0x1b8, index=3)
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/vec/mod.rs:2496
#2  rayon_core::sleep::Sleep::wake_specific_thread (self=0x1a8, index=3)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/sleep/mod.rs:357
#3  0x00005588f821a238 in rayon_core::sleep::Sleep::notify_worker_latch_is_set (self=0x1a8, target_worker_index=3)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/sleep/mod.rs:247
#4  rayon_core::registry::Registry::notify_worker_latch_is_set (target_worker_index=3, self=<optimized out>)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:546
#5  <rayon_core::latch::SpinLatch as rayon_core::latch::Latch>::set (self=0x7f92505f6138)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/latch.rs:217
#6  <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute (this=0x7f92505f6138)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/job.rs:135
#7  0x00005588f81fb4de in rayon_core::job::JobRef::execute (self=<optimized out>)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/job.rs:60
#8  rayon_core::registry::WorkerThread::execute (self=<optimized out>, job=...)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:751
#9  rayon_core::registry::WorkerThread::wait_until_cold (self=<optimized out>, latch=<optimized out>)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:728
#10 0x00005588f845caf4 in rayon_core::registry::WorkerThread::wait_until (self=0x7f92f87fa880, latch=<optimized out>)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:702
#11 rayon_core::registry::main_loop (registry=..., index=1, worker=...)
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:835
#12 rayon_core::registry::ThreadBuilder::run (self=...) at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:55
#13 0x00005588f845a211 in <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}} ()
    at /mnt/fstar/.aleo/aleo1/rayon/rayon-core/src/registry.rs:100
#14 std::sys_common::backtrace::__rust_begin_short_backtrace (f=...)
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:123
#15 0x00005588f845db84 in std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}} ()
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/mod.rs:483
#16 <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once (self=..., _args=<optimized out>)
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panic/unwind_safe.rs:271
#17 std::panicking::try::do_call (data=<optimized out>)
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:403
#18 std::panicking::try (f=...) at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:367
#19 std::panic::catch_unwind (f=...) at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panic.rs:133
#20 std::thread::Builder::spawn_unchecked::{{closure}} ()
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/thread/mod.rs:482
#21 core::ops::function::FnOnce::call_once{{vtable-shim}} ()
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/ops/function.rs:227
#22 0x00005588f8679d05 in <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once ()
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691
#23 <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once ()
    at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/alloc/src/boxed.rs:1691
#24 std::sys::unix::thread::Thread::new::thread_start () at library/std/src/sys/unix/thread.rs:106
#25 0x00007f940454d6db in start_thread (arg=0x7f92f87fb700) at pthread_create.c:463
#26 0x00007f9403cd461f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

I would still like to see thread apply all backtrace too.

I would still like to see thread apply all backtrace
gdb.txt

I am testing another patch：rayon-coredump.diff.txt
        My basic idea is to keep the "SpinLatch instance (here)" alive until "latch.set() (here)" is executed. This ensures that the calling thread waits here for the computed thread to terminate the latch.set() call.
        If the patch works, I think there is a real possibility of a potential problem with the code handling race conditions, although it is not easy to spot.
        The 24 hour test results look normal so far, I will continue to test for a period of time until something goes wrong or the problem does not recur for a long time
diff --git a/rayon-core/src/latch.rs b/rayon-core/src/latch.rs
index 1d573b7..0ecf381 100644
--- a/rayon-core/src/latch.rs
+++ b/rayon-core/src/latch.rs
@@ -143,6 +143,7 @@ pub(super) struct SpinLatch<'r> {
     registry: &'r Arc<Registry>,
     target_worker_index: usize,
     cross: bool,
+    life_lock: Mutex<()>,
 }

 impl<'r> SpinLatch<'r> {
@@ -157,6 +158,7 @@ impl<'r> SpinLatch<'r> {
             registry: thread.registry(),
             target_worker_index: thread.index(),
             cross: false,
+            life_lock: Mutex::new(()),
         }
     }

@@ -165,9 +167,16 @@ impl<'r> SpinLatch<'r> {
     /// safely call the notification.
     #[inline]
     pub(super) fn cross(thread: &'r WorkerThread) -> SpinLatch<'r> {
+        //SpinLatch {
+        //    cross: true,
+        //    ..SpinLatch::new(thread)
+        //}
         SpinLatch {
+            core_latch: CoreLatch::new(),
+            registry: thread.registry(),
+            target_worker_index: thread.index(),
             cross: true,
-            ..SpinLatch::new(thread)
+            life_lock: Mutex::new(()),
         }
     }

@@ -187,6 +196,7 @@ impl<'r> AsCoreLatch for SpinLatch<'r> {
 impl<'r> Latch for SpinLatch<'r> {
     #[inline]
     fn set(&self) {
+        let _life = self.life_lock.lock().unwrap();
         let cross_registry;

         let registry = if self.cross {
@@ -216,6 +226,17 @@ impl<'r> Latch for SpinLatch<'r> {
     }
 }

+impl<'r> Drop for SpinLatch<'r> {
+    fn drop(&mut self) {
+        {
+            let _life = self.life_lock.lock().unwrap();
+        }
+        //if self.cross {
+        //    println!("Drop SpinLatch");
+        //}
+    }
+}
+
 /// A Latch starts as false and eventually becomes true. You can block
 /// until it becomes true.
 #[derive(Debug)]

gdb.txt

Wow, 832 threads total, and 688 of them are rayon threads?!?
Then there are 141 tokio threads, 2 threads that are just starting, and the main thread.
Technically there's no reason why that many threads should cause memory problems, but you're severely oversubscribed unless most of those are idle. I do see 529 in rayon_core::sleep::Sleep::sleep, leaving 159 active rayon threads. If nothing else, this will cause a lot of context switching and exacerbate whatever race condition we're facing.

gdb.txt

Wow, 832 threads total, and 688 of them are rayon threads?!? Then there are 141 tokio threads, 2 threads that are just starting, and the main thread.
Technically there's no reason why that many threads should cause memory problems, but you're severely oversubscribed unless most of those are idle. I do see 529 in rayon_core::sleep::Sleep::sleep, leaving 159 active rayon threads. If nothing else, this will cause a lot of context switching and exacerbate whatever race condition we're facing.

Yes, I have 12 globally independent Rayon pools that are concurrently executing "BlockHeader::mine_once_unchecked", and BlockHeader::mine_once_unchecked is almost unchecked during execution (although the number is fixed at 48? ) Temporary pool. My 3900X platform has 64/128 (HyperThread) cores.

I am testing another patch：rayon-coredump.diff.txt         My basic idea is to keep the "SpinLatch instance (here)" alive until "latch.set() (here)" is executed. This ensures that the calling thread waits here for the computed thread to terminate the latch.set() call.         If the patch works, I think there is a real possibility of a potential problem with the code handling race conditions, although it is not easy to spot.         The 24 hour test results look normal so far, I will continue to test for a period of time until something goes wrong or the problem does not recur for a long time
diff --git a/rayon-core/src/latch.rs b/rayon-core/src/latch.rs
index 1d573b7..0ecf381 100644
--- a/rayon-core/src/latch.rs
+++ b/rayon-core/src/latch.rs
@@ -143,6 +143,7 @@ pub(super) struct SpinLatch<'r> {
     registry: &'r Arc<Registry>,
     target_worker_index: usize,
     cross: bool,
+    life_lock: Mutex<()>,
 }

 impl<'r> SpinLatch<'r> {
@@ -157,6 +158,7 @@ impl<'r> SpinLatch<'r> {
             registry: thread.registry(),
             target_worker_index: thread.index(),
             cross: false,
+            life_lock: Mutex::new(()),
         }
     }

@@ -165,9 +167,16 @@ impl<'r> SpinLatch<'r> {
     /// safely call the notification.
     #[inline]
     pub(super) fn cross(thread: &'r WorkerThread) -> SpinLatch<'r> {
+        //SpinLatch {
+        //    cross: true,
+        //    ..SpinLatch::new(thread)
+        //}
         SpinLatch {
+            core_latch: CoreLatch::new(),
+            registry: thread.registry(),
+            target_worker_index: thread.index(),
             cross: true,
-            ..SpinLatch::new(thread)
+            life_lock: Mutex::new(()),
         }
     }

@@ -187,6 +196,7 @@ impl<'r> AsCoreLatch for SpinLatch<'r> {
 impl<'r> Latch for SpinLatch<'r> {
     #[inline]
     fn set(&self) {
+        let _life = self.life_lock.lock().unwrap();
         let cross_registry;

         let registry = if self.cross {
@@ -216,6 +226,17 @@ impl<'r> Latch for SpinLatch<'r> {
     }
 }

+impl<'r> Drop for SpinLatch<'r> {
+    fn drop(&mut self) {
+        {
+            let _life = self.life_lock.lock().unwrap();
+        }
+        //if self.cross {
+        //    println!("Drop SpinLatch");
+        //}
+    }
+}
+
 /// A Latch starts as false and eventually becomes true. You can block
 /// until it becomes true.
 #[derive(Debug)]

this patch seems works fine. Coredump has not appeared so far.
# 3970x platform
aleo1@x3970x-94:~/snarkOS$ cat running_history
restart 2022-04-24 15:06:30
restart 2022-04-24 18:58:54
restart 2022-04-25 10:59:33
restart 2022-04-25 17:47:02
restart 2022-04-26 03:13:02
restart 2022-04-26 13:33:20
restart 2022-04-26 14:40:14
restart 2022-04-26 17:18:15
restart 2022-05-01 08:31:29
restart 2022-05-04 02:25:54
start 2022-05-05 13:57:53
aleo1@x3970x-94:~/snarkOS$ date
Mon May  9 11:15:43 CST 2022

#3990x platform
restart 2022-05-03 05:15:09
restart 2022-05-04 08:54:47
start 2022-05-05 14:51:45
ps@filecoin-21891:~/6pool-worker-file$ date
2022年 05月 09日 星期一 11:17:02 CST

# running script
#!/bin/bash
cur_dateTime="`date +"%Y-%m-%d %H:%M:%S"`"
echo "start $cur_dateTime" >> running_history
export RUST_BACKTRACE=full

ulimit -c unlimited
x=1

name="sh-91"
# hk
#tcp_server="61.10.9.34:4133"
#ssl_server="61.10.9.34:4134"
# china
tcp_server="36.189.234.195:4133"
ssl_server="36.189.234.195:4134"

if [ $# == 1 ];then
        x=$1
        echo $x-$1
fi
while true
do
for ((i=1; i<=$x; i++))
do
        echo "process $i"
        ./worker --address aleo1nuhl5vf8xdldzxsfnzsnsdgfvqkuufzex2598fzjuxkq2qrl5qzqupr666 --tcp_server $tcp_server --ssl_server $ssl_server --ssl --custom_name $name --parallel_num 12 >> log_$i 2>&1 &
        # sudo prlimit --core=unlimited --pid $!
done

wait
cur_dateTime="`date +"%Y-%m-%d %H:%M:%S"`"
echo "restart $cur_dateTime" >> running_history
done

I think I found the issue -- could you see if this fixes it for you?
diff --git a/rayon-core/src/latch.rs b/rayon-core/src/latch.rs
index 1d573b781612..b84fbe371ee3 100644
--- a/rayon-core/src/latch.rs
+++ b/rayon-core/src/latch.rs
@@ -189,19 +189,21 @@ impl<'r> Latch for SpinLatch<'r> {
     fn set(&self) {
         let cross_registry;

-        let registry = if self.cross {
+        let registry: &Registry = if self.cross {
             // Ensure the registry stays alive while we notify it.
             // Otherwise, it would be possible that we set the spin
             // latch and the other thread sees it and exits, causing
             // the registry to be deallocated, all before we get a
             // chance to invoke `registry.notify_worker_latch_is_set`.
             cross_registry = Arc::clone(self.registry);
-            &cross_registry
+            &*cross_registry
         } else {
             // If this is not a "cross-registry" spin-latch, then the
             // thread which is performing `set` is itself ensuring
-            // that the registry stays alive.
-            self.registry
+            // that the registry stays alive. However, that doesn't
+            // include this *particular* `Arc` handle if the waiting
+            // thread then exits, so we must completely dereference it.
+            &**self.registry
         };
         let target_worker_index = self.target_worker_index;

Ok, I will test and give feedback.

Haha, "* &" is confusing in Rust

Yeah, that * invokes Deref, then & to capture an inner reference.

I have applied the patch above to start the test, and I think you found the real problem, the 'Arc' handle's Lifecycle has no guarantee.
aleo1@x3970x-94:~/rayon$ git diff
diff --git a/rayon-core/src/latch.rs b/rayon-core/src/latch.rs
index 1d573b7..b84fbe3 100644
--- a/rayon-core/src/latch.rs
+++ b/rayon-core/src/latch.rs
@@ -189,19 +189,21 @@ impl<'r> Latch for SpinLatch<'r> {
     fn set(&self) {
         let cross_registry;

-        let registry = if self.cross {
+        let registry: &Registry = if self.cross {
             // Ensure the registry stays alive while we notify it.
             // Otherwise, it would be possible that we set the spin
             // latch and the other thread sees it and exits, causing
             // the registry to be deallocated, all before we get a
             // chance to invoke `registry.notify_worker_latch_is_set`.
             cross_registry = Arc::clone(self.registry);
-            &cross_registry
+            &*cross_registry
         } else {
             // If this is not a "cross-registry" spin-latch, then the
             // thread which is performing `set` is itself ensuring
-            // that the registry stays alive.
-            self.registry
+            // that the registry stays alive. However, that doesn't
+            // include this *particular* `Arc` handle if the waiting
+            // thread then exits, so we must completely dereference it.
+            &**self.registry
         };
         let target_worker_index = self.target_worker_index;

aleo1@x3970x-94:~/rayon$

aleo1@x3970x-94:~/snarkOS$ cat running_history
restart 2022-04-24 15:06:30
restart 2022-04-24 18:58:54
restart 2022-04-25 10:59:33
restart 2022-04-25 17:47:02
restart 2022-04-26 03:13:02
restart 2022-04-26 13:33:20
restart 2022-04-26 14:40:14
restart 2022-04-26 17:18:15
restart 2022-05-01 08:31:29
restart 2022-05-04 02:25:54
start 2022-05-05 13:57:53
start 2022-05-11 09:48:25
aleo1@x3970x-94:~/snarkOS$

ps@filecoin-21891:~/6pool-worker-file$ cat running_history
restart 2022-05-03 05:15:09
restart 2022-05-04 08:54:47
start 2022-05-05 14:51:45
start 2022-05-11 09:58:30

https://github.com/rayon-rs/rayon/issues/929#issuecomment-1123104488
all tests seems ok. In addition to the two machines previously tested, six more machines participated in the test.
ps@filecoin-21891:~/6pool-worker-file$ cat running_history
restart 2022-05-03 05:15:09
restart 2022-05-04 08:54:47
start 2022-05-05 14:51:45
start 2022-05-11 09:58:30
ps@filecoin-21891:~/6pool-worker-file$ date
2022年 05月 12日 星期四 09:27:28 CST

aleo1@x3970x-94:~/snarkOS$ cat running_history
restart 2022-04-24 15:06:30
restart 2022-04-24 18:58:54
restart 2022-04-25 10:59:33
restart 2022-04-25 17:47:02
restart 2022-04-26 03:13:02
restart 2022-04-26 13:33:20
restart 2022-04-26 14:40:14
restart 2022-04-26 17:18:15
restart 2022-05-01 08:31:29
restart 2022-05-04 02:25:54
start 2022-05-05 13:57:53
start 2022-05-11 09:48:25
aleo1@x3970x-94:~/snarkOS$ date
Thu May 12 09:27:26 CST 2022

@cuviper

source: gharchive/issue

authors: cuviper scuwan

repo: rayon-rs/rayon


text:
[Cleanup] use C code that is also compatible with C++

While the template is valid C code, it does not work well when converted to C++. Some users would like to use the template as the starting point for C++ code.
This PR makes a few small changes to the C code to make it also compatible with C++.

use the scene enums everywhere, not a mix of enums and numbers (also makes the code read better)
don't pass the address of unnamed temp variables into functions, allocate an actual structure.

These changes allow the c files to be simply renamed C++ and compile without issues.

@JeffM2501 Thanks! I'm used to use integers for enum types, maybe it's about time to change to a stronger typeage mode... :)

license: Zlib


text:
[RTEXTURES] Remove the panorama cubemap layout option

The panorama cube map option was not implemented, so this PR removes it from the enumeration in raylib.h so that users do not get confused and try to use it.
I left a todo in the code for some aspiring developer to finish.

@JeffM2501 thanks for the review!


text:
个人月度任务安排 | 方子龙

https://www.raysonblog.cn/monthplan/

test gitment

authors: raysonfang wave-gbt

repo: raysonfang/blog-comments


text:
Optimize memory usage in ChipTuneEngine.

Optimize memory usage in ChipTuneEngine so that instead of generating all waveforms per note first and then playing them, instead we create a waveform one or a few notes or beats before it is about to be played and then freeing up the memory just as a note has finished playing.

Optionally group together sounds that are identical for more efficient memory usage.


text:
Add editor-in-editor textel editor

To make freehand painting much easier.
Also indicate if the supplied material index already exists or not.

Use key 'E' (for edit).

repo: razterizer/TextUR


text:
docs

i am real new to hydra json in whole.
i managed to install package and i get:
{
    "@context": {
        "@vocab": "http:\/\/politiebureaus.localhost\/docs",
        "hydra": "http:\/\/www.w3.org\/ns\/hydra\/core#",
        "rdf": "http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#"
    },
    "@id": "http:\/\/politiebureaus.localhost\/docs",
    "@type": "hydra:ApiDocumentation",
    "hydra:title": "Politie Hydra API",
    "hydra:description": "Politie API that conforms to the Hydra specification",
    "hydra:entrypoint": null,
    "hydra:supportedClass": "[]"
}

As shows, i can set description etc in .env
I had expected my App\Models classes in hydra:supportedClass ?
or something in entrypoint ?
Is there some docs around telling me what to do now?
Or is there an example project use-ing this package?
Else some suggestions?
thanks,
Noud

Sorry, I didn't get too far with this project, I was trying something as a proof of concept and it hasn't really worked out. I'm going to archive the project as I don't really have too much time to invest in it at the moment. If you're looking for a resource to build a Hydra API then I'd recommend you get started with API Platform, if you haven't seen it already. If it has to be Laravel I don't think there's much out there, and my personal feeling after trying this project is that Laravel's opinionated nature makes working with Hydra very difficult. By all means fork the repo and see how you get on, though. Sorry I can't be more helpful right now.


text:
need aprove and pull request

          need aprove and pull request

Originally posted by @MorgunovE in https://github.com/rbabari/Test-1277-A13/issues/3#issuecomment-2447939967

pull request approved


text:
Add development scripts

scripts/install - Install dependencies in a virtual environment.
scripts/test - Run the test suite.
scripts/lint - Run the code linting.
scripts/publish - Publish the latest version to PyPI.

Fixed by https://github.com/rbw/snow/pull/44

repo: rbw/snow


text:
bashunit does not provide test reports option yet

Currently bashunit does not have an option to output test report files.
As a workaround (see #12) this adapter runs a test command per test function name. This allow us to have individual results and individual outputs.
With a test report we could be able to at least:

Run all tests in a file with just 1 command
Run all test files in a directory with just 1 command
Show inline errors about what went wrong in running a test

Hi everyone,
After careful consideration and further usage of the adapter, as well as observing increased community adoption, I have decided that the proposed functionality to generate test report files is no longer necessary for our project. The same goals can be achieved without this specific integration.
Therefore, I am closing this issue. I greatly appreciate all the time and effort that everyone has put into this discussion and proposal.

repo: rcasia/neotest-bash


text:
Use Docusign for signing documents.

We have now several documents that need a signature of either one person or more persons:

SoW
W9 tax form

So we don't have to paste a Signature.jpg in documents anymore.
Evan is in takes care of the process

You do not need to use Docusign to sign documents. You can sign in a google
doc by Insert Drawing, and Line, Scribble tool before exporting as PDF or
using Adobe acrobat, Tools, Sign.
On Sun, Oct 8, 2017 at 10:07 AM, HJ Hilbolling notifications@github.com
wrote:

We have now several documents that need a signature of either one person
or more persons:

SoW
https://docs.google.com/document/d/1MH-wHbLy_4KSjQeyd5bJNwCS6mGYsuXEA8q4GyooAwY/editP
W9 tax form
https://www.google.com/url?q=https://www.irs.gov/pub/irs-pdf/fw9.pdf&sa=D&ust=1507471167994000&usg=AFQjCNEbXCPjmkmAvOiIrgH8trSWW0zE4Q

So we don't have to paste a Signature.jpg in documents anymore.
Evan is in takes care of the process
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/rchain/Members/issues/120, or mute the thread
https://github.com/notifications/unsubscribe-auth/AC5YEZIIukQu10GSHgj_Y3tO9lu2seLzks5sqNcNgaJpZM4Pxt1c
.

Don't you think signing documents digitally would be easier to verify?

authors: Ojimadu jimscarver lapin7

repo: rchain/Members

license: mit

license_source: bigquery


text:
Errors in ploting dyads

Hello team,
I'm facing an issue while plotting dyad density (the occupancy plots come out fine).
My data is from MNase-seq in yeast.
The error messages are -
Error in (function (classes, fdef, mtable)  :
unable to find an inherited method for function ‘coverage’ for signature ‘"NULL"’
Calls: Main ... ComputeNormalizationFactors -> coverage ->
Could you please let me know what could be the issue?
I can provide other information as required.
Many thanks,
Jeff

Hi Jeffrey,
based on the error, it looks like the reads are NULL.
You get reads object from input file path, genome name, and annotations:
rawReads <- LoadReads(params$inputFilePath, params$genome, annotations)

reads <- CleanReads(rawReads, annotations$chrLen, params$lMin, params$lMax)

Then, you call ComputeNormalizationFactors with reads as parameter:
ComputeNormalizationFactors <- function(reads)  {
	occ <- coverage(reads)

If you want to share raw data and annotations with me, I can debug it.
Best,
Paula

Hi Paula,
Thanks for the reply.
I have managed to troubleshoot the problem. It was coming from an issue with the BAM file index. It had been overwritten by the script.
Thanks,
Jeff

authors: jeff-godwin paulati


text:
User profile

Small fixes to enable users to click to see a profile and makes sure a user has a github username when they create an account.

Looks good!

authors: agundy seveibar


text:
Pharos-targets: Download sql file to separate dir

The changes to https://github.com/rcsb/py-rcsb_workflow/pull/7 did the trick for stashing Pharos-targets data, however, it unnecessarily included the downloaded latest.sql.gz and pharos-update.sql in the file. It caused a 500 error from GitHub when trying to push 7 gb worth of 50 mb part files.
This change puts the downloaded SQL dump into a separate directory and keeps Pharos-targets for what will be stashed and used by PharosTargetActivityProvider.

This doesn't have any affect the rest of the code because they are specifically using the tdd files in Pharos-targets. That isn't changing, just the location of the SQL file that is downloaded to generate those files (via mySQL).


text:
Feature: Numeric Datatypes

Implements the remaining xsd and owl datatypes and makes the appropriate datatype arbitrary precision.
Additionally fixes the performance of numeric serialization by utilizing <charconv>
Some tests missing.

Tests failing because didn't implement fetchcontent stuff yet

Also: will use the test from the other older numeric types PR

Btw, compile times are really suffering. Maybe we should include explicit template specializations in a cpp file afterall. Although I'm not entirely certain that this would help

TODOs:

[ ] fix compile times
[ ] fix float,double to_string
[ ] make build without conan work

Summed up, I think we can just remove the extra CMake file for datatypes, right?
Yes, I just forgot to delete it 😅


text:
RDKDEV-774 Add support for dm-verity based bundles

Adds support for dm-verity[1] based encrypted
bundles.
It uses OMI[2] service to mount encrypted bundles.
[1] https://docs.kernel.org/admin-guide/device-mapper/verity.html
[2] https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/rdk-oe/meta-cmf/+/refs/heads/rdk-next/recipes-support/omi/omi.bb
Signed-off-by: Damian Wrobel dwrobel.contractor@libertyglobal.com
Signed-off-by: Damian Wrobel dwrobel@ertelnet.rybnik.pl
Change-Id: Iac4e76b9dcbe411ee4226a24a9b1ea8f197df681

Internal ticket for tracking https://ccp.sys.comcast.net/browse/RDKCOM-4033

Counterpart for the main branch: https://github.com/rdkcentral/rdkservices/pull/4177.

authors: dwrobel pradeeptakdas

repo: rdkcentral/rdkservices


text:
InChI calculation for Sulfur with valence 4 and 6 omits hydrogens

Describe the bug
For molecules with sulfur with valence 4 and 6, valence is reduced to 2 when computing an InChI and hydrogens are lost. I looked through the InChI Standard Valences, and I don't believe this is a normalization change (Appendix I in InChI technical manual) https://www.inchi-trust.org/all-downloadable-versions/
To Reproduce
mol1 = Chem.MolFromSmiles('CN(C)[SH3]')
for atom in mol1.GetAtoms():
    print(atom.GetSymbol(), atom.GetTotalValence(),  atom.GetTotalNumHs())
C 4 3
N 3 0
C 4 3
S 4 3

Chem.MolToInchi(mol1)
InChI=1S/C2H7NS/c1-3(2)4/h4H,1-2H3

mol2 = Chem.MolFromSmiles('CN(C)[SH5]')
for atom in mol2.GetAtoms():
    print(atom.GetSymbol(), atom.GetTotalValence(),  atom.GetTotalNumHs())
C 4 3
N 3 0
C 4 3
S 6 5

print(Chem.MolToInchi(mol2))
InChI=1S/C2H7NS/c1-3(2)4/h4H,1-2H3

Expected behavior
Here are the InChIs that I was expecting:
For CN(C)[SH3] ---> InChI=1S/C2H9NS/c1-3(2)4/h1-2,4H3
For CN(C)[SH5] ---> InChI=1S/C2H11NS/c1-3(2)4/h1-2H3,4H5
Configuration (please complete the following information):

RDKit version: 2023.03.1
OS: Ubuntu 22.04
Python version (if relevant): 3.11.3
Are you using conda? Yes
If you are using conda, which channel did you install the rdkit from? conda-forge
If you are not using conda: how did you install the RDKit? N/A

It is more to the inchi library authors that to rdkit itself, but on the other hand molecules you wrote are not correct, as in the form you wrote them a charge is missing.

authors: vfscalfani wopozka

repo: rdkit/rdkit


text:
Install prop-types as peer, babel-plugin-dev-expression as dev

Hello!
I noticed this two errors in your package.json.
As prop-types is used in your codebase, it makes it impossible to use tools like BundlePhobia: https://bundlephobia.com/result?p=@reach/router

thanks, looks like you've got prop-types as a normal, not peer dependency?

@ryanflorence Yes, it was the point of @sheepsteak, I change that to respect the prop-types project documentation.

authors: ryanflorence zoontek

repo: reach/router


text:
Consider creating a truffle framework box on this template

Is your feature request related to a problem? Please describe.
So dapps (decentralized applications) are growing and are using react to create web apps to connect to the ethereum network. Truffle is the framework used to assist with this. there are templates called truffle boxes to create apps. I honestly think your react template is the best template out there and think you should integrate your amazing template
Describe the solution you'd like
I wanted to actually take a version of your boilerplate I have and create a box on it. But I thought I would let you know, maybe you want to, contribute yourselves.
Describe alternatives you've considered
Here are the steps to create a box. If you don't want to do this. Let me know, ill attempt to create one based on your template.
Additional context
Here is the react box I am using at the moment.

Excellent! We'd love to be be part of a Truffle box for dapps!
Personally what little time I can dedicate to OS work I try to dedicate to this project directly but I'd be happy to help out if any questions/issues come up.
I'll keep this open as I'm sure the rbp+dapps intersection will be relevant to a few people who come here.

Closing for lack of activity.

authors: jacques-trixta julienben

repo: react-boilerplate/react-boilerplate


text:
Update issue templates

We should consider adding 2 separate templates for bug and feature to further guide people when they visit with their ideas/problems. imo the more guidance the better.

Thanks @jwinn !

Coverage remained the same at 100.0% when pulling c236d01eba4e778dc048f6ce16e3cb5e65ea0fc2 on update-templates into 435e07b10b769da07c912ffb439dcd233fd3dbbb on master.

Coverage remained the same at 100.0% when pulling c236d01eba4e778dc048f6ce16e3cb5e65ea0fc2 on update-templates into 435e07b10b769da07c912ffb439dcd233fd3dbbb on master.

authors: coveralls gretzky


text:
Parent Navigator of Nested loses path params

Off the back of #1232
Simplified Example
const AppStackNavigation = StackNavigator({
  Profile: {
    path: 'profile/:profileId',
    screen: TabNavigator({
      overview: {
        path: 'overview',
        screen: () => <View/>,
      },
      activity: {
        path: 'activity',
        screen: () => <View/>,
      },
    },
  },
}

Paths and their results
Using AppStackNavigation.router.getActionForPathAndParams :

profile/123 => {routeName: 'Profile', params: {profileId :undefined}} ❌
profile/123/ => {routeName: 'Profile', params: {profileId :undefined}}❌
profile/123/anything => {routeName: 'Profile', params: {profileId :123}} 👍
profile/123/activity => {routeName: 'Profile', params: {profileId :123}, action: {routeName:'activity'}} 👍

Simplified the results a bit to make it easier to understand. But basically I would have thought that stackitem/someparam as a path would still work if the stackitem is a navigator

any update?

Hi there @onlydave ,
In an effort to cleanup this project and prioritize a bit, since this issue had no follow up since my last comment I'm going to close it.
If you are still having the issue (especially if it's a bug report) please check the current open issues, and if you can't find a duplicate, open a new one that uses the new Issue Template to provide some more details to help us solve it.

authors: eduardoleal kelset onlydave

repo: react-community/react-navigation


text:
How are we supposed to set this up when we don't use an EXPO project?

Your example illustrates the assumption that the user has an App.js file built from
Expo.
How do we use the DrawerNavigator when we have index.ios.js and index.android.js?
All I get is Native module cannot be null.
Thanks

Let those files, index.ios.js and index.android.js render a component which eventually renders your navigator, or render your navigator directly inside the render() method of your root component. Navigators are React components and can be rendered like any other component.


text:
怎么关联 array of object

数据结构类似于：
{
  title: 'test',
  items: [{
    id: 1
    title: 'xxx'
  }, {
    id: 2
    title: 'xxxx'
  }]
}

根据 input-array 这个例子，
先使用
getFieldValue('items').map

但是 map 里的 input 怎么关联到 id 和 title 这样的字段呢
{...getFieldProps('item.title')}

并没有生效

getFieldProps 第一个参数必须唯一，所以应该这样:
`item${index}.title`

研究下这两个例子：
http://react-component.github.io/form/examples/input-array.html
http://react-component.github.io/form/examples/checkbox-group.html

getFieldValue('items').map((item, index) => (
  <Input
    {...getFieldProps(`item${index}.title`)}
  />
));

input 里还是没有值出现，打印了下 fields，{ name: item0.title } ，并没有 value 值
貌似没找到可在 codepen 直接引用的 js ，不太好做示例呃

write as below, you need initialValue to let it display in input.
then in onFieldsChange function (usually redux reducer) to update relate value.
like split prop string (eg: item.0.title), get index, then update.
getFieldValue('items').map((item, index) => (
  <Input
    {...getFieldProps(`item.${index}.title`, {
      initialValue: item.title,
    })}
  />
));

设置 initialValue 后让它显示，然后在 onFieldsChange 去更新相关的值，就可以了

authors: alayii benjycui

repo: react-component/form


text:
How can I use in mobile phone?

Is your feature request related to a problem? Please describe.
Looks like your react-dnd library is not support mobile devices. Or any idea you can provide to me to implememt in mobile?
Describe the solution you'd like
Think is your events listener do not listen the touch events list touch start, move and end. right? not sure.

Has anyone had a chance to look into this yet?

I'm not a maintainer but have you tried the TouchBackend?
It's documented on the first page, it might be helpful:
https://react-dnd.github.io/react-dnd/docs/overview#backends

The library currently ships with the HTML backend, which should be sufficient for most web applications. There is also a Touch backend that can be used for mobile web applications.

authors: larissa-n laurentsenta zy-zero

repo: react-dnd/react-dnd


text:
Contributor

Hi @bluebill1049 ,
I've been working with react-hook-forms for a while and the results are great. In return I would love to contribute to this repo in any way I can.
Cheers, sigfried.

aha that would be awesome! I will keep you in the loop on what we can work together.  you can take a preview on V1 there is a branch now.

It's going to be an interesting and useful project :)

It's going to be an interesting and useful project :)

Indeed :+1:

Hey @sigfriedCub1990 you want to help on the filter functionality?

the filter name part?
cd app
yarn
yarn start

everything lives inside the devTools folder.

Sure thing @bluebill1049 I'll look into it today's afternoon :)

@kotarella1110 if you got sometimes, please help improve the types :) ❤

@bluebill1049 yeah! i will improve types 💚

amazing! @kotarella1110 🙏

it's an ongoing thing, let's close this issue for now. feel free to send PR to improve this devtool


text:
How To Get Refresh Token on Both IOS and Android

Is it possible to get Refresh Token on this package?? Apparently it is not included on the documentation so I'm assuming it is not configured to get refresh token.
And also is it also possible to get expiration date for access token on Android?? I've read that it is only available on IOS.
Environment

react-native : 0.55.0
react-native-google-signin : 0.12.0
react : 16.3.0-alpha.0

i found that fixed in #398 should i fork repo, or any better solution that can pull newest commits

I might be able to answer this question if you can provide some context about what you're trying to achieve. Are you looking for a refresh token because you're trying to do some offline API access, server-side perhaps?

I also have this problem. I am using google contact api v3 to get contact list(name, photo).
To get contact photo, I need access_Token, but it is expired soon.
How can I get refresh_token to access Google api when I need?

I'm also facing the same problem, I'm wondering why I do not receive a refreshToken. Just like the post above, I'm looking for the refresh token in order to refresh to access token when it has been checked to be expired.

related: https://stackoverflow.com/questions/35154509/android-how-to-get-refresh-token-by-google-sign-in-api

Thanks for the quick reply! I sent the serverAuthCode in a request and I only got a new accessToken.
I tried some other things and I've just remembered that I only get a refreshToken on the first request.
I got the refreshToken when I send the serverAuthCode immediately on the first authentication.

Just for clearity, the access token you will receive from GoogleSignin.getTokens();  will only last for about an hour, to get a new access_token we need to send serverAuthCode to https://oauth2.googleapis.com/token with fields : client_id, client_secret, code(this is serverAuthCode), grant_type(its value should be authorization_code), redirect_uri(can set it from developers console). Remember to only use the serverAuthCode  that you get on your first attempt when you just allowed your app for the permissions FIRST TIME otherwise you will get grant_error every time. After getting the refresh_token, we need to get the new access_token  using refresh token that we just got, so now just replace the value of grant_type  from authorization_code  to refresh_token  and also replace the value of  code field to refresh_token , fill its value and send a post request to the same url, you will get a fresh access_token that will be valid for 1 hour.

authors: Esxiel Sebosam anton128 deejaygeroso thomasw vonovak webdevfarhan

repo: react-native-community/google-signin


text:
model close animation from bottom to top not working

animationOut={'slideOutUp'}  not working.

Please reopen an issue following the issue template.

authors: PrantikMondal rewieer


text:
Broken example

Is this lib still maintained ? The example is broken on both Androis/iOS and web.
What is the current way of loading an svg in react-native + web ?
Thanks and best!

Updated the example a bit, can you try again: https://snack.expo.io/@msand/react-native-svg-example
The best way depends a bit on the use case. It the content is static, then I would recommend using react-native-svg-transformer with plain .svg files. If you need dynamic content, then you can import the elements from react-native-svg and create normal react components. They should work in react-native, react-native-web and plain react-dom (requires aliasing react-native-web to react instead) based projects.

Thanks for updating the example. Many of the example from the README.md, produce error, such as non existing SvgCss SvgXml imported from react-native-svg.
I was not able to import from a .svg files, even if I did expo install react-native-svg.
What worked the best for me was recreating the svg in react with Path from react-native-svg.
I have found that animateTransform was not existing in the library while I wanted to use my svg for the splash screen and the animation is required to make it spin.
Why are some imports not defined from the main library? If possible I'd like to repair the import so i can do the animation.

This is an example of error I have when importing svg on the web:
bundle.js:69367 Warning: </static/media/splashScreen.0f923900.svg /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.
    in /static/media/splashScreen.0f923900.svg (at SplashScreen/index.js:34)

Seems more like it's react-native-svg-transformer related issue, or naming issue. Are you trying to use SvgCss / SvgXml in an Expo web project? They aren't defined for the web yet, as there are several processing modes to choose from, and you can easily implement your own: https://github.com/react-native-community/react-native-svg/issues/1230

Yes I was using it for the web. But that was a fallback decision, after I noticed that Platform.OS from react-native-web in expo sdk36 was always pointing to web, even if started on the expo client from an iPhone or Android.
Otherwise, if the import of the .svg would work for the web, by work I mean importing a ReactComponent instead of showing a path string.

authors: kopax msand

repo: react-native-community/react-native-svg


text:
How to configure tabs slide transition?

When I set new index to state of tabview (i.e. switch tabs programatically, from a button click) tabs switch too fast for me, I'd like to have a slower transition. Docs say there's configureTransition callback, but don't say how should it be written and how does that 'transition configuration' that it should return should look like. Could you please, pour some light on it and update the docs?

Hi! You can use configureTransition as following:
  configureTransition={() => ({
    timing: Animated.spring,
    tension: 300,
    friction: 35,
  })}

If it can help you out, you also have TransitionConfigurator's type with Flow and you can check out how the callback is used under the hood right here :)

@CharlesMangwa does this still work as described? For me the configureTransition prop has no effect. It doesn't get executed at all.

authors: CharlesMangwa Druux you-fail-me


text:
feat(windows): implementation for useBatteryLevel & useBatteryLevelIsLow

Description
Fixes #1528

add subscription to Battery.ReportUpdated in Initialize and send event RNDeviceInfo_batteryLevelDidChange with latest battery level
check for low battery condition of <20 and send event RNDeviceInfo_batteryLevelIsLow with latest battery level
update readme to reflect added functionality

Compatibility

OS
Existing
Implemented

iOS
✅
❌

Android
✅
❌

Windows
❌
✅

Checklist

[x] I have tested this on a device/simulator for each compatible OS
[x] I added the documentation in README.md
[ ] I updated the typings files (privateTypes.ts, types.ts)
[ ] I added a sample use of the API (example/App.js)

Code looks fine, thanks for the PR!
The failure seems unrelated to the functionality:
$ patch-package
'patch-package' is not recognized as an internal or external command,

This seems like some sort of systemic issue but why is it just popping up now? I use patch-package all the time :-) - this should be working...
I assume you have built + tested this locally? It all works for you?

@mikehardy I was also trying to figure this out, but it seems some issue with Github flow, as same run is getting passed on my fork of the repo. Github flow sometimes is wacky though so can't say for sure. You can check E2E run details here - https://github.com/sohail-p/react-native-device-info/actions/runs/4613458100/jobs/8155450012?pr=2
I have tested Android and Windows locally but not iOS

The last re-run it failed on iOS because hashfiles took too long on the iOS worker 😆 - re-running but obviously that has nothing to do with your PR, will merge regardless of status on the iOS run since windows made it through this time, and it will auto-release

Thanks @mikehardy

authors: mikehardy sohail-p


text:
fix part of #3: created seperate css file for explore page

Refers: #3
Changes:

made seperate css file for explore page.

@pranshuchittora sir please review this pr.

Pls pull the new changes

@pranshuchittora sir please review this pr.

repo: react-native-elements/playground


text:
fix: ios onRegionChange stops firing up when animateCamera is called …

Does any other open PR do the same thing?
No
What issue is this PR fixing?
[IOS] onRegionChangeComplete is not firing up at all
(please link the issue here) #4110
How did you test this PR?
On IOS, calling animate camera repeatedly, it never stops firing the event as before
Create a map, crete a flow of animateCamera called repeatedly, and print the result of onRegionChangeComplete
tested on simulator iPhone 13 iOs 15.4 and real device iPhone Xr iOs 15.5

Can a maintainer please look at this?

Hi @Simon-TechForm and @christopherdro, who is reviewing PR's on this lib currently? Could perhaps one of you be so kind as to review this one? We have a lot riding on this bug getting solved. Thanks!!

@kappu72 Thanks again for the PR. I forked the branch from your PR and I receive the following error in my app trying when opening the screen that contains the map:
View config getter callback for component AIRGoogleMap must be a function (received undefined)
Is this something you're familiar with?

repo: react-native-maps/react-native-maps


text:
fix: Allow ',' in viewBox attribute

Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-svg@12.1.0 for the project I'm working on.
I have added a replace regex to remove comma's (,) in viewBox. According to MDN viewBox numbers are separated by whitespace and/or a comma.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-svg/src/lib/extract/extractViewBox.ts b/node_modules/react-native-svg/src/lib/extract/extractViewBox.ts
index c4515b5..8053617 100644
--- a/node_modules/react-native-svg/src/lib/extract/extractViewBox.ts
+++ b/node_modules/react-native-svg/src/lib/extract/extractViewBox.ts
@@ -38,7 +38,7 @@ export default function extractViewBox(props: {

   const params = (Array.isArray(viewBox)
     ? viewBox
-    : viewBox.trim().split(spacesRegExp)
+    : viewBox.trim().replace(/,/g, '').split(spacesRegExp)
   ).map(Number);

   if (params.length !== 4 || params.some(isNaN)) {

This issue body was partially generated by patch-package.
Let me know if I you want me to create a pull request or not.

This patch does not account for numbers that are separated by commas but not whitespace(for example: 0, 0, 400,69.83316168898044), updating it to the following will address that issue.
viewBox.trim().replace(/,/g, ' ').replace(/  +/g, ' ').split(spacesRegExp)

repo: react-native-svg/react-native-svg


text:
build(typescript): update typescript dependencie to fix npx tsc issue

reference:
https://stackoverflow.com/questions/45790182/typescript-error-ts5014-unexpected-token-u-in-json-at-position-0
#186

This don't fix #186 for me


text:
Minimum React Native version support

I would like to only support RN versions from the past year. The thinking is that if you are not upgrading your RN app for more than a year, you are also probably not upgrading core dependencies like this one. This would put us at RN v0.64.
This means publishing patches to older major versions if the latest has more recent requirements. For example, if we decide that v7 only supports RN 0.68 with new architecture, we will continue to support v6 for RN versions up to a year old.
Thoughts?

I agree it can be problematic to maintain old react-native version.
In all RN modules I saw, they said they don't support of version ...
Now with turbo module and new architecture, I am not sure of the exact impact in terms of dependancies.
maybe @douglowder can give some clues

react-native-maps already does something similar, even more strict actually: https://github.com/react-native-maps/react-native-maps#compatibility

authors: Adnan-Bacic freeboub hueniverse

repo: react-native-video/react-native-video


text:
not displaying properly on android

Bug
##Android
Environment info
react-native version
"react-native": "^0.64.2",
"react-native-video": "^5.2.0",
taking time to display video  in flatlist with images

to be followed in: https://github.com/react-native-video/react-native-video/issues/2668

authors: freeboub ubaid-wp


text:
Stopping momentum scroll triggers click event on Android

#863
Same issue, but not fixed yet

react-native version: 0.71.6
react-native-webview version: 11.26.0

I just tried to reproduce this and I see exactly the same behavior in Chrome.
If you see different behavior between the WebView and Chrome, please share a sample repro.


text:
You can't navigate back from last tab to first on iOS, if the tab has auto width

Current Behavior
When I give a width: 'auto' or width: null, flex: 1 to the tabStyle, I can't navigate back from last page if there is not enough tab to overflow the screen.
Expected Behavior
Either to be able to scroll the tabbar or to not move the selected tab item to the left side of the screen like on android.
How to reproduce
In the demo, on iOS select the Settings2 menu and try to navigate back to Home menu.
A device which is big enough either on portrait or landscape to show all tabs.
Your Environment

software
version

react-navigation
2.18.2

react-native
0.57

node
10.13.0

npm or yarn
yarn

@satya164 - not sure what the expected behavior is for top tabs or if this is supported. @Xyzor it might be helpful if you share a mockup or description of what you're trying to accomplish

My main goal is to use flex: 1 on tabStyle, instead of fixed width, because with fixed width the tab's label either break into new lines or some tabs are unnecessarily wide.
On android the demo is working because when i select a tab, it doesn't move to the left.

The width depends on the width of the tab bar. Dynamic width for the tab items is not supported because it's every complicated to implement. I'm not sure what you're trying to achieve, but you probably need to customize the tab bar itself or use a custom tab bar.

@satya164 Thanks for the info.

authors: Xyzor brentvatne satya164

repo: react-navigation/react-navigation-tabs


text:
Direct link not building hierarchy as desired

Context/flow
If it helps, this is what I'm trying to accomplish:

Venues shows a list of venues
Clicking on one of the venues takes you to VenueDetails
At the venue you can add stuf to your cart, and open up your cart, which takes you to OrderDetails

I need a way for the url to remember I took this route so I can go back down the chain in case the user refreshes or opens the link in a new tab.
Description
I've set up my linking as follows:
export default function (containerRef) {
  return useLinking(containerRef, {
    prefixes: [Linking.makeUrl('/')],
    config: {
      Root: {
        initialRouteName: 'Venues',
        path: '',
        screens: {
          Venues: '',

          VenueDetails: {
            path: 'venue/:slug',
            parse: { slug: String },
          },

          OrderDetails: {
            path: 'venue/:slug/order-overview',
            parse: { slug: String },
          },
        }
      }
    }
  })
}

What I want is to open OrderDetails when I navigate to /venue/some-slug/order-overview.
If I revert the order in the useLinking object (so: OrderDetails, VenueDetails and then Venue) this works, but it doesn't see that VenueDetails is the previous page.
How can I tell react-navigation/linking that going "back" from OrderDetails means it should go to VenueDetails? And that going back from VenueDetails means it should go to Venue? Can I define a parent somehow? Maybe I need to put it in the url somehow?
Note: it works fine when starting at the home page and doing the normal navigation flow. It's only when I open up a nested page directly that this fails.
Is this repo still being worked on by the way? The last release was a while ago. I'd like to help but I don't know where to start.

I believe this repo deprecated and moved on react-navigation
this file is for web
https://github.com/react-navigation/react-navigation/blob/master/packages/native/src/useLinking.tsx

authors: RWOverdijk soroushm

repo: react-navigation/web


text:
PrismLight using results in regular [object Object] output (but only in production)

Describe the bug
I'm using import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter'; which results in regular [object Object] [object Object] ... output (around 7 of 10 refreshs of my webpage) for my code blocks (but only in production). Notice: import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; has the same problem. Every 4th to 5th refresh, it's working correctly, otherwise it's rendering [object Object] ...
To Reproduce
Steps to reproduce the behavior: This is my implementation, notice that the processedCode output of the process function is always correct (also in production). But even without this process function, the problem persists.
import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter';
import tsx from 'react-syntax-highlighter/dist/esm/languages/prism/tsx';
import typescript from 'react-syntax-highlighter/dist/esm/languages/prism/typescript';
import { vs, vscDarkPlus } from 'react-syntax-highlighter/dist/esm/styles/prism';

SyntaxHighlighter.registerLanguage('tsx', tsx);
SyntaxHighlighter.registerLanguage('typescript', typescript);

interface ICodeBlock {
  code: string;
  language: 'typescript' | 'tsx';
}

const process = (code = '') => {
  let skippedLeadingEmptyLines = false;
  let lastNonEmptyLineIndex = 0;
  let minRawStringIndentation = Number.MAX_SAFE_INTEGER;
  let numberOfRemovedLines = 0;

  const processNonEmptyLine = (line: string, index: number) => {
    // keep track of the index of the last non-empty line
    lastNonEmptyLineIndex = index - numberOfRemovedLines;
    // determine the minimum indentation level
    minRawStringIndentation = Math.min(minRawStringIndentation, Math.max(0, line.search(/\S/)));
    // return the processed line
    return [line.trimEnd()];
  };

  // split code into lines
  const codeLines = code.split('\n');

  // remove empty lines, and process non-empty lines
  const nonEmptyLinesAtStart = codeLines.flatMap((line, index) => {
    if (!skippedLeadingEmptyLines) {
      if (line.match(/^\s*$/)) {
        numberOfRemovedLines += 1;
        return [];
      }

      skippedLeadingEmptyLines = true;
      return processNonEmptyLine(line, index);
    }

    if (line.match(/^\s*$/)) return [''];

    return processNonEmptyLine(line, index);
  });

  const nonEmptyLinesStartAndEnd = nonEmptyLinesAtStart.slice(0, lastNonEmptyLineIndex + 1);

  // If there are no non-empty lines, return an empty string
  if (nonEmptyLinesStartAndEnd.length === 0) return '';

  const nonRawStringIndentationLines =
    minRawStringIndentation !== 0
      ? nonEmptyLinesStartAndEnd.map((line) => line.substring(minRawStringIndentation))
      : nonEmptyLinesStartAndEnd;

  return nonRawStringIndentationLines.join('\n');
};

export const CodeBlock = ({ code, language }: ICodeBlock) => {
  const { isLight } = useThemeContext();

  const processedCode = process(code);

  const theme = isLight ? vs : vscDarkPlus;

  return (

      <SyntaxHighlighter language={language} style={theme}>
        {processedCode}
      </SyntaxHighlighter>

  );
};

It's working when I do a bad workaround to force reloading of the component:
// ...
useEffect(() => {
  const timerId = setTimeout(() => setIsReloaded(true), 0);

  return () => clearTimeout(timerId);
}, []);

return isReloaded ? (

    <SyntaxHighlighter language={language} style={theme}>
      {processedCode}
    </SyntaxHighlighter>

) : null;

Expected behavior
Output my code string (it's a simple code string of a React Component) instead of [object Object] in some cases. Oddly enough in my dev environment it's always working fine, only in production is the rendering issue with [object Object]
Screenshots

Desktop (please complete the following information):

Browser firefox
Version 111.0.1 (64-Bit)

I'm getting this issue on a non-local environment as well

We see this same issue intermittently with PrismAsyncLight as well.

For others with this issue, using @fenkx's fork fixes the issue, the easiest way to switch is just change this line in your package.json:
"react-syntax-highlighter": "npm:@fengkx/react-syntax-highlighter@15.6.1"

I have the same issue but I guess this package is not maintained anymore 😕

I had the same problem, but the above scenario didn't solve my problem.

+1

May I add my opinion here? I'm experiencing the same issue. Hopefully, it has been resolved, but I want to share this for anyone who might be facing the same problem.
I think the following procedure is causing the issue:

Open a page with target="_blank" (in this case, the user only opens the tab without switching to it).
Once the tab is loaded and the user switches to it, the code is displayed as [Object object].
Therefore, I have made it re-render when the user switches tabs.

Below is a part of the code I wrote.
function CodeBlock({/* ... */}) {
  const [codeBlock, setCodeBlock] = useState<ReactElement | null>(null);

  useEffect(() => {
    renderCodeBlock();
    document.addEventListener('visibilitychange', renderCodeBlock);
    return () => {
      setCodeBlock(() => null);
      document.removeEventListener('visibilitychange', renderCodeBlock);
    };
  }, []);

  function renderCodeBlock() {
    setCodeBlock(() => (
      <Box
        component={SyntaxHighlighter}
        language={language}
        showLineNumbers
        style={atomDark}
      >
        {code.trim()}
      </Box>
    ));
  }

  return (
    <Box>
      {codeBlock === null ? (
        <CircularProgress />
      ) : (
        codeBlock
      )}
    </Box>
  );
}

Please note that this text has been translated and might contain some unnatural parts.

This happens to me as well, what can I do about this?

I'm experiencing this issue as well. I was able to work around it by adding this to my index.tsx file before I render my React app:
import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter'

ReactDOM.createRoot(document.createElement('div')).render(
  <SyntaxHighlighter language="" children={''} />
)

Can confirm, the workaround by jeremyckahn works with SSR and production. No more problems when using hydrateRoot.

authors: C5H8NNaO4 FujiwaraChoki MatchuPitchu ShaofeiZi bodinsamuel humphd jeremyckahn jtsorlinis kkn1125 lritter79


text:
Vertical scrollbar hiding last column data

Describe the bug
Vertical scrollbar hiding last column data if we have horizontal bar too and last column width is reduced.
To Reproduce
Any react table with 3 or more columns, increase the width of middle column and reduce the width of last column , when you scroll right to end you will find one or two characters are hiding under vertical scroll bar.
Expected behavior
Vertical scrollbar should be post last column width should not hide the details showing in last column
Codesandbox!
you can use https://codesandbox.io/s/o5np5p0nrz codesand box and increase width of columns adding screen shot too.
Screenshots

Desktop (please complete the following information):
Windows / Crome

Browser - chrome
Version 68.0.3440.106

RT wasn't designed for inline-scrolling, hence the pagination, so unfortunately, there is no official support for this use-case. You're more than welcome to explore and ask in the forum though! https://spectrum.chat/react-table

@Mulli can you suggest how to do ? looking for few workarounds

authors: Mukesh-Bhootra tannerlinsley

repo: react-tools/react-table


text:
Errors after downloading JavaScript bundle

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s%s, undefined,  You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check your code at Button.js:38.,
    in Button (at Welcome.js:144)
    in RCTView (at Block.js:155)
    in Block (at Welcome.js:143)
    in RCTView (at Block.js:155)
    in Block (at Welcome.js:129)
    in Welcome (at SceneView.js:9)
    in SceneView (at StackViewLayout.tsx:899)
    in RCTView (at StackViewLayout.tsx:898)
    in RCTView (at StackViewLayout.tsx:897)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.tsx:106)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:71)
    in Screen (at StackViewCard.tsx:93)
    in Card (at createPointerEventsContainer.tsx:95)
    in Container (at StackViewLayout.tsx:985)
    in RCTView (at screens.native.js:101)
    in ScreenContainer (at StackViewLayout.tsx:394)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.tsx:384)
    in PanGestureHandler (at StackViewLayout.tsx:377)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.tsx:104)
    in RCTView (at Transitioner.tsx:267)
    in Transitioner (at StackView.tsx:41)
    in StackView (at createNavigator.js:80)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (at createAppContainer.js:430)
    in NavigationContainer (at App.js:62)
    in RCTView (at Block.js:155)
    in Block (at App.js:61)
    in App (at withExpoRoot.js:26)
    in RootErrorBoundary (at withExpoRoot.js:25)
    in ExpoRoot (at renderApplication.js:40)
    in RCTView (at AppContainer.js:101)
    in RCTView (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:39)
`

Also this one:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Button`.

@litehacker hey, do you version of Expo and React-Native you'r using?

any word on this bug? I got the same bug
"expo": "^36.0.0",
"react": "16.9.0",

@devbrunopaula I think this is because the current code base in based on an older expo version. I'll update the code base to the latest versions.

authors: devbrunopaula hetmann litehacker


text:
added logo component and make logo component spin

Fixes Issue
PR to fix  issue #84
Changes proposed
added a logo component in the component directory and make logo spin
Requirements
Create a component named Logo in the components folder that implements the screenshots below.
It should accept a size as prop for the different sizes on the header and footer.
The logo should rotate similar to how it does in a fresh create react app installation as shown on this GIF.
Obtain the logo from the Figma design. Use THIS VIDEO as a guide
Acceptance Criteria

[x] The implementation should match the design.

Screenshots

Note to reviewers
The Logo spin animation was performed using the tailwind css animation class.

ok i will do that now

repo: reactdeveloperske/reactdevske-website