Thread: [Quickfix-developers] Attempted to read or write protected memory.
Brought to you by:
orenmnero
From: arielsrv <ari...@gm...> - 2009-05-08 19:00:24
|
Hi, I'm Ariel from Argentina and have next error. The design is in C#. This error is 1 or 2 times per day I have not found solution for this error. Regards. Extended message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack trace: at FIX.Message.toString(Message* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , Int32 , Int32 , Int32 ) at QuickFix.Message.ToString() at QuickFix.Message.getHeader() -- View this message in context: http://www.nabble.com/Attempted-to-read-or-write-protected-memory.-tp23451721p23451721.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |
From: Bristotti, F. <fer...@cr...> - 2009-05-08 21:16:19
|
This error happens when you try call a method after you have called Dispose() on a message. Example: void QuickFix.Application.fromAdmin(QuickFix.Message message, QuickFix.SessionID session) { message.Dispose(); message.getHeader().getString(QuickFix.TargetCompID.FIELD); // Error!! } Regards. Bristotti -----Original Message----- From: arielsrv [mailto:ari...@gm...] Sent: Friday, May 08, 2009 4:00 PM To: qui...@li... Subject: [Quickfix-developers] Attempted to read or write protected memory. QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Hi, I'm Ariel from Argentina and have next error. The design is in C#. This error is 1 or 2 times per day I have not found solution for this error. Regards. Extended message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack trace: at FIX.Message.toString(Message* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , Int32 , Int32 , Int32 ) at QuickFix.Message.ToString() at QuickFix.Message.getHeader() -- View this message in context: http://www.nabble.com/Attempted-to-read-or-write-protected-memory.-tp234 51721p23451721.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------ ------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers =============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html =============================================================================== |
From: Djalma R. d. S. F. <drs...@gm...> - 2009-05-11 01:19:51
|
Yes, but this error can occur even if dispose is not being called, because ToString requires a pinned object, the same problem with addGroup. http://www.nabble.com/Re%3A-NewOrderList-addgroup-threw-%22Attempted-to-read-or-write-protected-memory.-This-is-often-an-indication-that-other-memory-is-corrupt%22-p21635727.html Regards, Djalma On Fri, May 8, 2009 at 6:15 PM, Bristotti, Fernando < fer...@cr...> wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > This error happens when you try call a method after you have called > Dispose() on a message. > > Example: > > void QuickFix.Application.fromAdmin(QuickFix.Message message, > QuickFix.SessionID session) > { > message.Dispose(); > message.getHeader().getString(QuickFix.TargetCompID.FIELD); // > Error!! > } > > Regards. > Bristotti > > -----Original Message----- > From: arielsrv [mailto:ari...@gm...] > Sent: Friday, May 08, 2009 4:00 PM > To: qui...@li... > Subject: [Quickfix-developers] Attempted to read or write protected > memory. > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > > Hi, > > I'm Ariel from Argentina and have next error. The design is in C#. > This error is 1 or 2 times per day > I have not found solution for this error. > > Regards. > > > Extended message: Attempted to read or write protected memory. This is > often an indication that other memory is corrupt. > Stack trace: at FIX.Message.toString(Message* , > basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , > Int32 , > Int32 , Int32 ) > at QuickFix.Message.ToString() > at QuickFix.Message.getHeader() > -- > View this message in context: > http://www.nabble.com/Attempted-to-read-or-write-protected-memory.-tp234 > 51721p23451721.html<http://www.nabble.com/Attempted-to-read-or-write-protected-memory.-tp234%0A51721p23451721.html> > Sent from the QuickFIX - Dev mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------ > ------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks > to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > > > =============================================================================== > Please access the attached hyperlink for an important electronic > communications disclaimer: > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html > > =============================================================================== > > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Ariel P. <ari...@gm...> - 2009-05-12 15:24:48
|
Never to call to method Dispose(). the problem occurs unexpectedly. that is recommended to fix this? regards 2009/5/10 Djalma Rosa dos Santos Filho <drs...@gm...> > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Yes, but this error can occur even if dispose is not being called, because > ToString requires a pinned object, the same problem with addGroup. > > > http://www.nabble.com/Re%3A-NewOrderList-addgroup-threw-%22Attempted-to-read-or-write-protected-memory.-This-is-often-an-indication-that-other-memory-is-corrupt%22-p21635727.html > > Regards, > Djalma > > > On Fri, May 8, 2009 at 6:15 PM, Bristotti, Fernando < > fer...@cr...> wrote: > >> QuickFIX Documentation: >> http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> This error happens when you try call a method after you have called >> Dispose() on a message. >> >> Example: >> >> void QuickFix.Application.fromAdmin(QuickFix.Message message, >> QuickFix.SessionID session) >> { >> message.Dispose(); >> message.getHeader().getString(QuickFix.TargetCompID.FIELD); // >> Error!! >> } >> >> Regards. >> Bristotti >> >> -----Original Message----- >> From: arielsrv [mailto:ari...@gm...] >> Sent: Friday, May 08, 2009 4:00 PM >> To: qui...@li... >> Subject: [Quickfix-developers] Attempted to read or write protected >> memory. >> >> QuickFIX Documentation: >> http://www.quickfixengine.org/quickfix/doc/html/index.html >> QuickFIX Support: http://www.quickfixengine.org/services.html >> >> >> >> Hi, >> >> I'm Ariel from Argentina and have next error. The design is in C#. >> This error is 1 or 2 times per day >> I have not found solution for this error. >> >> Regards. >> >> >> Extended message: Attempted to read or write protected memory. This is >> often an indication that other memory is corrupt. >> Stack trace: at FIX.Message.toString(Message* , >> basic_string<char\,std::char_traits<char>\,std::allocator<char> >* , >> Int32 , >> Int32 , Int32 ) >> at QuickFix.Message.ToString() >> at QuickFix.Message.getHeader() >> -- >> View this message in context: >> http://www.nabble.com/Attempted-to-read-or-write-protected-memory.-tp234 >> 51721p23451721.html<http://www.nabble.com/Attempted-to-read-or-write-protected-memory.-tp234%0A51721p23451721.html> >> Sent from the QuickFIX - Dev mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------ >> ------ >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks >> to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK >> i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> _______________________________________________ >> Quickfix-developers mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >> >> >> >> =============================================================================== >> Please access the attached hyperlink for an important electronic >> communications disclaimer: >> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html >> >> =============================================================================== >> >> >> >> ------------------------------------------------------------------------------ >> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your >> production scanning environment may not be a perfect world - but thanks to >> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK >> i700 >> Series Scanner you'll get full speed at 300 dpi even with all image >> processing features enabled. http://p.sf.net/sfu/kodak-com >> _______________________________________________ >> Quickfix-developers mailing list >> Qui...@li... >> https://lists.sourceforge.net/lists/listinfo/quickfix-developers >> > > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Djalma R. d. S. F. <drs...@bm...> - 2009-05-12 20:25:43
|
Hi Ariel, Yes, due to GC undeterministic cycles, the potential risk exists in many places, but because of the pinning performance penalty, better pinning only the functions that you see that fails in your application. The QF 1.12.4 already has the major required pinned objects, but my personal experience showed me that when the application has a higher volume of messages to process, some methods that take a relatively long time to run, like toString and addGroup, must all be pinned to avoid this error. Following is toString fixed code: String* ToString() { QF_STACK_TRY QuickFix::Message __pin * pThis = this; return new String( pThis->unmanaged().toString().c_str() ); QF_STACK_CATCH } SENDTO:qui...@li... -----Original Message----- From: Ariel Piñeiro [mailto:ari...@gm...] Sent: terça-feira, 12 de maio de 2009 12:25 To: Djalma Rosa dos Santos Filho Cc: qui...@li... Subject: Re: [Quickfix-developers] Attempted to read or write protectedmemory. QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você não for o destinatário ou a pessoa autorizada a receber esta mensagem, não deverá utilizar, copiar, alterar, divulgar a informação nela contida ou tomar qualquer ação baseada nessas informações. Se você recebeu esta mensagem por engano, por favor avise imediatamente o remetente, respondendo o e-mail e em seguida apague-o. Agradecemos sua cooperação. This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, change, take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. |