06 December 2022, 01:22 | #1 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Problem Calling ARexx Command
Hi there!
So I have this code to control various music players via ARexx This code has been working great with dozen of players until I tried it with PlayOGG... For some reason, with PlayOGG, it blocks on WaitPort(reply_port);, which never returns, and I don't know why! (Doing the same thing using rx works fine.) (I just removed some error-related lines and comments...) Code:
if(!(reply_port = CreateMsgPort())) { ... } if(!(rexx_msg = CreateRexxMsg(reply_port, NULL, NULL))) { ... } rexx_msg->rm_Args[0] = command_temp; rexx_msg->rm_Action = RXCOMM | RXFF_RESULT; if(!FillRexxMsg(rexx_msg, 1, 0)) { ... } Forbid(); if(_connect_player() == RETURN_ERROR) { ... } PutMsg(_arexx_port, &rexx_msg->rm_Node); Permit(); WaitPort(reply_port); GetMsg(reply_port); Thanks! Last edited by tygre; 06 December 2022 at 01:51. Reason: Notifications; typos |
06 December 2022, 02:46 | #2 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
PS. Maybe it has to do with my version of rexxsyslib.library?
|
07 December 2022, 17:11 | #3 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi!
I tried with a more recent version of the library, not joy... PlayOGG doesn't seem to reply to the port Best! |
09 December 2022, 21:32 | #4 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi there!
I wanted to create a MWE and, looking around on the Internet, I found better: Thomas' example! I took Thomas' code, made it compile with VBCC, and tried it simply with rexx playOGG_rx PLAY and (drum roll...) it also gets stuck at WaitPort (replyport) I modified a bit this MWE to name the replyport (using CreatePort()) and to pass an "argument string" instead of a "plain" string (using CreateArgstring()), still it waits forever I also used SnoopDOS to monitor everything (including ROM calls, etc.) but didn't see anything obvious... At this point, I don't know what to try... I would give up on PlayOGG but it really bugs me that rx "ADDRESS 'playOGG_rx'; PLAY" works as expected. (It returns!) Any idea of what I'm missing? |
11 December 2022, 08:51 | #5 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Have you tried using the name of the rexx port as host? (which is also 'REXX')
Maybe it checks the pointer instead of a strcmp? or use only RXCOMM as action? Last edited by bebbo; 11 December 2022 at 16:15. |
11 December 2022, 18:11 | #6 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi Bebbo!
Thanks for your reply but I still couldn't make my MWE work: I tried both your suggestions but it still blocks on the WaitPort (replyport)... The exact same code works as expected with other players, like EaglePlayer, so this must be some kind of "corner case" of implementing ARexx in PlayOGG (I have never implemented an ARexx interface, so I don't know what corner case that could be!) I also tried without the WaitPort (replyport) but then sometimes this MWE crashes my Amiga, the others it "blocks" PlayOGG ARexx port, so not a solution Take care! Last edited by tygre; 11 December 2022 at 18:48. Reason: More details |
15 December 2022, 23:38 | #7 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi all!
Any other suggestions? Maybe Thomas would see something that we missed in the code? Please help |
16 December 2022, 12:29 | #8 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,000
|
There is nothing wrong with your program as far as I can see. I have a similar program to test sending ARexx commands. It works fine with for example WBDock or Workbench. Only with PlayOGG it blocks. So I would suspect an issue in PlayOGG. It executes the command but then does not reply to it, so that the sender is blocked.
|
16 December 2022, 16:41 | #9 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,000
|
I found a hint on the Amiga Developer CD in directory ADCD_2.1:Extras/Development/Example_Code_v37/ARexx/simplerexx
It does not send the command directly to the target port, but it sends the command to the port REXX and sets the target port in CreateRexxMsg(). This works better with PlayOGG, but it does not give any result. |
14 January 2023, 01:32 | #10 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi Thomas!
Sorry for the late reply and thanks for your help! I'm going to make more tests but this seems without good solution, too bad! Cheers! |
15 March 2023, 23:41 | #11 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi Thomas and all!
Just to let you know that AmiModRadio now works with PlayOGG, the problem must have been a combination using "REXX" as port name and waiting actively for a reply (like in some cases for EaglePlayer). Cheers! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ARexx RC is 0 Even When Command Fails | tygre | Coders. Language | 7 | 02 December 2022 22:11 |
WinUAE Command Line Problem | mrv2k | support.WinUAE | 6 | 10 March 2021 16:35 |
[opus5][arexx] "Lister Empty..." command - problem | peceha | Coders. Scripting | 16 | 20 March 2018 09:42 |
Problem executing DOpus5 Arexx Script ... | beltrixx | support.Apps | 1 | 01 August 2015 22:16 |
Assign command problem... | TrojanBarber | support.WinUAE | 12 | 26 September 2005 00:08 |
|
|