#tinyxml2 Exeption thrown read access violation
19 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
thats not an "exception" in the sense of try-catch
its a exception in the sense of cpu exception
Generally the solution is not to handle it after the fact, instead you prevent it from happening
imagine if I gave you a letter and asked you to deliver it. But I left the address empty. nullptr is that empty address
In the case of a cpu its probably a crash to try and send that letter.
There are 2 scenarios you get a nullptr:
- intentional: So instead you check if the address is
nullptrwhen you get the letter and then can do your own error handling based on that - bug: so find the place its coming from and fix that so its not giving
nullptranymore
so i need to pass something into the method where the exeption is to avoid the nullptr cpu error?
good explanation :) ty
no
oh
wait kinda
depends what you mean
right now i try to search where the compiler is complaining, what variable or file he dont find
yes
right so to be clear
void foo(int* i) {
*i = 1;
}
```if `i` is `nullptr` this is an error, you are not able to assign an integer to a location where there can be no integer
To fix this you find all your `foo`s and make sure that they are not getting passed `nullptr`
understandable 
@manic egret Has your question been resolved? If so, type !solved :)
!solved