Advertisement

02.18.2008 at 10:19PM PST, ID: 23173553
[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!

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

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
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: etjuseraskq
Solution Provided By: Infinity08
Participating Experts: 4
Solution Grade: A
Views: 40
Translate:
Loading Advertisement...
02.19.2008 at 05:11AM PST, ID: 20927899

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 09:03AM PST, ID: 20930230

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 09:53AM PST, ID: 20930718

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 09:54AM PST, ID: 20930735

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 09:55AM PST, ID: 20930751

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 10:00AM PST, ID: 20930797

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 10:09AM PST, ID: 20930887

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:21AM PST, ID: 20931592

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:22AM PST, ID: 20931607

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:26AM PST, ID: 20931636

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:31AM PST, ID: 20931672

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:31AM PST, ID: 20931678

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:33AM PST, ID: 20931698

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:34AM PST, ID: 20931709

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:41AM PST, ID: 20931789

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 11:45AM PST, ID: 20931836

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 12:38PM PST, ID: 20932342

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 12:57PM PST, ID: 20932505

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 01:12PM PST, ID: 20932636

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 01:25PM PST, ID: 20932761

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 02:03PM PST, ID: 20933103

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 02:47PM PST, ID: 20933391

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 03:01PM PST, ID: 20933477

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.19.2008 at 03:07PM PST, ID: 20933514

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.20.2008 at 01:43AM PST, ID: 20936231

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
04.21.2008 at 06:54AM PDT, ID: 21401743

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_2_20070628