New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[input] fix stack overflow in HasLongpressMapping #7846
Conversation
441582e
to
e53a099
Compare
@koying i've added a separate commit for what you've suggested, return -1 in case GetFallbackWindow is called with WINDOW_ADDON_START |
60fdd94
to
a091ba1
Compare
If you go my route, you also have to change xbmc/xbmc/addons/AddonCallbacksGUI.cpp Line 295 in 943c92e
xbmc/xbmc/input/ButtonTranslator.cpp Line 1045 in 943c92e
But that probably deserves a separate PR. I suggest to do a plain fix here and think further about making GetFallbackWindow more coherent. |
I've squashed both commits together because the fix only works if both are applied. |
// because id is dynamic | ||
if (windowID >= WINDOW_ADDON_START && windowID <= WINDOW_ADDON_END) | ||
// for addon windows use WINDOW_ADDON_START because id is dynamic | ||
if (windowID > WINDOW_ADDON_START && windowID <= WINDOW_ADDON_END) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@xhaggi I only have a MacBook with me and can't test until coming Monday. Thanks for looking into this. |
@FernetMenta does it crash if you open an addon window and press a key? |
@xhaggi yes, it crashed as soon as I pressed a key when an addon window was opened. |
Thought i can test it but don't find an addon window 😄 and do not have vdr ready. |
ADSP uses addon windows too. @AchimTuran are there any ADSP addons ready for testing? |
@FernetMenta do you know a reason why we do this special handling in |
@xhaggi I think python windows have not had the requirement so far. I implemented it for addon windows because I had the requirement to define key-action mappings for those. |
Thanks for the explanation :) |
@xhaggi I am sure there is much room for improvement. At the time I did this I resurrected addon windows that were decayed and not usable. |
Hopefully they will compile. But in two weeks I will have some time to fix them. |
@xhaggi seems to fix the issue |
jenkins build and merge |
Addons building is failing. unrelated. |
[input] fix stack overflow in HasLongpressMapping
@xhaggi well.. this completely breaks longpress for me. |
could you please explain what's broken? |
impossible to use long press. short press action immediately executed, log spammed http://sprunge.us/YOZg. after reverting: http://sprunge.us/CdKc |
[input] fix long press fallback handling after #7846
@FernetMenta @koying let's move the discussion to this PR.