View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002370 | NoesisGUI | C++ SDK | public | 2022-07-02 07:35 | 2025-05-23 17:59 |
| Reporter | nikobarli | Assigned To | jsantos | ||
| Priority | normal | Severity | major | ||
| Status | assigned | Resolution | open | ||
| Product Version | 3.1.3 | ||||
| Target Version | 3.1.7 | ||||
| Summary | 0002370: Crash when using lambda expression for delegate | ||||
| Description | We experience crashes when using lambda expression for RoutedEvent handlers. The crash occurs under the following conditions:
Sample code:
It seems that the cause is the use of HashMap to store the element's event handlers. The current HashMap implementation will reallocate the handlers at some point when resizing is necessary, and the executing handler will get destroyed before finishing its execution (the lambda member variables are also destroyed). | ||||
| Platform | Windows | ||||
|
Problem is, our hashmap is not using stable pointers... So, probably we need to change the hashmap to contain pointer to Delegates instead of Delegates. I want to analyze this carefully, because the change is going to increase the number of allocations. |
|
|
Reproduced with the following test: |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2022-07-02 07:35 | satorp | New Issue | |
| 2022-07-05 10:53 | sfernandez | Assigned To | => sfernandez |
| 2022-07-05 10:53 | sfernandez | Status | new => assigned |
| 2022-07-05 10:53 | sfernandez | Target Version | => 3.1.6 |
| 2022-07-05 11:14 | sfernandez | Assigned To | sfernandez => jsantos |
| 2022-07-05 16:45 | jsantos | Note Added: 0008009 | |
| 2022-07-05 16:46 | sfernandez | Note Added: 0008010 | |
| 2022-11-07 17:13 | sfernandez | Target Version | 3.1.6 => 3.1.7 |
| 2024-06-14 20:18 | jsantos | Reporter | satorp => nikobarli |
| 2025-05-23 17:58 | jsantos | Description Updated | |
| 2025-05-23 17:59 | jsantos | Note Edited: 0008010 |