Progress dialog causes XBMC to hang, reason? Hack solution..
#1
When launching one of my addons I display a progress dialog. This works fine when executing from XBMC but when launching from a json-rpc call, XBMC hangs with no further information.

PHP Code:
21:19:17 T:5764   DEBUGJSONRPCIncoming request: {"jsonrpc""2.0""method""Player.Open""params":{"item": {"file" "plugin://plugin.program.x/?x" }}, "id" "1"}
21:19:17 T:5764   DEBUGJSONRPCCalling player.open
21
:19:17 T:5764   DEBUGJSONRPCMissing property "playlistid" in type
21
:19:17 T:5764   DEBUGCVideoDatabase::GetMovieId (plugin://plugin.program.x/?x), query = select idMovie from movie where idFile=37
21:19:17 T:5764   DEBUGCVideoDatabase::GetEpisodeId (plugin://plugin.program.x/?x), query = select idEpisode from episode where idFile=37
21:19:17 T:5764   DEBUGCVideoDatabase::GetMusicVideoId (plugin://plugin.program.x/?x), query = select idMVideo from musicvideo where idFile=37
21:19:17 T:680   DEBUGXFILE::CPluginDirectory::StartScript calling plugin Pneumatic('plugin://plugin.program.x/','0','xxxxx')
21:19:17 T:680    INFOinitializing python engine.
21:19:17 T:680   DEBUG: new python thread createdid=3
21
:19:17 T:680   DEBUGXFILE::CPluginDirectory::WaitOnScriptResult waiting on the X plugin...
21:19:17 T:4312   DEBUGThread XBPyThread startauto delete0
21
:19:17 T:4312   DEBUGPython threadstart processing
21
:19:17 T:4312  NOTICE: -->Python Interpreter Initialized<--
.... 
21:19:18 T:4312    INFOLoading skin fileDialogProgress.xml
21
:19:18 T:4312   DEBUGDialogProgress::StartModal called
21
:19:18 T:4312   DEBUG: ------ Window Init (DialogProgress.xml) ------
hang forever... 

However if I add a notification or as in this case run
PHP Code:
xbmc.executebuiltin('Dialog.Close(all, true)'

Everything works just fine (continuing from the log above)

PHP Code:
21:22:59 T:2224   DEBUGInstantiating addon using automatically obtained id of "plugin.program.x" dependent on version 2.0 of the xbmc.python api
21
:23:00 T:8056    INFOLoading skin fileDialogProgress.xml
21
:23:00 T:8056   DEBUGDialogProgress::StartModal called
21
:23:00 T:8056   DEBUG: ------ Window Init (DialogProgress.xml) ------
21:23:00 T:8056   DEBUG: ------ Window Deinit () ------
21:23:00 T:8056   DEBUG: ------ Window Deinit (Pointer.xml) ------
21:23:00 T:8056   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
21:23:00 T:8056   DEBUG: ------ Window Init () ------
21:23:00 T:8056   DEBUG: ------ Window Init (Pointer.xml) ------
21:23:01 T:2224    INFOLoading skin fileDialogProgress.xml
21
:23:01 T:2224   DEBUGDialogProgress::StartModal called
21
:23:01 T:2224   DEBUG: ------ Window Init (DialogProgress.xml) ------
21:23:01 T:8056   DEBUG: ------ Window Deinit (Pointer.xml) ------
21:23:02 T:8056   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
21:23:02 T:2224    INFOLoading skin fileDialogProgress.xml
21
:23:02 T:2224   DEBUGDialogProgress::StartModal called
21
:23:02 T:2224   DEBUG: ------ Window Init (DialogProgress.xml) ------
21:23:03 T:8056   DEBUGCWinEventsWin32::WndProcWindow is active
21
:23:14 T:8056   DEBUGSECTION:UnloadDelayed(DLLspecial://xbmcbin/system/ImageLib.dll)
21:23:14 T:8056   DEBUGCWinEventsWin32::WndProcWindow is active 

I suspect there is some issue with XBMC's "opening stream" dialog showing at the same time. A race condition?
Anyone else experienced this?
Pneumatic | SABnzbd | XBMC that just works - openelec
Reply
#2
Hi,
Code:
21:19:17 T:5764   DEBUG: JSONRPC: Missing property "playlistid" in type
"playlistid" is required. 0 for audio and 1 for video. Try:
Code:
{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item": {"playlistid": 1, "file" : "plugin://plugin.program.x/?x" }}, "id" : "1"}

Let me know if it works because I'd like to interact with addons via JSONRPC as well Smile
Image
AWXi - Ajax web interface. Wiki
Reply
#3
Popeye Wrote:When launching one of my addons I display a progress dialog. This works fine when executing from XBMC but when launching from a json-rpc call, XBMC hangs with no further information.

I suspect there is some issue with XBMC's "opening stream" dialog showing at the same time. A race condition?
Anyone else experienced this?

I have actually experienced this, but starting from with in XBMC. Though it does not always happen, but often.. I thought I was going crazy.. Smile
Reply
#4
Mizaki Wrote:Hi,
Code:
21:19:17 T:5764   DEBUG: JSONRPC: Missing property "playlistid" in type
"playlistid" is required. 0 for audio and 1 for video. Try:
Code:
{"jsonrpc": "2.0", "method": "Player.Open", "params":{"item": {"playlistid": 1, "file" : "plugin://plugin.program.x/?x" }}, "id" : "1"}


Let me know if it works because I'd like to interact with addons via JSONRPC as well Smile
Your syntax doesnt work for me. By forcing the dialog to close this works just fine.

giftie Wrote:I have actually experienced this, but starting from with in XBMC. Though it does not always happen, but often.. I thought I was going crazy.. Smile

Any solution? Should I post a track ticket?
Pneumatic | SABnzbd | XBMC that just works - openelec
Reply
#5
Popeye Wrote:Your syntax doesnt work for me. By forcing the dialog to close this works just fine.



Any solution? Should I post a track ticket?

A trac ticket would be a good start.. If you are on Linux(or OSX I think) try to provide a backtrace of the XBMC when the hang up happens. I've been chasing this around(and other hangs regarding XBMC and addons) but everytime I'm in the hunt, I can never get them to come up.
Reply
#6
giftie Wrote:A trac ticket would be a good start.. If you are on Linux(or OSX I think) try to provide a backtrace of the XBMC when the hang up happens. I've been chasing this around(and other hangs regarding XBMC and addons) but everytime I'm in the hunt, I can never get them to come up.

Sorry, running win7 so it will take some time to get linux up and running. I think it has something with the doModal()...
Pneumatic | SABnzbd | XBMC that just works - openelec
Reply
#7
I managed to capture a BackTrace when this happened for me, so I submitted a Trac Ticket for this. Feel free to add to it..
Reply

Logout Mark Read Team Forum Stats Members Help
Progress dialog causes XBMC to hang, reason? Hack solution..0