-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cant start service app #1049
Comments
From @Bakterija on April 30, 2017 23:12 The old method is broken for some reason in new toolchain. |
I forgot to add that the service had to be packaged with the new method for autoclass to work. |
Hi, |
@sireistwa Not really, I'll probably try to look at it for the next release but no guarantees. I recommend using the new-style services, which do work. |
@inclement starting service with new syntax in foreground and tapping the notification causes restarting of the app and android "app was stopped" messages. And that is the problem. I still need to use the old toolchain because foreground services works well only there |
Hi, I use python2,kivy,p4a and I want to start simple (empty) service: from time import sleep
if __name__ == '__main__':
while True:
sleep(3) In main.py: def on_press(self):
from jnius import autoclass
self.service = autoclass('org.gandiriyko.diary.ServiceMyservice')
mActivity = autoclass('org.kivy.android.PythonActivity').mActivity
argument = ''
self.service.start(mActivity, argument) buildozer.spec: [app]
# (str) Title of your application
title = Diary
# (str) Package name
package.name = diary
# (str) Package domain (needed for android/ios packaging)
package.domain = org.gandriyko
# (str) Source code where the main.py live
source.dir = .
...
service = myservice:myservice.py
But It creashed:
|
I think the two methods are not working. (Service folder or Arbitrary service scripts) |
Also having the issue with both service methods. |
I am having the same issue where none of the three options are working, this is what I have now:
But it keeps trying the last one(because the others are returning an error), and crashes If any of you has found a working solution, I'd be happy to hear it :) |
I'm currently implementing a service and I have a draft working in my branch: |
Thank you for your reply. I changed my code to make the service part the same as yours. |
What make you think it doesn't work? |
It makes my think it doesn't work because the app crashes when I try to start the service ): |
Oh OK for the crash, I didn't know. Well you can filter on
And share that log. Well in fact there's a proper built-in way to filter logs on logcat, but I have a lazy brain, so I use grep since I know it works. |
Ah Thank you now It is much more readable, It still is a lot though
I cut away the first part because the comment would be too long |
The error is pretty clear |
Ok Thank you, I'll let you know if I got it working :D |
Thank you so much man, I finally got it to work and not crash! The problem was really stupid though. instead of org.myapp I wrote com.myapp |
Hi guys I'm new with the whole android service idea. I got the same message. But I can't figure out how to fix mine. And I have it setup like this main.py 08-13 16:09:02.801 28761 28859 I python : jnius.jnius.JavaException: Class not found 'org/test/nametest/ServiceMyService' heres my bulldozer spec
and my main.py is just standard. from kivy.app import App kv = ''' class ServiceApp(App):
if name == 'main': |
alll good. Been stuck on this problem for two days. Firgured out i needed to change it from services = myservice:Documents/2017/Software_Development/SAT/Kivy/test/service/main.py |
I confirm I could reproduce the bug initially described using the
First thing is I guess trying to enable debug symbols. |
@AndreMiras strlen+71 and "fault addr 0x0" indicate a strlen on a null char pointer. Line 134 in 764b59e
The implementation is done at
So one of theses are NULL, so passed NULL from the java i guess. |
Yep this is exactly where I am at, thank you for the pointers! I'm doing without debug symbols and I also have to go through the full compile so it's quite slow. |
Seems like the bug was introduced in #609 |
@Bakterija could you give my fix a try #1371 |
…id_service_crash Sets default service pythonName, fixes #1049
Merged into master, @Bakterija feel free to give it another try after a |
From @Fogapod on April 28, 2017 17:1
Versions
Description
Service app raises android error right after starting. No exceptions, no kivy logs. Just do not start. Faced this problem only on android building with buildozer's
android_new
toolchainCode
I get code from here: https://github.com/tshirtman/kivy_service_osc
(changed line 7 and 8 to
from kivy import platform
)Logs
Part of logcat where app fails to start service
Edit: removed apk.
Copied from original issue: kivy/kivy#5140
The text was updated successfully, but these errors were encountered: