News:

  • July 27, 2026, 11:34:50 AM

Login with username, password and session length

Author Topic: STRGETB Err  (Read 26612 times)

CReese

  • Hero Member
  • *****
  • Posts: 184
STRGETB Err
« on: July 11, 2013, 03:17:53 PM »
Hello.

I am getting a $MathStackOverflw (ST138) error on a STRGETB, at least that is where the GOTO sent me. After trimming down the STRGETB to only transfer one byte, however, I still get the error, but no longer with a GOTO. What is the best way to locate and kill these sort of bugs?

Thanks,
C

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: STRGETB Err
« Reply #1 on: July 11, 2013, 03:24:06 PM »
I disabled what I thought was the problematic module, but it turns out it was not, but rather another. How does one interpret the parenthetic references, e.g. "ST138"?

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: STRGETB Err
« Reply #2 on: July 11, 2013, 03:33:57 PM »
How does one interpret the parenthetic references, e.g. "ST138"?

Go to DMD Help, and use the search tab.


" $MathStackOverflw  Status (read-only)   will be ON when a math operation has caused a stack overflow "
 
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: STRGETB Err
« Reply #3 on: July 11, 2013, 03:38:55 PM »
Somewhere you are causing an overflow, but the "System Status" can't tell you where it was whenever it is an indexed location, i.e a FOR loop.
I use the Debug Mode, and only enable the Program(s)/Task(s) that I suspect and attempt to duplicate it.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: STRGETB Err
« Reply #4 on: July 11, 2013, 03:39:27 PM »
How does one interpret the parenthetic references, e.g. "ST138"?

Go to DMD Help, and use the search tab.


" $MathStackOverflw  Status (read-only)   will be ON when a math operation has caused a stack overflow "
 

Yes, I was able to get this information, but I can get the same from the name of the error.

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: STRGETB Err
« Reply #5 on: July 11, 2013, 03:43:10 PM »
Somewhere you are causing an overflow, but the "System Status" can't tell you where it was whenever it is an indexed location, i.e a FOR loop.
I use the Debug Mode, and only enable the Program(s)/Task(s) that I suspect and attempt to duplicate it.


It's definitely not causing an error in a loop. The only sections of code not running are publish and memcopy operations. It would just be nice if I could get an error in line # response.

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: STRGETB Err
« Reply #6 on: July 11, 2013, 03:47:49 PM »
It would just be nice if I could get an error in line # response.
Agreed, It "seems" like that would relatively easy for the Hosties to do  ;)
 
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

CReese

  • Hero Member
  • *****
  • Posts: 184
Re: STRGETB Err
« Reply #7 on: July 11, 2013, 04:01:06 PM »
Appears to be some sort of limit on the number of registers I could publish at one time to MIR? Dunno, but just reducing the count seemed to work.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6168
  • Yes Pinky, Do-more will control the world!
Re: STRGETB Err
« Reply #8 on: July 11, 2013, 07:26:03 PM »
If you got a stack overflow error something is badly broken. You should never see stack issues.

I need the simplest program that will replicate the problem, and I should be able to fix for 1.1.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: STRGETB Err
« Reply #9 on: July 11, 2013, 09:14:33 PM »
This is along with but slightly off the thread topic. It's usually so annoying to deal with 'Customer Support' where they promise they will bump the problem up the line and it may eventually filter down to the people responsible for the software. Here, you are talking to "THE MAN". When BobO says "I should be able to fix for 1.1" he really means "I".
An output is a PLC's way of getting its inputs to change.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6168
  • Yes Pinky, Do-more will control the world!
Re: STRGETB Err
« Reply #10 on: July 11, 2013, 09:17:17 PM »
Since the math stack is now hidden from users, it is something that is managed strictly by instructions and DmD. At the end of each instruction, the stack should be resolved to zero depth. For a user program to bust the stack, it requires that an instruction have a broken pathway...one that is leaving something on the stack rather than fully resolving. That is very bad and really needs to be fixed ASAP.

If you can reduce the failing program to something simple, that is great. If not, it's still great...we'll pick through your full program and figure out what is busting the stack. If you are unwilling to send me your program, still no big deal, I can to send you a special build of the 1.0.9 OS that turns on some stack checking. It will log any failures it observes to some system registers that will tell us which instruction is causing the issue. In fact, that might be the easiest path, since it will allow you to run the program with your I/O. I'll PM you my email address and we can conduct the rest of this via email.

"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6168
  • Yes Pinky, Do-more will control the world!
Re: STRGETB Err
« Reply #11 on: July 11, 2013, 09:27:19 PM »
This is along with but slightly off the thread topic. It's usually so annoying to deal with 'Customer Support' where they promise they will bump the problem up the line and it may eventually filter down to the people responsible for the software. Here, you are talking to "THE MAN". When BobO says "I should be able to fix for 1.1" he really means "I".

Yeah... ::) Some folks think that by the time a company gets to be the size of Host, the president should actually be doing 'president things', rather than writing firmware and talking on forums. The truth is that I really love engineering, and even though we are well beyond the level where I could justify not doing design work, I still prefer doing the the things that I'm most skilled at. As we grow, and Do-more will grow us significantly, I'll probably pull a Bill Gates trick and end up hiring a 'suit' to handle operations and change my title to Chief Technical Officer or Chief System Architect or some other nebulous title that will permit me to keep designing. So yes, when I say 'I will...' in 90% of the cases that means me personally.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3622
  • Darth Ladder
Re: STRGETB Err
« Reply #12 on: July 11, 2013, 09:34:49 PM »
I'll probably pull a Bill Gates trick and end up hiring a 'suit' to handle operations and change my title to Chief Technical Officer or Chief System Architect or some other nebulous title that will permit me to keep designing.

Xor, Lord of Bytes? [/movie voice]
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6168
  • Yes Pinky, Do-more will control the world!
Re: STRGETB Err
« Reply #13 on: July 11, 2013, 09:50:37 PM »
It would just be nice if I could get an error in line # response.
Agreed, It "seems" like that would relatively easy for the Hosties to do  ;)
 

Actually, the only place ST138 is generated is in the post logic cleanup. It isn't generated by an instruction, so there is no instruction to send you to. You didn't mention whether you got a fatal error or not. This error produces a fatal error...which turns the red light on and drops out of run mode. If you didn't get a fatal error, there is something else going on here...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO