Skip to content

Conversation

@FernetMenta
Copy link
Contributor

@FernetMenta FernetMenta commented Apr 22, 2016

Fix and another step in splitting the render thread. Only guilib is allowed to call ProcessRenderLoop. This change enforces this. It also reverts fcc1090

@mapfau could you test this please?

Some explanation:
The render loop has a sequence: FrameMove, Render, Flip, FrameMove, ...

If we allow calling the loop outside of guilib, i.e. by a method called from FrameMove, something like this may happen:

FrameMove (partly), FrameMove, Render, ...

@FernetMenta FernetMenta added Type: Fix non-breaking change which fixes an issue Component: GUI engine labels Apr 22, 2016
@ghost
Copy link

ghost commented Apr 22, 2016

works perfect for my issue! Thanks, @FernetMenta

@FernetMenta
Copy link
Contributor Author

jenkins build this please


dialog->Close();
}
return;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@FernetMenta
Copy link
Contributor Author

@Memphiz iOS fails in IOSKeyboardView. Could you have a look please. Why does it not use a BusyDialog?

@tamland
Copy link
Member

tamland commented Apr 22, 2016

Will something break from this? I'm assuming there was a reason for adding fcc1090

@FernetMenta
Copy link
Contributor Author

Possible but hard to tell. This change was done 4 years ago. If anybody notices an issues, please let me know. We'll find a better solution.

@tamland
Copy link
Member

tamland commented Apr 22, 2016

lets ping @jimfcarroll then

@Memphiz
Copy link
Member

Memphiz commented Apr 22, 2016

may have time tomorrow to look at it - gui keyboard ios needs to call renderloop because its like a modal dialog and if you for example enter something in a live filter you want kodi to react on it while keyboard is still open...

@Memphiz
Copy link
Member

Memphiz commented Apr 22, 2016

there are also some comments in the code there https://github.com/xbmc/xbmc/blob/master/xbmc/platform/darwin/ios/IOSKeyboardView.mm#L252

@FernetMenta
Copy link
Contributor Author

@Memphiz is this required to run on the main/render thread?

@phil65
Copy link
Contributor

phil65 commented Apr 22, 2016

can confirm that this fixes the visual glitches related to plugins. Will keep this in my branch and see if I notice any regressions.
Thx!

@FernetMenta FernetMenta force-pushed the renderloop branch 2 times, most recently from 3f8eee8 to 34b56ce Compare April 22, 2016 16:00
@Memphiz
Copy link
Member

Memphiz commented Apr 22, 2016

@FernetMenta well its by design i think - see

https://github.com/xbmc/xbmc/blob/master/xbmc/guilib/GUIKeyboardFactory.cpp#L114

our generic keyboard dialog is a modal dialog in our gui thread aswell - that GetInput method is meant to be blocking...

@FernetMenta
Copy link
Contributor Author

@Memphiz then I think we should create something like CGUIDialogKeyboardIOS instead of emulating a dialog outside guilib. This dialog could embed OSKeyboard. As far as I can tell this should be doable. What do you think?

@Memphiz
Copy link
Member

Memphiz commented Apr 23, 2016

@FernetMenta wouldn't this mean we need to add a skin xml file for this "fake" window? Not sure if this is what we want really? Not even sure if what i would need to skin in that xml - actually we don't want to see any window from the guilib with this do we? (maybe a 1x1 pixel window which is covered by the native keyboard then - not sure).

@FernetMenta
Copy link
Contributor Author

@Memphiz it should be a modal dialog because this is the behaviour we want. The skin file does not need to have any controls, means that we don't show anything but the IOS keyboard.
I think the current implementation of the ios keyboard has flaws because it isn't a modal dialog. That means other windows can be opened behind the keyboard triggered by API calls from outside.

@Memphiz
Copy link
Member

Memphiz commented Apr 23, 2016

@FernetMenta am i right that you would call this approach here abusive?

Memphiz@f71043f

@FernetMenta
Copy link
Contributor Author

@Memphiz those changes are in the context of splitting the render thread from the main thread. The outside world should not block or drive the render loop.

@Memphiz
Copy link
Member

Memphiz commented Apr 23, 2016

args time is over already ... please simply comment out the call to processrenderloop in case you need to go forward quick here. Keyboard should still work like before. Only the live filtering will not work anymore. (but it will update after keyboard is closed)

@ghost
Copy link

ghost commented Apr 23, 2016

Line168, ProcessRenderLoop, leads to glitches commented in various posts.
I don't think simply enabling this line again is the solution here.

Enabling this line again will lead to development needs in GUI (opening VideoNav for example), Removing this line will lead to development in keyboard things. If I understand right the ProcessRenderLoop call at this place is really part of a concept, its more a workaround, right?

Isn't there a solution for the ios keyboard wich follows the concept @FernetMenta described?

Edit: Sorry, this line 168 is NOT the line wich leads to glitches. It was the part of jimfcarrol wich seems not to be point of discussion here.

@da-anda
Copy link
Member

da-anda commented Apr 24, 2016

as for the "native keyboard overlay" used by iOS atm, if this is moved to some GUI component, I think it would be nice to implement it (or at least name it) in some generic way so that other OSes (like Android) could also make use of it. Just an idea.

@Memphiz
Copy link
Member

Memphiz commented Apr 24, 2016

Well it already was designed in a generic way. Thats why we have the CGUIKeyboard class (which needs to be derived and implemented for each natvie keyboard platform). Moving the ios native keyboard over to a GUIDialog won't change things that much - you still need to implement the CGUIKeyboard interface for android ...

@FernetMenta FernetMenta force-pushed the renderloop branch 2 times, most recently from 5994979 to f77ff92 Compare April 30, 2016 19:45
@FernetMenta
Copy link
Contributor Author

@Memphiz I embedded the iOS keyboard into a dialog.
jenkins build this please

@FernetMenta
Copy link
Contributor Author

jenkins build this please

@Memphiz
Copy link
Member

Memphiz commented Apr 30, 2016

That looks pretty clean - thx!

@FernetMenta
Copy link
Contributor Author

jenkins build this please

@FernetMenta
Copy link
Contributor Author

jenkins build this please

@FernetMenta FernetMenta merged commit bee0201 into xbmc:master May 1, 2016
@MilhouseVH
Copy link
Contributor

MilhouseVH commented May 4, 2016

Would this change be responsible for deadlocking the Kodi GUI when clicking on "Search..." > "Search YouTube" from Estuary Home screen?

http://forum.kodi.tv/showthread.php?tid=269815&pid=2328176#pid2328176

@MilhouseVH
Copy link
Contributor

MilhouseVH commented May 4, 2016

This is a "crashlog" obtained by executing kill -SIGSEGV $(pidof kodi.bin) on the deadlocked process: http://sprunge.us/dgJW

And a debug-enabled "crashlog" (produced the same way as above): http://sprunge.us/NRCN

@MilhouseVH MilhouseVH mentioned this pull request May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: GUI engine Type: Fix non-breaking change which fixes an issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants