OutOfMemoryException thrown on initialize WurflContainer

ABTL-SSC
Posts: 6
Joined: Mon Jan 11, 2016 1:06 am

OutOfMemoryException thrown on initialize WurflContainer

Postby ABTL-SSC » Mon Jan 11, 2016 1:11 am

We are getting OutOfMemoryException when we initialize the WurflContainer for first time,It seems that the code is populating a large size array.

Following is the error detail.

System.OutOfMemoryException
Exception of type 'System.OutOfMemoryException' was thrown.

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at Ionic.Zip.ZipEntry.ExtractOne(Stream output)
at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)
at WURFL.Resource.WURFLResources.ZippedWurflResource.GetStream()
at WURFL.Resource.WurflParser.Parse(IWurflResource wurflResource, IWurflResource[] patchResources)
at WURFL.Devices.DeviceRepositoryBuilder.Build(Configuration config)
at WURFL.WURFLManagerBuilder.BuildFrom(Configuration configuration)
at WURFL.WURFLManagerBuilder.Build(IWURFLConfigurer configurer)

Is there anything so that we can solve this issue.
Thanks

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Mon Jan 11, 2016 10:22 am

What API version are you currently using? Also, how much memory is being consumed prior to the exception error?

ABTL-SSC
Posts: 6
Joined: Mon Jan 11, 2016 1:06 am

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby ABTL-SSC » Tue Jan 12, 2016 12:58 am

We are using v1.6.2.0.
Application .NET framework version is 4.0.
We have more than 8 GB memory on the machine and only 4GB is used before the exception error.

I think it not the system memory limitation issue it is something related to the memory stream byte array size issue like the one discussed here

http://www.codeproject.com/Articles/348 ... moryStream

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Tue Jan 12, 2016 10:35 am

Hi John,

Thank you for the information, I will relay it to our engineering team and get back to you as soon as I get an update.

Let me know if you have any other questions or concerns.

Aaron

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Tue Jan 12, 2016 10:54 am

John,

Our engineering team would like to know how you are using the API and if you could send some test code you are using that replicates the issue.

Aaron

ABTL-SSC
Posts: 6
Joined: Mon Jan 11, 2016 1:06 am

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby ABTL-SSC » Wed Jan 13, 2016 8:02 am

Sent you code in private message.

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Wed Jan 13, 2016 11:10 am

John,

Your code has been handed off to our engineers for analysis. I will get back to you as soon as I get an update.

Thanks,

Aaron

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Wed Jan 13, 2016 11:35 am

John,

Are you able to send us a Visual Studio project with your code inside along with all patch files and the wurfl.xml you are using? Also have you tried version 1.6.4.1, our latest release?

Aaron

ABTL-SSC
Posts: 6
Joined: Mon Jan 11, 2016 1:06 am

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby ABTL-SSC » Wed Jan 13, 2016 1:39 pm

Aaron,

We might not be able to share the original source code of our project because it is confidential.

But I can create a Visual Stdio project for you if it is required.

We have not tried the latest version but we can try it if it contain any for fix for the problem.

I am not able to send you the wurfl xml because i am receiving error on attachment upload

Error:Could not upload attachment to ./files/1097_11f2536ef2c2ec8b31cdf5fb073436ba.
Thanks

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Wed Jan 13, 2016 3:03 pm

John,

Are you able to upload the patch files and wurfl.xml files to your Customer Vault (My Account -> File Management)? Once you have uploaded the files, an email notification will be sent to you confirming the upload.

Thanks,
Aaron

ABTL-SSC
Posts: 6
Joined: Mon Jan 11, 2016 1:06 am

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby ABTL-SSC » Thu Jan 14, 2016 8:06 am

I have uploaded the files [wurfl.zip]

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Thu Jan 14, 2016 10:40 am

John,

Thank you for the additional information. I have passed it off to our engineers for further analysis.

Aaron

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Thu Jan 14, 2016 12:15 pm

John,

Are you using the patch file formatted as a password protected zip? We can reproduce the exception when only attempting to use it in said format.

Code: Select all

at Ionic.Zip.ZipEntry.ExtractOne(Stream output) 
at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password) 
at WURFL.Resource.WURFLResources.ZippedWurflResource.GetStream() 
at WURFL.Resource.WurflParser.Parse(IWurflResource wurflResource, IWurflResource[] patchResources)
Aaron

ABTL-SSC
Posts: 6
Joined: Mon Jan 11, 2016 1:06 am

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby ABTL-SSC » Thu Jan 14, 2016 3:04 pm

No the patch file is flat xml file like 'web_browsers_patch.xml' and the wurfl.xml is zip without password as downloaded from the scientiamobile URL for latest update.

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Thu Jan 14, 2016 5:01 pm

John,

Are you able to create and upload a Visual Studio project that creates this exception as we are having difficulties replicating this event.

Thanks,
Aaron

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Fri Jan 15, 2016 9:39 am

In the meanwhile, are you able to try testing without the patch file?

aaronp
Posts: 223
Joined: Wed Dec 09, 2015 12:39 pm

Re: OutOfMemoryException thrown on initialize WurflContainer

Postby aaronp » Fri Jan 22, 2016 4:43 pm

Hi John,

Just wanted to check in and see if you were able to get the API running without the patch file.

Let me know how everything is going.

Thanks,
Aaron


Who is online

Users browsing this forum: No registered users and 1 guest