[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

5.2

Does C programming stdin standard input stream have a size limit of 512 characters and can it be increased?

Asked by etjuseraskq in Windows MobileProgramming, SuSE Linux, C Programming Language

Tags: C programming, SUSE Linux operating system, Execution error : file '' error code: 114, pc=0, call=-1, seg=0 114 Attempt to access item beyond bounds of memory (Signal 11), Using C program that uses getch to retrieve input from stdin for 2D barcode data. Device used is a Symbol RF device

I have modified an existing C program to process data scanned in from a 2D barcode matrix. The device used to scan is a hand held RF device that runs Windows Mobile and Telnet Client systems. It uses these to connect into our dev system that runs under Linux (Suse) operating system.

I am using the getch command to get character input from stdin standard input stream. Everything works as expected for 2D barcodes that are less than about 520 but when I scan in a 2D barcode that is over about 500 or more my program will either hang or terminate.

It will definitely terminate if I scan in a 2D barcode that is over 900 characters. It appears that it starts hanging when scanning 2D barcodes between 520 and about 800 or so and then will alwalys terminate if the 2D barcode is over 800 characters. I have tried running the C program directly from my laptop thru the linux system and I can see that it puts out the error code 114 with the message attempting to access item beyond bounds of memory.

My feeling is that the stdin input stream used by C programs to get input data may have a limit of 512 characters and if over 512 characters then memory starts to get overwritten which causes the C program to hang or terminate.

Do you know if there is a size limit on the stdin standard input stream used by C. Since 2D barcodes have a maximum of 2000 characters that could be contained at one time with a 2D matrix. All of my 2D barcodes scan successfully that are 135, 212 and 486 in character length but I have one 2D barcode from a customer that is 954 in length and it does not scan in but terminates the program when it is scanned.

On our SUSE Linux system I have used the ulimit -a linux command to find out data about memory and pipe sizes. It indicates the pipe size is set at 512 and has an 8 to the right of it. I am told by the systems people that it indicates the Linux pipe size is 512 times 8 which is 4096 in size. If this is true then the pipe size appears large enough.

I am assuming the pipe size defined on a box is what stdin is associated with from the C programming view but don't know this for sure. I have also looked up on the Internet regarding increasing a pipe size and found something on the DECC$PIPE_BUFFER_SIZE command but don't know if this can be used to increase a pipe size.

Need to know if C's stdin has a limit of 512 characters that can be processed. If so is there a way to increase the stdin size to about 1024 and can this be done thru the C system calls. Since the existing program already uses the getch command to retrieve data I don't want to change the way it is doing it.

I am assuming this issue is happening because of the large amounts of data that can be read in via the 2D barcode.

Also, would like to know if there is a way to debug and step thru a C program that runs on the SUSE linux side. I have no problem debugging on the Windows side with Micro Focus or Visual C++ but have not found anything to debug with on our Linux side. i've been adding printf statements to help in the debug process in the meantime.

Your response to these two questions would be greatly appreciated.

Thank you,
Elvin Jordan
[+][-]02/19/08 09:03 AM, ID: 20930230Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Windows MobileProgramming, SuSE Linux, C Programming Language
Tags: C programming, SUSE Linux operating system, Execution error : file '' error code: 114, pc=0, call=-1, seg=0 114 Attempt to access item beyond bounds of memory (Signal 11), Using C program that uses getch to retrieve input from stdin for 2D barcode data. Device used is a Symbol RF device
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 4
Solution Grade: A
 
[+][-]02/19/08 05:11 AM, ID: 20927899Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 09:53 AM, ID: 20930718Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 09:54 AM, ID: 20930735Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 09:55 AM, ID: 20930751Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 10:00 AM, ID: 20930797Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 10:09 AM, ID: 20930887Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02/19/08 11:21 AM, ID: 20931592Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 11:22 AM, ID: 20931607Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 11:26 AM, ID: 20931636Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 11:31 AM, ID: 20931672Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 11:31 AM, ID: 20931678Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 11:33 AM, ID: 20931698Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 11:34 AM, ID: 20931709Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 11:41 AM, ID: 20931789Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 11:45 AM, ID: 20931836Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 12:38 PM, ID: 20932342Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 12:57 PM, ID: 20932505Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 01:12 PM, ID: 20932636Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 01:25 PM, ID: 20932761Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 02:03 PM, ID: 20933103Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 02:47 PM, ID: 20933391Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/19/08 03:01 PM, ID: 20933477Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/19/08 03:07 PM, ID: 20933514Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]02/20/08 01:43 AM, ID: 20936231Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/21/08 06:54 AM, ID: 21401743Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628