1

I just updated my on chain program on mainnet and started getting "access violation in unknown section", I fixed it by msg! logging out some variables. But msg! logging out some other variables causes the issue once again.

Has anyone ever had this issue before? Seems quite worrying that I can fix an access violation by logging.

solana program version: 1.13.6

I did not experience this on devnet.

2
  • You'll need to provide some more information about your problem, such as the variables you're using and how you're building your program.
    – Jon C
    Commented Feb 3, 2023 at 12:48
  • There is no extra interesting information to add with regards to the code. The error was being caused by just iffing a boolean. I fixed it more permanently by adding inline never to the function.
    – Trevor
    Commented Feb 6, 2023 at 13:03

1 Answer 1

6

Coming back to this a year later. If you are seeing this it's probably because you are using to much stack space.

Moving large structs into Boxes or behind references/not doing to much in a single function, should sort this out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.