Jump to content
Sign in to follow this  
vedat

Fmx Android Service Segmentation Fault (11)

Recommended Posts

Hello, I've tried to use fmx android service for my app. In the service I just use a simple notification that notify user as soon as the service started. When I start the service in my main app the program crashes when deploying to an android device. If I remove the line which I call the service in the main app it works properly in the android device. But once I try to call the service in the main app it just crashes. In the debug mode it gives Segmentation Fault (11) error but nothing. I know there is no problem with the notification process in the service because even when I remove the codes about notification from the service it stills crashes. (Btw I use Rad Studio 11) I would be grateful if get your help.

Share this post


Link to post
Guest

Hello, which Delphi version are you using? what is android device version, it can be tested more easily if you prepare and share a simple demo that shows the problem.

Edited by Guest

Share this post


Link to post
8 hours ago, vedat said:

You have FMX.Types in the uses clause of Unit2 in your service. Not sure why, since it does not even need to be there. Regardless, that is why your service is failing. Please see this report:

 

https://quality.embarcadero.com/browse/RSP-17857

  • Like 1

Share this post


Link to post

Thank you for your answer Dave Nottage. Actually I didn't consider such a solution like that 🙂 When I tried to add timer component into the Unit2 which is service's unit  it adds FMX.Types library automatically. Once it's been added you can't delete until you remove the timer component. I've missed to remove that FMX.Types while creating a demo. It comes from my original app, I copied all the uses section from it. Anyway, your beautiful attention solved the problem 🙂 If you do not mind can you give an advice about how to use something like timer in my service because I am doing some tasks related to time

  • Like 1

Share this post


Link to post
Guest
23 minutes ago, vedat said:

Thank you for your answer Dave Nottage. Actually I didn't consider such a solution like that 🙂 When I tried to add timer component into the Unit2 which is service's unit  it adds FMX.Types library automatically. Once it's been added you can't delete until you remove the timer component. I've missed to remove that FMX.Types while creating a demo. It comes from my original app, I copied all the uses section from it. Anyway, your beautiful attention solved the problem 🙂 If you do not mind can you give an advice about how to use something like timer in my service because I am doing some tasks related to time

I'm glad that the problem has been resolved. On the service side, we cannot use many fmx objects and units, so it is necessary to solve the problem with the native functions of the platform, many people don't know or ignore this situation, they think it's like development fmx gui app, and they're dealing with problems.

 

for abount timer, you can check the here.

https://github.com/grijjy/DelphiPlatformTimerQueue

 

 

 

Edited by Guest

Share this post


Link to post
1 minute ago, okoca said:

I'm glad that the problem has been resolved. On the service side, we cannot use many fmx objects and units, so it is necessary to solve the problem with the native functions of the platform.

 

You can check the timer here.

https://github.com/grijjy/DelphiPlatformTimerQueue

 

 

 

Thank you for your help okoca I got it

Share this post


Link to post
Guest
12 hours ago, Dave Nottage said:

You have FMX.Types in the uses clause of Unit2 in your service. Not sure why, since it does not even need to be there. Regardless, that is why your service is failing. Please see this report:

 

https://quality.embarcadero.com/browse/RSP-17857

hey dave, thank you for your long support and contribution to the delphi community, take care.

Edited by Guest

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×