Changes between Initial Version and Version 1 of Ticket #12950, comment 1
- Timestamp:
- Sep 20, 2021, 11:55:53 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12950, comment 1
initial v1 2 2 Just writing "should" suffices to trigger the crash (segmentation fault). 3 3 4 Seems to occur because in this part of code ( TTparser::considerRequests()), in this case, _conceptP is nullptr but there's no check for it. For some reason the execution seems to go into findByWordClass() and there "this"is treated as non-null which leads to segmentation fault.4 Seems to occur because in this part of code (`TTparser::considerRequests()`), in this case, `_conceptP` is nullptr but there's no check for it. For some reason the execution seems to go into `findByWordClass()` and there `this` is treated as non-null which leads to segmentation fault. 5 5 6 6 {{{ … … 9 9 https://github.com/scummvm/scummvm/blob/dc1717067322bade8c43536679ece9a9b9a87b49/engines/titanic/true_talk/tt_parser.cpp#L1000 10 10 11 Oddly, while debugging with Visual Studio, the execution goes into findByWordClass() but thisis treated as null and the method returns nullptr.11 Oddly, while debugging with Visual Studio, the execution goes into findByWordClass() but `this` is treated as null and the method returns nullptr. 12 12 13 13 We could fix this by doing something like: … … 17 17 }}} 18 18 19 However, I can see multiple other instances in the same class, where we use _conceptP methods and members unchecked. Not sure if we should fix all the other cases too, or fix the reason why _conceptPis nullptr at that part of the code -- maybe the code wrongly assumes that it should have been initialized earlier or maybe it should have been initialized and it's not?19 However, I can see multiple other instances in the same class, where we use `_conceptP` methods and members unchecked. Not sure if we should fix all the other cases too, or fix the reason why `_conceptP` is nullptr at that part of the code -- maybe the code wrongly assumes that it should have been initialized earlier or maybe it should have been initialized and it's not?