Search Results

Search found 6134 results on 246 pages for 'dan stackoverflow'.

Page 9/246 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Does this sound like a stack overflow?

    - by Jordan S
    I think I might be having a stack overflow problem or something similar in my embedded firmware code. I am a new programmer and have never dealt with a SO so I'm not sure if that is what's happening or not. The firmware controls a device with a wheel that has magnets evenly spaced around it and the board has a hall effect sensor that senses when magnet is over it. My firmware operates the stepper and also count steps while monitoring the magnet sensor in order to detect if the wheel has stalled. I am using a timer interrupt on my chip (8 bit, 8057 acrh.) to set output ports to control the motor and for the stall detection. The stall detection code looks like this... // Enter ISR // Change the ports to the appropriate value for the next step // ... StallDetector++; // Increment the stall detector if(PosSensor != LastPosMagState) { StallDetector = 0; LastPosMagState = PosSensor; } else { if (PosSensor == ON) { if (StallDetector > (MagnetSize + 10)) { HandleStallEvent(); } } else if (PosSensor == OFF) { if (StallDetector > (GapSize + 10)) { HandleStallEvent(); } } } this code is called every time the ISR is triggered. PosSensor is the magnet sensor. MagnetSize is the number of stepper steps that it takes to get through the magnet field. GapSize is the number of steps between two magnets. So I want to detect if the wheel gets stuck either with the sensor over a magnet or not over a magnet. This works great for a long time but then after a while the first stall event will occur because 'StallDetector (MagnetSize + 10)' but when I look at the value of StallDetector it is always around 220! This doesn't make sense because MagnetSize is always around 35. So the stall event should have been triggered at like 46 but somehow it got all the way up to 220? And I don't set the value of stall detector anywhere else in my code. Do you have any advice on how I can track down the root of this problem? The ISR looks like this void Timer3_ISR(void) interrupt 14 { OperateStepper(); // This is the function shown above TMR3CN &= ~0x80; // Clear Timer3 interrupt flag } HandleStallEvent just sets a few variable back to their default values so that it can attempt another move... #pragma save #pragma nooverlay void HandleStallEvent() { ///* PulseMotor = 0; //Stop the wheel from moving SetMotorPower(0); //Set motor power low MotorSpeed = LOW_SPEED; SetSpeedHz(); ERROR_STATE = 2; DEVICE_IS_HOMED = FALSE; DEVICE_IS_HOMING = FALSE; DEVICE_IS_MOVING = FALSE; HOMING_STATE = 0; MOVING_STATE = 0; CURRENT_POSITION = 0; StallDetector = 0; return; //*/ } #pragma restore

    Read the article

  • Wallet Underflow? [closed]

    - by David T. McKee
    I am a software engineer who would love to "disconnect" from the "company store" so-to-speak. This concept of Stack-Overflow is great...so, because I know that software engineers need coffee and food, how do you monetize this? Just wondering.

    Read the article

  • Closing Question Rights in Stack over flow

    - by Asim Sajjad
    I have posted my Question and some one has closed that question, but i didn't get my answer from any of the viewer who have view my question or post theire answer, how can anyone close question when I don't get answer or statisfied with the answer posted against my question??? Why people close the question without permission of the question owner ???

    Read the article

  • Python ValueError: not allowed to raise maximum limit

    - by Ricky Bobby
    I'm using python 2.7.2 on mac os 10.7.3 I'm doing a recursive algorithm in python with more than 50 000 recursion levels. I tried to increase the maximum recursion level to 1 000 000 but my python shell still exit after 18 000 recursion levels. I tried to increase the resources available : import resource resource.setrlimit(resource.RLIMIT_STACK, (2**29,-1)) sys.setrecursionlimit(10**6) and I get this error : Traceback (most recent call last): File "<pyshell#58>", line 1, in <module> resource.setrlimit(resource.RLIMIT_STACK,(2**29,-1)) ValueError: not allowed to raise maximum limit I don't know why I cannot raise the maximum limit ? thanks for your suggestions .

    Read the article

  • Stack Overflow problem transforming with a custom xslt

    - by Flynn1179
    I've got a system that allows the user the option of providing their own XSLT to apply to some data that's been retrieved, as a means of specifying how that data should be presented. However, if the user includes code in the XSLT equivalent to: <xsl:template match="/"> <xsl:element name="data"> <xsl:apply-templates select="." /> </xsl:element> </xsl:template> this causes .NET to infinitely recurse trying to process it, and produces a stack overflow error. I need to be able to trap this before it crashes the app, as the data that's been retrieved is occasionally quite time-consuming to obtain, and the data is lost when this happens. Is there any way of doing this? I know it's theoretically possible to identify any occurrences of xsl:apply-templates with "." in the select attribute, but this isn't the only way an infinite recursion could happen, I need a way of generically trapping it.

    Read the article

  • why is my reputation deducted? [closed]

    - by benjamin button
    hi, yesterday i had a reputation more than 2600. today when i opened the site it suddenly reduced to 1574!!!!. but i am not able to figure out how and why did it get reduced? this question is probably concerned to the administrators or any regular user can present their opinion!. could anybody please tell?

    Read the article

  • XDocument change all attribute names

    - by Dested
    I have an XDocument that looks similar to <root> <a> <b foo="1" bar="2" /> <b foo="3" bar="4" /> <b foo="5" bar="6" /> <b foo="7" bar="8" /> <b foo="9" bar="10" /> </a> </root> I wish to change the attribute foo to something else, and the attribute bar to something else. How can I easily do this? My current version (below) stack overflows with large documents, and has an awful smell to it. string dd=LoadedXDocument.ToString(); foreach (var s in AttributeReplacements) dd = dd.Replace(s.Old+"=", s.New+"=");

    Read the article

  • How do I login to this site? [closed]

    - by Kevin Monk
    This site drives me crazy! I'm a web developer. I understand technology, I understand OpenID, but I don't have a clue how to login to this site with the username I created whilst asking another question unless I ask yet another question? Sure, this is a techie site but if I can't work out how to log in then what hope is OpenID to the rest of the non technical world?

    Read the article

  • Why does my array initialization code cause a StackOverflowException to be thrown?

    - by MCS
    The following line of code in my class constructor is throwing a StackOverflowException: myList = new string[]{}; // myList is a property of type string[] Why is that happening? And what's the proper way to initialize an empty array? UPDATE: The cause was in the set method, in which I was attempting to trim all values. What's wrong with this code: set { for (int i = 0; i < myList.Length; i++) { if (myList[i] != null) myList[i] = myList[i].Trim(); } }

    Read the article

  • The links within posts should open a tab [closed]

    - by XGreen
    I couldn't find a place to feedback about this so apologies if I shouldn't have post this as a question here. Would it be possible for the admins of the site to change the links we post in our answers to have their target as _blank. It is quite hard when it is _self as we look at those urls in correlation with what the post is about so I wouldn't want it to replace the post.

    Read the article

  • The implicit function __strcpy_chk() call

    - by Summer_More_More_Tea
    Hi everyone: I'm now performing a stack buffer overflow attack test on my own PC( Ubuntu 9.10, gcc-4.4.1 ) based on the article http://www.tenouk.com/Bufferoverflowc/Bufferoverflow4.html. Yet I haven't achieved the goal. Each time a segfault is thrown accompanied with some error informaiton. I compile the source code, and wanna get further information using objdump. Function __strcpy_chk is invoked in the assembly code dumped out, and it's said that "The __strcpy_chk() function is not in the source standard; it is only in the binary standard." Does this the mechanism a compiler employed to protect runtime stack? To finish my test, how can I bypass the protection? Regards.

    Read the article

  • printing out posts

    - by yCalleecharan
    Hi, I'm using the Firefox browser and trying to print out my posts (and replies). The pdf output doesn't include the comments in the posts. How to make sure that everything which is on the page gets printed? Same goes for codes for which are in a window. Only the visible part of the code gets printed. These are not programming questions :) but I hope that someone can suggest how to get proper printouts of the posts. Thanks a lot...

    Read the article

  • printf not passing correct Hex Address to stack

    - by kriss
    I have a hickup in using printf . I am on ubuntu 10.04. Basically i have a C program asking for some input and then prints it back. It is OK for printing something after inputing. I tried to insert some Hex Address to Stack by following format:- printf "hello world!\x12\x23\x34" | ./input1 But i don't know what is the problem. If i give only string beyond 12 bytes it overwrites BUT If I give hex address(through printf), it doesn't overwrite on return address. Instead it stores some other thing. Could anyone help??? I can't proceed further becoz of this. Thanks in advance

    Read the article

  • Stack Overflow Accessing Large Vector

    - by cam
    I'm getting a stack overflow on the first iteration of this for loop for (int q = 0; q < SIZEN; q++) { cout<<nList[q]<<" "; } nList is a vector of type int with 376 items. The size of nList depends on a constant defined in the program. The program works for every value up to 376, then after 376 it stops working. Any thoughts?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >