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

failed: Access violation in unknown section at address 0x0 of size 32 #3255

Closed
Lu-Derik opened this issue Sep 16, 2024 · 2 comments
Closed
Labels
duplicate This issue or pull request already exists lang

Comments

@Lu-Derik
Copy link

I have a struct as following:

#[account]
pub struct UserArecState {
pub num_arec_nft_requested: u32,
pub num_arec_nft_canceled: u32,
pub num_arec_nft_issued: u32,
pub num_arec_nft_redeemed: u32,
pub num_arec_nft_liquidized: u32,
pub amount_arec_nft_requested: u64,
pub amount_arec_nft_cancelled: u64,
pub amount_arec_nft_issued: u64,
pub amount_arec_nft_redeemed: u64,
pub amount_arec_nft_liquidized: u64,
pub amount_art_offset: u64
}

impl Space for UserArecState {
const INIT_SPACE: usize = ANCHOR_DISCRIMINATOR + 5 * U32_SIZE + 6 * U64_SIZE;
}

I always received the error in the handing instruction:
...
"Program log: Instruction: MintTo",
"Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb consumed 5414 of 113644 compute units",
"Program TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb success",
"Program 7fEvnVYgDkZfT6JkffusC5f2vcRRMdd6dZqAAWURek61 consumed 92788 of 200000 compute units",
"Program 7fEvnVYgDkZfT6JkffusC5f2vcRRMdd6dZqAAWURek61 failed: Access violation in unknown section at address 0x0 of size 32"

7fEvnVYgDkZfT6JkffusC5f2vcRRMdd6dZqAAWURek61 is the account created to store this struct. This error happens even if I do not update anything to this account.

But once if I remove one or two members from this struct, this error disappear, and everything works well now.

This is very strange, Is there some limitation here? Or is it a Bug?

@Lu-Derik
Copy link
Author

As a workaround, I add a reverse member like:
pub reverse: bool,
It works now. For information, even if I declare "reverse" as u8, the error is still there.

@acheroncrypto acheroncrypto added duplicate This issue or pull request already exists lang labels Sep 16, 2024
@acheroncrypto
Copy link
Collaborator

This is very likely to be related to #3196 (comment), and it's already fixed in the master branch. You might want to try the git version to see if the problem still persists. In the meantime, I'm closing this but feel free to reopen if the issue persists in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists lang
Projects
None yet
Development

No branches or pull requests

2 participants