X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Message-ID: <002701c19791$e61b85a0$1400a8c0@alex> From: "Alex Oleynikov" To: Cc: References: <20020107140652 DOT 52216 DOT qmail AT web9101 DOT mail DOT yahoo DOT com> Subject: Re: PMCOM Date: Mon, 7 Jan 2002 10:42:22 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Reply-To: djgpp AT delorie DOT com Roland wrote: > Everything is working correct, but the program just > crashes after X times of reading the RX-buffer. > The thing my program does, is send data over the > COM-port and then read it for a ACK/NACK package. > It waits with sending a new package until an ACK/NACK > has been received. > When I do not connect the two devices to each other, > the program would have to run forever (or so I > thought), but for some reason it crashes after having > read de RX buffer X times... > The stranged thing is that X is not always the same > number, but differs from one run to another... > Does anybody know where this problem could be coming > from? > Or is it just impossible to read the RX-buffer over > and over again while it's empty?? Hi, I am also using PMCOM library and have gone thru many different situations. There are couple of things I would like to suggest you: 1.Instead of constant polling for content of RX buffer register a user-defined handler when opening the COM-port. This way PMCOM library will call your routine every time something came to the COM-port (make sure to check that your handler was invoked in response to the receiving event and not sending or timer events, since this handler may be also registered for timer operations). 2.Look at your crash dump and see where the termination occurs. It is possible, that you are working with debug release of PMCOM and it has a lot of assert( ) calls throughout the code to check for different conditions. For example, you are trying to read from a closed COM-port etc. Also, what version of PMCOM library are you using? Good luck! Alex