canvas Initialize(panel)

Gearcam

Active Member
Licensed User
Longtime User
I have 2 different Layout Variants 480 X 800 & 320 X 480

On the 480 X 800 this works no problems

On the 320X480 it causes a crash "The application has stopped unexpectedley"

This is the line that causes the problem

cnvtest.Initialize(pnltest)

I have tried alsorts to eliminate this but can not get it sorted
I have checked the size of the panel its correct 320 wide height is 360 which is the same as in the designer.

Is there any reason ?
 

Gearcam

Active Member
Licensed User
Longtime User
Erel

460800-byte external allocation too large for this process.
VM won't let us allocate 460800 bytes
Launch timeout has expired, giving up wake lock!
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x4001d800)
Activity idle timeout for HistoryRecord{44028390gearcam.co.uk.gearcam/.showgear}

So it looks to big ?

Why does it work ok on the bigger screen size ?
 
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Yes both the HTC wildfire and my emulator have been rebooted
Also the PC ?

It works great on my HTC Desire HD on both the device and the emulator

Steve


I have also deleted the emmulator re set it but its still the same ?
 
Last edited:
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
This is definetley a memory issue
i removed a lot of the maths data that is stored in very big arrays and it runs

What are the memory limitations for different devices ?

_________________________________________________


Ok heres the problem in full

I have a panel on the screen
On the panel i have a canvas

On this canvas i draw a full section view through a gear as can be seen here
Gear C.A.M. Gear Design Software its the single gear image bottom left (there are hundreds of short lines for accuracy)

SO far so good

I can then zoom in & out by changing the panel.setlayout command this works fine but the resolution when you zoom in a few times can become poor so i have a refresh button which re draws all lines but within a clippath area hoping this would solve my memory problem, resulution is now restored.

But i still get the problem when zooming in a few times ie the whole bitmap cam become very big hence the clipping i hoped would solve it.

these are the log lines

48372480-byte external allocation too large for this process.
VM won't let us allocate 48372480 bytes
Shutting down VM

any ideas how to help ?

Steve
 
Last edited:
Upvote 0

Gearcam

Active Member
Licensed User
Longtime User
Erel

thats the problem how to control the size of the canvas ?
are there any commands etc i can use to keep an eye on this in Log ?
 
Upvote 0
Top