-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Camera] demo crashes after startup #113
Comments
In regards to the issue where the application crashes, when exactly does this happen? e.g. when the app starts, or when it attempts to start the camera? For the issue regarding TNativeEllipse etc, please ensure you install the controls package called KastriFMX, here: https://github.com/DelphiWorlds/Kastri/tree/master/Packages/D104
The code does not have this feature as yet, but I will consider adding it |
It is strange to me that the compiler is not producing an error for the missing package D104?? I tried the debug an older version (Kastri-c5f28201c2cb5d5ac0f8bc4919308301741a0080). I can press the blue camera button and then an error occurs in line: FImageStream.CopyFrom(AImageStream, AImageStream.Size); (The size is 170868) and in system.classes Source.ReadBuffer(Buffer, N); I had the impression the exposure time was adjustable in the latest version. That would be great for my Astronomy application. I you can share something working without a package required that would be great. Thanks, Han |
To install a package from source, open
What exactly is the error?
Not the exposure time, the exposure value that corresponds to the ISO value can be adjusted. |
|
I successfully installed the KastriFMX.dproj. I can now see the form of CD.view.Camera. Unfortunately the application still crashes immediately with Android message "Unfortunately CameraDemo has stopped". The log in Delphi disappears. |
The application crashes at line 55 in CD.main.view: FCameraView := TCameraView.Create(CameraTab); |
In CD.view.Camera it crashes in line 91: Android 6.01 is not happy about something in the forms? |
I have fixed the old version of the CameraDemo by bypassing FImageStream as follows: procedure TCameraView.CameraImageCapturedHandler(Sender: TObject; const AImageStream: TStream); FCaptureImage.LoadFromStream(AImageStream); TabControl.ActiveTab := CaptureTab; I tried also add the Exposure setting but in the old version Fcamera.exposure is missing. I don't understand why this property is in the new version but not in the old version of the CameraDemo. I could find a definition of this exposure property. Where is this property created? I'm pretty sure KastriFMX is causing problems in Android 6.0.1 but the debugger shows nothing. Han |
As soon I add a TNativeSlider to the old application it crashes immediately after start. Found Fcamera.exposure (ISO) in the latest DW.camera.pas under features. |
I've pushed a fix for the issue of the app crashing at startup. When the Delphi 11 project was updated, the Delphi 10.4 project was not.
Because it was added to the new version. There are some problems with this property anyway - I haven't been able to get it to work quite right on Android. It works OK on iOS. |
I tried the new update. Application is started. But as soon I press the start button I get following error: |
I've now pushed a change that should resolve this error |
I have downloaded the latest code. Uninstalled/installed KastriFMX. As soon I click on the blue camera button it now crashes without any message at line 127: FCamera.CaptureImage; |
Note the so called "exposure slider" was not visible in the app. |
You need to tap the circle in the middle to show/hide the slider, as is necessary in the built in camera app on Android.
Are you running the app via the debugger? Does the debugger just quit without any message? I have a debugging tool called Device Lens, here, that might help resolve this issue. There's some basic instructions in the "Device Lens main window" section for how to filter for messages for the app you're running. In this case the package name will be |
Han |
From your description, it seems you have started the SDK installer, which you should not need to do if Delphi is already configured to use an SDK. If you close Device Lens, go to the |
I've pushed changes which may fix the latest issues. NOTE: If your camera does not support controlling exposure, the slider will now be disabled (i.e. you will not be able to change it) when making it appear. Unfortunately I do not have the same device as you are using, so I'm unable to fully test the changes. |
No success. It crashes now both on touching the white circle and blue camera button. After touching the blue camera button it crashes in DW.Camera.Android.pas line 634: I have added the SDK path to DeviceLens: |
I've pushed a change that should fix it
Yes, there should be devices listed on the left, if the device is connected to the machine and USB debugging is enabled on the device. Once a device is selected, a list of running processes should appear in the list to the right of the device list
As I indicated earlier, the exposure is problematic - something I'm still working out. |
Thanks. Now it works on my 64 bit phone (S7) Images are taken and displayed. Hopefully you can fix the brightness slider for Android and maybe add exposure time. That would be great. |
You can follow this issue for progress on the exposure level. I'll create a separate one for exposure time |
The camera demo crashes after started in Android 32 bit.
No error messages except that android application has stopped with message "Unfortunately CameraDemo has stopped".
Samsung J5, Android version 6.0.1
Delphi 10.4
Note for the CD.CameraView form TNativeEllipse, class TnativeImage are not found.
Older camera demos from 2020 an onward do not work either but crash as soon an image is taken.
Note: I'm looking for a simple camera application where the exposure time can be set long like 2 seconds.
Han
The text was updated successfully, but these errors were encountered: