Menu

#763 monitor_is_remote reports 0/false when remote monitor is not completely closed

v2.4.x
open
None
Remote Monitor
2021-11-27
2016-07-04
gpz
No

related to https://sourceforge.net/p/vice-emu/patches/123/ ... this patch only masks the actual problem in GTK instead of fixing it for all emulators

https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/monitor/monitor.c#l2510 monitor_close() already checks https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/monitor/monitor_network.c#l556 monitor_is_remote() before calling uimon_window_close(). however, it is already set to 0 before that function is called.

Discussion

  • compyx

    compyx - 2016-07-04

    My patch indeed only hides a deeper problem, sorry about that.

    Looking at monitor_network.c, shouldn't monitor_is_remote() check listen_socket rather than connected_socket? listen_socket gets initialized in monitor_network_activate() and gets set to NULL in monitor_network_deactivate(). So unless I'm missing something, listen_socket seems to indicate whether VICE is in remote monitor state.

     
  • Greg King

    Greg King - 2016-07-05

    Look at monitor_network_data_available(). listen_socket waits for you to attempt to connect to the monitor. It is openned when the remote monitor resource is enabled.

     
  • compyx

    compyx - 2016-07-05

    Yes, so shouldn't monitor_is_remote() be changed to:

    int monitor_is_remote(void)
    {
        return listen_socket != NULL;
    }
    

    Seems to be that as long as VICE is listening for remote monitor commands/sessions, any monitor session is therefor remote.

     

    Last edit: compyx 2016-07-05
  • Greg King

    Greg King - 2016-07-05

    No. That socket listens for requests to make a connection. It doesn't listen for remote commands. It always is open if the "Remote monitor" feature is enabled (by a resource that's controlled by a User Interface -- or a command line). If monitor_is_remote() looked at listen_socket, then we couldn't open a monitor window locally, while we aren't connected remotely. I want to be able to do that (although, it doesn't work well in WinVICE, at this time).

     
  • compyx

    compyx - 2016-07-06

    Opening a local monitor while VICE is listening for remote connections doesn't work at all on Linux with Gtk3. Which is what I based my assumption on: that there either is a remote or a local monitor, but not both.

    If you want to have both, which I would like too, by the way, then my listen_socket suggestion is clearly wrong.

     
  • gpz

    gpz - 2021-10-26
    • assigned_to: Empathic Qubit
    • Category: Monitor --> Remote Monitor
     
  • gpz

    gpz - 2021-10-26

    Is this still a problem?

     
  • Empathic Qubit

    Empathic Qubit - 2021-11-27

    You still cannot have both a text and/or binary connection in combination with the GUI monitor. You can have both network connections together though.

    If all clients disconnect then I believe you can reopen the GUI monitor, which will then prevent the network connections from being opened.

    Edit: The GUI monitor will also reopen on any breakpoints that are still set.

     

    Last edit: Empathic Qubit 2021-11-27

Log in to post a comment.