Notes |
|
|
Strange, I just used latest trunk and expert TP worked well (VCMI_Tests_2011b, give Tome of Earth to Inteus). |
|
|
(0003190)
|
cirdan
|
2012-10-27 14:22
|
|
CObjectListWindow::changeSelection uses a boost iterator, so it may depend on the internal data representation boost, or the compiler, or whatever, uses for std::list. There is certainly a check for 'item' not to be null, so I assume that it can be null under some circumstances, but the check does not extend to the second use of item->index, due to the missing braces (the indentation suggests that they should be there), and that's where gdb shows I'm getting the crashes. |
|
|
|
I agree, but need to investigate more. Any specific conditions or possible town selection? |
|
|
(0003192)
|
cirdan
|
2012-10-27 14:57
|
|
Sorry, I should have given you more information. When I select expert town portal for casting, the town selection window appears as normal. Then, as soon as I click on any town (just the name of the town, to select it), the client crashes. Running the client from gdb shows that the crash comes from CObjectListWindow::changeSelection. Specifically, there is always an iteration in the loop in which 'element' is cast to a null 'item'; this null 'item' is not dereferenced in the first item->index check, which is protected by the 'if', but it is on the second, leading to the crash. I don't know why a null 'item' appears in the list, but it certainly does.
Since I can get the client to crash every single time I try (without my patch), just let me know if you need any more information, or want me to try something.
In case it is useful, I'm running VCMI 0.9 self-compiled on linux with GCC 4.7 and boost 1.51. |
|
|
|
I added patch as it is in r2995, but still this issue needs investigation. |
|