This is more of a "teach me how to fish" that may be useful for others too.
I have written a rather complex Anchor program. When I run the integration test for it, it fails right away with the following program logs:
Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS invoke  Program log: Instruction: Foo Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS consumed 5981 of 1000000 compute units Program failed to complete: Access violation in stack frame 7 at address 0x200007fd8 of size 8 by instruction #4170 Program Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS failed: Program failed to complete
I could blindly keep changing things till it goes away but that's not very productive.
- Is it possible to narrow down the issue with the info provided in the log message? i.e. address
#4170? How would you go about that?
- Are there any additional logging that could be enabled to provide more info about this?
For the latter, I note that the Solana documentation also mentions an instruction tracing option but setting that env var, prior to
anchor test does not seem to have any effect.
PS. If anyone wondering, this is not my issue.