W wheretheidivides Active Member Licensed User Longtime User Jan 23, 2013 #1 . Last edited: May 24, 2020
Erel B4X founder Staff member Licensed User Longtime User Jan 23, 2013 #2 Seems like you are loading a (too) large bitmap. A large bitmap can easily take the whole available memory. Upvote 0
Seems like you are loading a (too) large bitmap. A large bitmap can easily take the whole available memory.
Erel B4X founder Staff member Licensed User Longtime User Jan 23, 2013 #3 I don't think that this code will help. The size that matters is the actual image size. I see that the program fails when it tries to load a button image. Can you upload your project? Upvote 0
I don't think that this code will help. The size that matters is the actual image size. I see that the program fails when it tries to load a button image. Can you upload your project?
D davidlub Member Licensed User Longtime User Jul 29, 2013 #4 Hi, I am getting the same problem on two different devices so I think it is not a system issue in the device but a problem in my app. It happens after three or four pictures and leaves the app in a strange corrupted state. I did not see anything untoward in the logs. I have tried the suggested fix to pause for 3 seconds while "TakePicture" runs but that made no difference. Hope someone can help. Thanks David Upvote 0
Hi, I am getting the same problem on two different devices so I think it is not a system issue in the device but a problem in my app. It happens after three or four pictures and leaves the app in a strange corrupted state. I did not see anything untoward in the logs. I have tried the suggested fix to pause for 3 seconds while "TakePicture" runs but that made no difference. Hope someone can help. Thanks David
Erel B4X founder Staff member Licensed User Longtime User Jul 29, 2013 #5 Do you get the exact same error message? Upvote 0
D davidlub Member Licensed User Longtime User Jul 30, 2013 #6 Hi Erel, I am pretty sure now that my problem is that I am running out of memory leaving everything in a weird state. Thanks for the response. I will try and sort it out. David Upvote 0
Hi Erel, I am pretty sure now that my problem is that I am running out of memory leaving everything in a weird state. Thanks for the response. I will try and sort it out. David
D davidlub Member Licensed User Longtime User Jul 31, 2013 #7 Hi I have resolved the problem I think, but it seems that the Camera and by extension the the CamerEx class are a bit brittle. I don't think that it is a memory leak problem as the process size was not growing much with new photographs. I doubt this is a B4A problem, perhaps generic Android. Anyway the steps I took to get a stable app that can take many photos without crashing were: Restrict the screen orientation to portrait in the activity that takes the photograph. Set the picture size to the smallest mode possible. This has its own problems as you cannot access the SetPcitureSize method till the camera has been fully initialised which takes a variable amount of time. I got round this with: Msgbox("Click when camera is ready","Pause") after the CamEX.Initialise call. Even though I was not convinced about the memory issue I did put in explicit recycle and garbage collect calls. These did not slow the app down significantly. Upvote 0
Hi I have resolved the problem I think, but it seems that the Camera and by extension the the CamerEx class are a bit brittle. I don't think that it is a memory leak problem as the process size was not growing much with new photographs. I doubt this is a B4A problem, perhaps generic Android. Anyway the steps I took to get a stable app that can take many photos without crashing were: Restrict the screen orientation to portrait in the activity that takes the photograph. Set the picture size to the smallest mode possible. This has its own problems as you cannot access the SetPcitureSize method till the camera has been fully initialised which takes a variable amount of time. I got round this with: Msgbox("Click when camera is ready","Pause") after the CamEX.Initialise call. Even though I was not convinced about the memory issue I did put in explicit recycle and garbage collect calls. These did not slow the app down significantly.
eps Expert Licensed User Longtime User Jul 31, 2013 #8 You can also ask the App to increase the heapsize available.. although all this does is give it more memory to fill up.. Upvote 0
You can also ask the App to increase the heapsize available.. although all this does is give it more memory to fill up..