Home NetLinx Studio

Strange problem with variables

ThorleifurThorleifur Junior MemberPosts: 58
Hi,

I have to ask you guys for some advice or ideas on something. I have a 17 master installation here at a concert hall / conference center here in Reykjavik. One of the master is giving me troubles I can?t seem to solve. It seems to be a memory leakage of some sort but I am not sure.

The problem description from my customer is all over the place. The UI does not work ( three NXD500i connected to this one), one networked device does not come online and so on and so forth. Never the same thing twice in a row.

I do what I do and VPN into the place and start roaming around to see what is going on. The customer said this time that none of the UIs work. I then check the online tree and voil?.. everything is there as the picture shows. But I then start the Debugging window. I check some things and what... Why is the Extron sending a value to the nBARVOL as a string when the nBARVOL is an integer!!! And there is no connection in the code between the two ( as far as I see ).

Has anyone seen this before or can maybe see something in the code? I am a sorry for the state of this code. This was a budget project and of course, when I have to send it out to be viewed, it is not the one that I am proudest of. https://www.dropbox.com/s/px4ou3dfa065aqu/AV67.axs?dl=0
Oh, and this is the second master that has been there. The first one was RMA?d to AMX for what I thought was a memory leak or corrupted memory.



Comments

  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    You can choose how you want to look at your variable from the drop down in the display column in the debugger. Just choose integer and it will show you the integer rather than ASCII. I don't think that's your problem. It sounds like the system is very busy and not processing correctly so you get random complaints. Just a guess based on no info though.
    Paul
  • ThorleifurThorleifur Junior Member Posts: 58
    Hi Paul.

    I know about the drop down. The problem I am having is that nBARVOL is an integer in my code, so it shouldn?t register as a STR in the debug window. The average CPU usage is 43% so it?s not that busy.
  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    Thorleifur wrote: »
    Hi Paul.

    I know about the drop down. The problem I am having is that nBARVOL is an integer in my code, so it shouldn?t register as a STR in the debug window. The average CPU usage is 43% so it?s not that busy.

    I wouldn't have much faith in the debugger. Its got lots of problems of its own. The variable will be whatever you declared it as, integer, char, etc. It can't change. As well, if the code on the master is at all different than your local tkn the debugger will do/show weird things.
    Paul
  • PhreaKPhreaK Senior Member Posts: 966
    Yep, there's a whole bunch of odd behaviour in that debugger - I'll occasionally try and use it and be pleasantly surprised if it functions, but definitely not something that can be relied on.

    I'd be guessing you have another variable declared near nBARVOL (by the looks of it's contents, some form of rx buffer) and the debugger is picking this up. If you're having issues, safest bet is to put in some amx_log(..) calls to get a better idea of what may be going on. It's backwards, horrible and inefficient, but that seems to be the status quo when it comes to AMX development.
  • ThorleifurThorleifur Junior Member Posts: 58
    I'd be guessing you have another variable declared near nBARVOL (by the looks of it's contents, some form of rx buffer) and the debugger is picking this up. If you're having issues, safest bet is to put in some amx_log(..) calls to get a better idea of what may be going on. It's backwards, horrible and inefficient, but that seems to be the status quo when it comes to AMX development.

    OK, I will insert some logger of my own to see what is going on. I use that debugger sometimes when something odd happens and I have not seen it not do it?s job. I always thougth that this debugger was he one thing that was unbroken in that program, guess I was wrong.
  • Dennis E.Dennis E. DeTeK AB Posts: 27
    My guess with just reading the code is that the problem can be that you're using an integer in a send_string.
    That might give strange results.
    It looks like it's the reply from the extron port it has the same size as the cMATRIXBUFFER[100]
Sign In or Register to comment.