Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: data file contains a repeated location (1) #29

Open
hacknus opened this issue Mar 21, 2023 · 4 comments
Open

Error: data file contains a repeated location (1) #29

hacknus opened this issue Mar 21, 2023 · 4 comments

Comments

@hacknus
Copy link

hacknus commented Mar 21, 2023

When running dhat 0.3.2 with rustc 1.68.0 (2c8cc3432 2023-03-06) on my MacBook Pro with apple silicon and the following configuration:

#[cfg(feature = "dhat-heap")]
#[global_allocator]
static ALLOC: dhat::Alloc = dhat::Alloc;

fn main() {

    #[cfg(feature = "dhat-heap")]
        let _profiler = dhat::Profiler::new_heap();
    #[cfg(feature = "dhat-heap")]
        println!("lets profile!");
    ...
}

I get the following output:

dhat: Total:     2,197,613,072 bytes in 140,839 blocks
dhat: At t-gmax: 84,232,363 bytes in 22,743 blocks
dhat: At t-end:  4,467,522 bytes in 256 blocks
dhat: The data has been saved to dhat-heap.json, and is viewable with dhat/dh_view.html

but when trying to open the json file either in the web viewer or with with the html from the cloned repo, I get the following error:
Error: data file contains a repeated location (1)

The json itself is attached.
dhat-heap.json.zip

@dullbananas
Copy link

Another file with this issue:
dhat-heap 4.zip

Code: https://github.com/LemmyNet/lemmy/tree/08e835d487b983c44ce2570d8c396d570d426916

I used cargo run with debug profile

@rminderhoud
Copy link

rminderhoud commented Aug 16, 2023

Hello, I am getting the same error. I was able to bypass it by editing the dh_viewer javascript code to suppress the exception but instead I get a different error:

image

It appears dhat-rs may be outputting bad json under certain circumstances but the issue is not obvious to me due to my lack of knowledge with dhat. More specifically with with pp frame data

@blind-oracle
Copy link

Same error here on Linux x86_64

@dennis-barrett
Copy link

dennis-barrett commented Apr 8, 2024

Also receiving this error; x86_64-pc-windows-msvc with dhat 0.3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants