Simple project (sample) failed on VCL #150
-
It looks like that component is not fully compatible with VCL. I have copied the very basic components and functions from the FireMonkey example provided "RTDB_SimpleReadWrite" Everything works getting and setting data to the database but when you close the form, I get the error Project Project1.exe raised exception class ENetHTTPResponseException with message 'Error reading data: (12017) The operation has been canceled'. IDE: Delphi 11.2 Alexandria |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
When running the application in the Delphi IDE, you will see this silent exception of the class ENetHTTPResponseException with message 'Error reading data: (12017) The operation has been canceled'. This is no defect because it is a silent exception which the user will never see. Now I have added this explanation to the reference manual: https://github.com/SchneiderInfosystems/FB4D/wiki/FB4D-Reference-IFirestoreDatabase#note-about-the-exception-while-stopping-the-listener |
Beta Was this translation helpful? Give feedback.
-
I disagree, as my application built with D11.2 returns an error in production too
|
Beta Was this translation helpful? Give feedback.
-
Ok I found the issue, it looks like you forgot to add the "fEvent.StopListening" on the OnCloseQuery of the form. |
Beta Was this translation helpful? Give feedback.
-
It should be stopped automatically within TFirebaseEvent.Destroy in this line:
Do you have declared the |
Beta Was this translation helpful? Give feedback.
It should be stopped automatically within TFirebaseEvent.Destroy in this line:
Do you have declared the
fFirebaseEvent: IFirebaseEvent
properly as interface type?If you have declared fFirebaseEvent as TFirebaseEvent, you must release it yourself. This would explain your findings.