Project

General

Profile

Actions

Bug #7516

open

Calling WMenu::select(nullptr) from internalPathChanged event handler ends with SIGSEGV (endless recursion)

Added by Adrian Guzowski about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/08/2020
Due date:
% Done:

0%

Estimated time:

Description

I have internalPathChanged event handled by Main View class. Some URLs are handled by the menu in the navigation bar, some aren't.

Navigation bar contains a 'Create' button with internal path '/create' to create an item. When item is created, internal path is being changed to '/item/{id}' (otherwise it would still be on '/create').

When path is changed, navigation menu does not act on it and keeps item highlighted as active, even though path doesn't match any more.

Given that, I tried to workaround the issue with simple call to "WMenu::select(nullptr)" from internalPathChanged event handler. This triggers another call change in internalPath (although I don't know to which path it changes), which leads to another call to workaround code and so on - it's a recursion loop.

I'm not sure what should be a root cause of the issue - an endless call loop or a WMenu not deselecting it's items when path doesn't match (I saw that there's a log entry that warns about unknown path, though I'm not sure why it does that without acting on it. Looks like WMenu assumes that application will have only one instance of those?).

No data to display

Actions

Also available in: Atom PDF