lemonisdead Well-Known Member Licensed User Longtime User Oct 25, 2017 #1 Hello, This is absolutely not important and absolutely a stupid question because B4A prints a lot of warning and this has absolutely not to have to be used like that. By chance, while debugging, I have noticed that if you make a call to a sub from the Process_Globals sub of Main and the Starter service, it is executed. But if you make a call from another service, it generates an error : java.lang.RuntimeException: Unable to create service b4a.example.subs.starter: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException Click to expand... I wondered why in one case and not the other. Project attached, line to uncomment is in the ss1 service to make it crash. Thanks Attachments test.zip test.zip 8.2 KB · Views: 587
Hello, This is absolutely not important and absolutely a stupid question because B4A prints a lot of warning and this has absolutely not to have to be used like that. By chance, while debugging, I have noticed that if you make a call to a sub from the Process_Globals sub of Main and the Starter service, it is executed. But if you make a call from another service, it generates an error : java.lang.RuntimeException: Unable to create service b4a.example.subs.starter: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException Click to expand... I wondered why in one case and not the other. Project attached, line to uncomment is in the ss1 service to make it crash. Thanks
Erel B4X founder Staff member Licensed User Longtime User Oct 26, 2017 #2 Process_Globals should only be used for variables declarations and assignments of simple values (primitives and strings). Any other code might fail in some of the cases. Whether it will fail or not can change between the deployment methods and other semi-random factors. Upvote 0
Process_Globals should only be used for variables declarations and assignments of simple values (primitives and strings). Any other code might fail in some of the cases. Whether it will fail or not can change between the deployment methods and other semi-random factors.