Adding a breakpoint before saveImage is called shows that the log attached is generated only from this line: String imagePath = Capture.capturePhoto(960, -1);
And saveImage is only called once per image. I can provide a minimal example that shows this too, but the steps are fairly easy: 1. Make a button that calls Capture.capturePhoto(960,-1); in the action listener 2. Run in the simulator with EDT debugging turned on 3. Press the button, upload the image, watch the logs. The image isn't used again by CN1 code, the path is stored as a string and passed as a string to native code later on. In any case the dispose is the difference between it crashing after a few photos on all iOS devices and it crashes only after a lot of photos only on some iOS devices. I'm sure its necessary and it isn't causing issues unless there are other side effects. Because of the hit and miss nature of whether this crashes it 'feels' like a memory or thread issue but there are no memory warnings in the logs that I've seen from users that have this happen and there is this significant EDT strangeness going on at the same point in the simulator - seems like something that should be fixed and eliminated as a potential cause of the issue I'm seeing. On Friday, October 6, 2017 at 6:16:05 PM UTC+13, Shai Almog wrote: > > I don't see how 17,000 lines can be generated from this? I'd investigate > that first as it looks really suspicious. I think you invoke savePicture in > a loop causing out of memory at some point for this. > > Also dispose() might not be ideal, if you do that and still have a > reference to the image "somewhere" it's an instant crash. > -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/e3ee4082-5e45-41f8-8415-02048f54dd63%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
