Out of Memory Error Windows Phone 8.1

Discussion and feedback on Construct 2

Post » Fri Apr 25, 2014 8:54 pm

Is there a work around for this? I doubt it's a bug but something on my end. Seems to work OK in CocoonJS, but I get this on WP8.1

Saved state to WebStorage (98472 bytes)
Saved state to WebStorage (98518 bytes)
SCRIPT14: Unhandled exception at line 59, column 253 in ms-appx://e785df66-607c-4028-a911-b55ef60507b7/c2runtime.js
0x8007000e - JavaScript runtime error: Not enough storage is available to complete this operation.
File: c2runtime.js, Line: 59, Column: 253
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
WEBGL11098: INVALID_OPERATION: generateMipmap: The texture is a non-power-of-two texture or not mipmap complete
File: c2runtime.js, Line: 60, Column: 479
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
WEBGL11098: INVALID_OPERATION: generateMipmap: The texture is a non-power-of-two texture or not mipmap complete
File: c2runtime.js, Line: 60, Column: 479
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
WEBGL11098: INVALID_OPERATION: generateMipmap: The texture is a non-power-of-two texture or not mipmap complete
File: c2runtime.js, Line: 60, Column: 479
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
WEBGL11098: INVALID_OPERATION: generateMipmap: The texture is a non-power-of-two texture or not mipmap complete
File: c2runtime.js, Line: 60, Column: 479
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
WEBGL11098: INVALID_OPERATION: generateMipmap: The texture is a non-power-of-two texture or not mipmap complete
File: c2runtime.js, Line: 60, Column: 479
WEBGL11005: OUT_OF_MEMORY: texImage2D
File: c2runtime.js, Line: 59, Column: 352
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Sat Apr 26, 2014 11:42 am

Well, it looks like the device is out of memory, so you need to make your project use less memory. What is Construct 2 reporting as the estimated memory usage?
Scirra Founder
B
362
S
216
G
75
Posts: 23,071
Reputation: 180,354

Post » Sat Apr 26, 2014 5:29 pm

Ashley wrote:Well, it looks like the device is out of memory, so you need to make your project use less memory. What is Construct 2 reporting as the estimated memory usage?


download 17 Megs, Memory 88. This was testing on the High end emulator too. Not the 512 Meg one. I think the High ends are 1-2 Gigs.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Wed Apr 30, 2014 6:30 pm

Any ideas how to debug this? How do I determine what is causing this crash?

Seems to crash when it hits this
k.getContext("2d").drawImage(this.ja,a,b,c,d,0,0,c,d)
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Tue May 06, 2014 4:25 am

@Ashley I also ran it through the debug mode. It starts as ~92 megs of images it says and never really deviates from that. Objects hover around 200 max and I keep cpu under 3-5% (i know that doesn't mean much)

Point is, I don't see any memory leaks, so I'm not sure how I'm running out of memory. Again, on CocoonJS, I don't see this.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Tue May 06, 2014 5:17 pm

Quick note, I'm trying out the new Visual Studio 2013 Javascript tools, but I'm having issues with it. The debugger seems to exit before the tool can catch anything, I'm going to try some different settings with the exception handling. Also when I try to collect the heap with VS2013 it just spins and spins forever. Not sure if this is something with the way C2 works once compiled or if VS2013 isn't ready yet.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Wed May 07, 2014 6:35 am

@ashley I did some research and tell me what you think.

Here are the specs for Windows Phone 8
http://msdn.microsoft.com/en-us/library ... 2(v=vs.105).aspx
Could be looking at a range of 150 to 300 at as a limit.

I ran the mem profiler all over. C2 Says my game is at 90 megs, Chrome says the same +/-3.
In VS2013 my profiler says ~90-120m opening, and then when I click the button to change layouts it go way up to 180 and exits. That is with the small phone (512 emulator). With the large phone my game starts at like 120 and pegs 360 when I change a layout.

I do decent garbage collection, so i have a constant rate of items being created/destroyed so there isn't a run away process.

My result is this, the new universal app uses a lot more memory than expected from C2. What are our options?
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Thu May 08, 2014 12:07 am

firebelly wrote:@ashley I did some research and tell me what you think.

Here are the specs for Windows Phone 8
http://msdn.microsoft.com/en-us/library ... 2(v=vs.105).aspx
Could be looking at a range of 150 to 300 at as a limit.

I ran the mem profiler all over. C2 Says my game is at 90 megs, Chrome says the same +/-3.
In VS2013 my profiler says ~90-120m opening, and then when I click the button to change layouts it go way up to 180 and exits. That is with the small phone (512 emulator). With the large phone my game starts at like 120 and pegs 360 when I change a layout.

I do decent garbage collection, so i have a constant rate of items being created/destroyed so there isn't a run away process.

My result is this, the new universal app uses a lot more memory than expected from C2. What are our options?



I'm currently running some early tests of my game (+-10 physics obj on screen) for windows phone 8.1 and i might have the same problems.. I thought the universal export would be far better speed-wise than windows phone 8,

And one question: the VS2013 emulators are exact replica of the phones or they might have differences depending on your desktop , and is there a way to "calibrate" them ? cause I have not actually used a windows phone before and the windows phone 8.1 update is fairly new
B
27
S
8
G
3
Posts: 77
Reputation: 2,883

Post » Thu May 08, 2014 12:19 am

IE11 is much faster, but I'm talking memory here and not CPU speed.

VS2013 has bunch of new emulators. They are pretty close to the reference phone sizes.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Thu May 08, 2014 12:50 am

Yes i noticed the same (probably) memory issues that you have that's why i posted here..

but i added the speed comment cause my game runs faster on IE inside the emulator rather than the actual universal export ( but i have to investigate further the situation )
B
27
S
8
G
3
Posts: 77
Reputation: 2,883

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite and 8 guests