Midlet Abnormal Exit | Telit Cinterion IoT Developer Community
November 19, 2019 - 2:43pm, 1898 views
Hi everybody,
I'am using gemalto bgs5 since 2016 with our codes. 2 weeks ago, some of the modems stopped. I have more then 20 modems on the fild but 6 of them is not working.
Is anybody knows anything about it
java.lang.NullPointerException: 0
- util.ATCmd.send(ATCmd.java:38)
- util.ModuleInit.module_init(ModuleInit.java:17)
- altmod.Altmod.startApp(Altmod.java:155)
- javax.microedition.midlet.MIDletTunnelImpl.callStartApp(), bci=1
- com.sun.midp.midlet.MIDletPeer.startApp(), bci=5
- com.sun.midp.midlet.MIDletStateHandler.startSuite(), bci=261
- com.sun.midp.main.AbstractMIDletSuiteLoader.startSuite(), bci=38
- com.sun.midp.main.CldcMIDletSuiteLoader.startSuite(), bci=5
- com.sun.midp.main.AbstractMIDletSuiteLoader.runMIDletSuite(), bci=134
- com.sun.midp.main.AppIsolateMIDletSuiteLoader.main(), bci=26
MIDlet:altmod.Altmod abnormal exit
Hello,
I think that you may need some additional debug of your applicaiton.
You get NullPointerException on the execution of util.ATCmd.send() which is probably your wraper for ATCommand.send() from the standard API.
Looks like null is passed as an argument. You need to find out why and do some implementation to prevent it.
Regards,
Bartłomiej
Thanks Bartlomiej,
My code designer just tell me following line is the problem.
ATCmd.send("AT^SPOW=1,0,0\r");
And he also said it happened after 3 years and some of them...
I wonder bgs5 can update something by it self ? Or these are 2g modems, gsm service providers infrastructure can crush like this ?
Thanks in advance
Hello,
Based on the stack trace you have pasted I can only say that NullPointerException is thrown out of ATCmd.send() method which is not a part of a standard API. I could only speculate what the cause was - null parameter or object not isntantiated etc. You have the code and a possibility to debug it. I don't know what's inside ATCmd.send().
If you suspect that the installed app could have got corrupted somehow, you can always uninstall it and install again. Even if it helps I think that you should still be careful in assuming that there's no bug in the application.
Was AT^SPOW=1,0,0 command the first command executed in your application? Were any other executed successfully prior to AT^SPOW=1,0,0 command?
Based on the information that I got from you I can't say anything more.
Best regards,
Bartłomiej
Hi Bartlomeij,
I further investigated the code. The problem is at the initialization of the device. AT^SPOW=1,0,0 is almost the first command of the application (I'm sharing the code below)
As you said, util.ATCmd.send() is the wraper of ATCommand.send(). You can see it in here:
The application's been up and running for 3 years, but I've recently come across this error for last 2 weeks and it's not happening for all the devices even though I use the same application. That's why I get confused.
Hello,
Do you have any of the failing devices on your desk? Have you already tried to reinstall the applicaion? I suppose that you are unable to reproduce this with other devices.
If AT^SPOW=1,0,0 was the first command sent (as it seems to be in the pasted code) we could suspect that for example ATCommand instance is null because it wasn't initialized or was nulled by the app for some reason (if this is possible in your app).
Are there any other exceptions before or other unususal debugs?
But as the app was running without problems for a long time I agree that this problem looks strange. And you should start with getting the failing device. You can then try to reinstall the app and if it doesn't help you can make soem changes or install some other test MIDlet which executes some AT commnads, especially AT^SPOW=1,0,0 command, send the same commands from the terminal program etc.
Best regards,
Bartłomiej