René's URL Explorer Experiment


Title: [BUG] Memory accumulation when using load_image in a loop · Issue #365 · arrayfire/arrayfire-rust · GitHub

Open Graph Title: [BUG] Memory accumulation when using load_image in a loop · Issue #365 · arrayfire/arrayfire-rust

X Title: [BUG] Memory accumulation when using load_image in a loop · Issue #365 · arrayfire/arrayfire-rust

Description: The following program crashed. But why? use arrayfire::*; fn main() { let mut y =constant!(0 as u8;1); for i in 0..1000 { let x = load_image::("2dzs/robot_2dz.png".to_string(), true); let z = or(&x, &y, true); y = z.copy(); println!(...

Open Graph Description: The following program crashed. But why? use arrayfire::*; fn main() { let mut y =constant!(0 as u8;1); for i in 0..1000 { let x = load_image::("2dzs/robot_2dz.png".to_string(), true); let z = o...

X Description: The following program crashed. But why? use arrayfire::*; fn main() { let mut y =constant!(0 as u8;1); for i in 0..1000 { let x = load_image::<u8>("2dzs/robot_2dz.png".to_string(), ...

Opengraph URL: https://github.com/arrayfire/arrayfire-rust/issues/365

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Memory accumulation when using load_image in a loop","articleBody":"The following program crashed. But why?\r\n\r\n```\r\nuse arrayfire::*;\r\n\r\nfn main() {\r\n    let mut y =constant!(0 as u8;1);\r\n    for i in 0..1000 {\r\n        let x = load_image::\u003cu8\u003e(\"2dzs/robot_2dz.png\".to_string(), true);\r\n        let z = or(\u0026x, \u0026y, true);\r\n        y = z.copy();\r\n        println!(\"i={}\", i);\r\n    }\r\n    println!(\"max(y)={:#?}\", max_all(\u0026y));\r\n}\r\n\r\n```\r\n\r\n```\r\ni=0\r\ni=1\r\ni=2\r\ni=3\r\ni=4\r\ni=5\r\ni=6\r\ni=7\r\ni=8\r\ni=9\r\ni=10\r\ni=11\r\ni=12\r\ni=13\r\ni=14\r\ni=15\r\ni=16\r\ni=17\r\ni=18\r\ni=19\r\ni=20\r\ni=21\r\ni=22\r\ni=23\r\ni=24\r\ni=25\r\ni=26\r\ni=27\r\ni=28\r\ni=29\r\ni=30\r\ni=31\r\ni=32\r\ni=33\r\ni=34\r\ni=35\r\ni=36\r\ni=37\r\ni=38\r\ni=39\r\ni=40\r\ni=41\r\ni=42\r\ni=43\r\ni=44\r\ni=45\r\ni=46\r\ni=47\r\ni=48\r\ni=49\r\ni=50\r\ni=51\r\nthread 'main' panicked at 'Error message: System or Device ran out of memory\r\nLast error: In function af_load_image\r\nIn file src/api/c/imageio.cpp:393\r\n\r\n\r\n 0# 0x00007F4FC1A299AF in /opt/arrayfire/lib/libafcuda.so.3\r\n 1# 0x0000560F6F590AFF in target/debug/crash\r\n 2# 0x0000560F6F590099 in target/debug/crash\r\n 3# 0x0000560F6F5903AB in target/debug/crash\r\n 4# 0x0000560F6F59031E in target/debug/crash\r\n 5# 0x0000560F6F58FC41 in target/debug/crash\r\n 6# 0x0000560F6F5A707F in target/debug/crash\r\n 7# 0x0000560F6F58FC10 in target/debug/crash\r\n 8# 0x0000560F6F5902EC in target/debug/crash\r\n 9# 0x00007F4FFB823510 in /lib/x86_64-linux-gnu/libc.so.6\r\n10# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6\r\n11# 0x0000560F6F58FB15 in target/debug/crash\r\n', /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:37:14\r\nstack backtrace:\r\n   0: rust_begin_unwind\r\n             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library/std/src/panicking.rs:584:5\r\n   1: core::panicking::panic_fmt\r\n             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library/core/src/panicking.rs:142:14\r\n   2: arrayfire::core::error::handle_error_general\r\n             at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:37:14\r\n   3: arrayfire::core::error::Callback::call\r\n             at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:29:9\r\n   4: arrayfire::core::error::HANDLE_ERROR\r\n             at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/core/error.rs:95:5\r\n   5: arrayfire::image::load_image\r\n             at /home/joe/.cargo/registry/src/mirrors.ustc.edu.cn-12df342d903acd47/arrayfire-3.8.0/src/image/mod.rs:317:9\r\n   6: crash::main\r\n             at ./src/main.rs:6:17\r\n   7: core::ops::function::FnOnce::call_once\r\n             at /rustc/c07a8b4e09f356c7468b69c50cac7fc5b5000b8a/library/core/src/ops/function.rs:248:5\r\nnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.\r\n```\r\n","author":{"url":"https://github.com/3togo","@type":"Person","name":"3togo"},"datePublished":"2022-11-09T16:05:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/365/arrayfire-rust/issues/365"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e90d8724-4422-f566-eaa8-dab869ce80d3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCAA4:A0330:7C69:98C4:696E473D
html-safe-nonce7cbd138eb2fa11a5759ab54934712f66d0035cf1d3dff060f05cf24bf4a88995
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUE0OkEwMzMwOjdDNjk6OThDNDo2OTZFNDczRCIsInZpc2l0b3JfaWQiOiI2NDYwODMwMTMzMDMwNjM1MzI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca43c2ed728b38aab4f504e46ccc9eb6038adaaec84c3d8512abe95c9d66810a9
hovercard-subject-tagissue:1442359809
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/arrayfire/arrayfire-rust/365/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2fee0b5ab144a00bcf5a5e9a0948f8fb5e8f1947c853b392002c381845afea78/arrayfire/arrayfire-rust/issues/365
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2fee0b5ab144a00bcf5a5e9a0948f8fb5e8f1947c853b392002c381845afea78/arrayfire/arrayfire-rust/issues/365
og:image:altThe following program crashed. But why? use arrayfire::*; fn main() { let mut y =constant!(0 as u8;1); for i in 0..1000 { let x = load_image::("2dzs/robot_2dz.png".to_string(), true); let z = o...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:username3togo
hostnamegithub.com
expected-hostnamegithub.com
None3d96554e55b469c47dbcd31f74dc86278872b170531e84c6ce7f3389673e01d1
turbo-cache-controlno-preview
go-importgithub.com/arrayfire/arrayfire-rust git https://github.com/arrayfire/arrayfire-rust.git
octolytics-dimension-user_id5395442
octolytics-dimension-user_loginarrayfire
octolytics-dimension-repository_id35817370
octolytics-dimension-repository_nwoarrayfire/arrayfire-rust
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id35817370
octolytics-dimension-repository_network_root_nwoarrayfire/arrayfire-rust
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseef576694863a4c791d0a5cc9d2b84384d4414bcd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/365#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Farrayfire%2Farrayfire-rust%2Fissues%2F365
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Farrayfire%2Farrayfire-rust%2Fissues%2F365
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=arrayfire%2Farrayfire-rust
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/365
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/365
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/365
arrayfire https://patch-diff.githubusercontent.com/arrayfire
arrayfire-rusthttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Farrayfire-rust
Fork 58 https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Farrayfire-rust
Star 827 https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Farrayfire-rust
Code https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust
Issues 22 https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues
Pull requests 2 https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulls
Discussions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/discussions
Actions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/actions
Projects 1 https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/security
Please reload this pagehttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/365
Insights https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulse
Code https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust
Issues https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues
Pull requests https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulls
Discussions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/discussions
Actions https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/actions
Projects https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/projects
Security https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/security
Insights https://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/arrayfire/arrayfire-rust/issues/365
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/arrayfire/arrayfire-rust/issues/365
[BUG] Memory accumulation when using load_image in a loophttps://patch-diff.githubusercontent.com/arrayfire/arrayfire-rust/issues/365#top
Bughttps://github.com/arrayfire/arrayfire-rust/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com/3togo
https://github.com/3togo
3togohttps://github.com/3togo
on Nov 9, 2022https://github.com/arrayfire/arrayfire-rust/issues/365#issue-1442359809
Bughttps://github.com/arrayfire/arrayfire-rust/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.