Have you tried one RETS session to search for photos, dispose, and a new RETS session to pull images?
I use an in-memory data table from the search as source for the get object requests.
Dave Bills
Senior Applications Programmer \ Technical Support
Pikes Peak Association of REALTORS®
719-476-8154 Direct
From: librets-us...@crt.realtors.org [mailto:librets-us...@crt.realtors.org] On Behalf Of Brad Larsen
Sent: Monday, February 17, 2014 11:40 AM
To: libret...@crt.realtors.org
Subject: [libRETS-users] libRets 1.5.3 x86 and .Net 4xSystem.AccessViolationException
We're using this library to retrieve MLS images from FlexMLS, and we've been getting regular exceptions in windows, and it appears to be taking down our website every few hours. I saw a few threads related to this, but the only solution I've come across is rolling .net back to 3.5. Does anyone have any leads or a solution to this problem?
Thanks in advance.
source seems to be at: librets.libretsPINVOKE.RetsSession_GetObject
Exception 1:
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
Stack:
at librets.libretsPINVOKE.RetsSession_GetObject(HandleRef jarg1, HandleRef jarg2)
at librets.RetsSession.GetObject(GetObjectRequest request)
at PremierFeed.FlexMls.MlsImages.AllPhotos(String mlsId, Int32 size)
at PremierFeed.Data.Domain.ImageService.GetPhotos(String mls, Int32 size)
and
Exception 2:
EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 librets-dotnet, P5 0.0.0.0, P6 4f5d25f9, P7 362, P8 1, P9 system.accessviolationexception, P10 NIL.
and
Exception 3:
An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 4900
Exception: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
StackTrace: at librets.libretsPINVOKE.RetsSession_GetObject(HandleRef jarg1, HandleRef jarg2)
--
Bradley Larsen / .Net Developer
x716 / br...@pageonewebsolutions.comPage One Web Solutions Office: 1-888-274-0483 / Fax: 1-866-473-9751
250 Commercial St., Portland, ME 04101
http://www.pageonewebsolutions.comThis e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Company Name is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-m
_______________________________________________
libRETS-users mailing list
libRET...@crt.realtors.org
http://mail.crt.realtors.org/mailman/listinfo/librets-users
Bradley Larsen / .Net Developer
x716 / br...@pageonewebsolutions.com
Page One Web Solutions Office: 1-888-274-0483 / Fax: 1-866-473-9751
250 Commercial St., Portland, ME 04101
http://www.pageonewebsolutions.com
This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Company Name is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-m
Interesting. So in theory it could be faster to pass in multiple listings with wildcard all object IDs then to querying with addallobjects for each individual listing?
Jonathan Otsuka
> On Feb 18, 2014, at 11:44 AM, Mark Klein <lib...@dis.com> wrote:
>
>
>> On Feb 18, 2014, at 9:18 AM, Jonathan Otsuka <djg...@gmail.com> wrote:
>>
>> I haven't seen a way to add multiple objects to a request. I just process with one request at a time using addobject or addallobjects.
>
> You can use AddObject to get media from multiple listings in one request. But, keep in mind, media can get large and you don't want the request to get too big.
>
>
>> From the c++ example ("resourceSet" can be <key>:<image id> as in "LN0001:1, LN0002:1, LN0003:*", etc).
>
> GetObjectRequest getObjectRequest(resource, type);
>
> vector<string>::const_iterator i;
> for (i = resourceSets.begin(); i != resourceSets.end(); i++)
> {
> vector<string> resourceSet;
> ba::split(resourceSet, *i, ba::is_any_of(":"));
> if (resourceSet.size() == 1)
> {
> getObjectRequest.AddAllObjects(resourceSet[0]);
> }
> else if (resourceSet.size() == 2)
> {
> vector<string> ids;
> ba::split(ids, resourceSet[1], ba::is_any_of(","));
> vector<string>::const_iterator idString;
> for (idString = ids.begin(); idString != ids.end();
> idString++)
> {
> int id = lexical_cast<int>(*idString);
> getObjectRequest.AddObject(resourceSet[0], id);
> }
> }
> }
> getObjectRequest.SetLocation(returnUrl);
> getObjectRequest.SetIgnoreMalformedHeaders(ignoreMalformedHeaders);
>
> GetObjectResponseAPtr getObjectResponse =
> session->GetObject(&getObjectRequest);
>
>
>>
>> Jonathan Otsuka
>>
>>> On Feb 18, 2014, at 8:38 AM, Brad Larsen <br...@pageonewebsolutions.com> wrote:
>>>
>>> Can you add multiple objects to the same request, or is this doing things multiple times before closing the session?
>>>
>>>
>>> On Mon, Feb 17, 2014 at 8:05 PM, Jonathan Otsuka <djg...@gmail.com> wrote:
>>> I don't think there is a function to pull only the first image for a list of listings. You can build a function to do it with addobject though.
>>>
>>> http://www.crt.realtors.org/projects/rets/librets/documentation/api/classlibrets_1_1_get_object_request.html#93671703cad19109acebf0b33cb32530
>>>
>>> Jonathan Otsuka
>>>> Bradley Larsen / .Net Developer
>>>> x716 / br...@pageonewebsolutions.com
>>>>
>>>> Page One Web Solutions Office: 1-888-274-0483 / Fax: 1-866-473-9751
>>>> 250 Commercial St., Portland, ME 04101
>>>> http://www.pageonewebsolutions.com
>>>>
>>>>
>>>>
>>>> This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Company Name is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-m
>>>>
>>>>
>>>> _______________________________________________
>>>> libRETS-users mailing list
>>>> libRET...@crt.realtors.org
>>>> http://mail.crt.realtors.org/mailman/listinfo/librets-users
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Bradley Larsen / .Net Developer
>>>> x716 / br...@pageonewebsolutions.com
>>>>
>>>> Page One Web Solutions Office: 1-888-274-0483 / Fax: 1-866-473-9751
>>>> 250 Commercial St., Portland, ME 04101
>>>> http://www.pageonewebsolutions.com
>>>>
>>>>
>>>>
>>>> This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Company Name is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-m
>>>>
>>>> _______________________________________________
>>>> libRETS-users mailing list
>>>> libRET...@crt.realtors.org
>>>> http://mail.crt.realtors.org/mailman/listinfo/librets-users
>>>
>>> _______________________________________________
>>> libRETS-users mailing list
>>> libRET...@crt.realtors.org
>>> http://mail.crt.realtors.org/mailman/listinfo/librets-users
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Bradley Larsen / .Net Developer
>>> x716 / br...@pageonewebsolutions.com
>>>
>>> Page One Web Solutions Office: 1-888-274-0483 / Fax: 1-866-473-9751
>>> 250 Commercial St., Portland, ME 04101
>>> http://www.pageonewebsolutions.com
>>>
>>>
>>>
>>> This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited.. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Company Name is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-m