Help with a very curious issue

123_Fenrir

New member
Jun 26, 2019
2
0
0
Visit site
My company has recently hired a system that allows our external salesmen to generate and print invoices through tablets and bluetooth printers, using their app.

We've acquired 6 Samsung Tab A (SM-T285) for that, and we're running into some trouble that even the developers can't understand. We've been working together trying to figure out solutions, and having failed, we turn to you now.

The application keeps crashing at random times, although most of them happen when printing something. All we get is the message "The application has stopped", without any other information. And oddly enough, their other clients that use this same model aren't encountering this problem, only our 6 tablets are victims.

We've tried everything from factory reset to rooting and even to making changes in the app's code, but nothing has worked so far. Do you guys have any ideas?
 

belodion

Co-Ambassador Team Lead
Moderator
Jun 10, 2014
39,380
248
63
Visit site
Welcome.

Have you tried Safe Mode?

Also, are the other clients using the same Bluetooth printers?
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
26
0
Visit site
The first step you must get to is being able to reproduce the failure at will. Until you can do that, they can spend 10 years and never find the problem.

Once you can reproduce it, tell them how - and they'll probably have it fixed in a day or two at the most. (They reproduce it while it's running in a debugger, so they can see exactly what instruction is causing it to fail - then they rewrite it so it doesn't.) I'm not "trying to get rid of you" or anything - I'm retired ... from 46 years of fixing software bugs like that. If you can't reproduce it on demand, your odds of finding it are about the same as winning the lottery without buying a ticket. (We had a database that kept on blowing up even though all the code [so we thought] was error-trapped for 6 months. A customer finally figured out how to force it to fail. After that it took 5 minutes to find the typo that was causing it.)
 

mustang7757

Super Moderator
Moderator
Feb 6, 2017
91,475
6,086
113
Visit site
My company has recently hired a system that allows our external salesmen to generate and print invoices through tablets and bluetooth printers, using their app.

We've acquired 6 Samsung Tab A (SM-T285) for that, and we're running into some trouble that even the developers can't understand. We've been working together trying to figure out solutions, and having failed, we turn to you now.

The application keeps crashing at random times, although most of them happen when printing something. All we get is the message "The application has stopped", without any other information. And oddly enough, their other clients that use this same model aren't encountering this problem, only our 6 tablets are victims.

We've tried everything from factory reset to rooting and even to making changes in the app's code, but nothing has worked so far. Do you guys have any ideas?
This kind of problem will be very hard to trace just text back and forth .
Look at settings in Bluetooth from tablet to the printer see anything there or try a different Bluetooth printer , also maybe the app is a issue , what steps have you taken so we could avoid going over same ones?
 

123_Fenrir

New member
Jun 26, 2019
2
0
0
Visit site
Welcome.

Have you tried Safe Mode?

Also, are the other clients using the same Bluetooth printers?


That's an interesting idea. But doesn't safe mode block all third-party apps, including the one I wanna test?

And yes, everyone's using the same printer model.

The first step you must get to is being able to reproduce the failure at will. Until you can do that, they can spend 10 years and never find the problem.

Once you can reproduce it, tell them how - and they'll probably have it fixed in a day or two at the most. (They reproduce it while it's running in a debugger, so they can see exactly what instruction is causing it to fail - then they rewrite it so it doesn't.) I'm not "trying to get rid of you" or anything - I'm retired ... from 46 years of fixing software bugs like that. If you can't reproduce it on demand, your odds of finding it are about the same as winning the lottery without buying a ticket. (We had a database that kept on blowing up even though all the code [so we thought] was error-trapped for 6 months. A customer finally figured out how to force it to fail. After that it took 5 minutes to find the typo that was causing it.)

I know, dealing with errors that pop up at random is incredibly hard. Problem is, we've already tried setting aside every single variable, from type of document being printed, to the printer being on stand-by, to prints happening in a row, to internet connection quality... And there's just nothing in common between the errors. We've even sent them one of our tablets so that they could try to reproduce it, but they've only found it's random.

Do you have an idea of what variable we might not have considered so far?


This kind of problem will be very hard to trace just text back and forth .
Look at settings in Bluetooth from tablet to the printer see anything there or try a different Bluetooth printer , also maybe the app is a issue , what steps have you taken so we could avoid going over same ones?

Trying a different printer sounds like a plan. I'll see if I can borrow one. The app might have a problem, yes, if we could figure out why the error only happens on our tablets, we could find out what that problem exactly is.

Alright, so we've been fighting this battle for a few months now, I'll try to remember everything we've done.

We have scanned our database for errors, but found nothing. We've rooted a device, deleted bloatware, did a factory reset, tried swapping the printers, recompiling the app, printing with the internet turned off, printing with good conection, with bad connection, rewriting the printing settings inside the app.

In fact, this last attempt seems to have made a tiny difference, they've added a command to clean the printer's buffer after every print and in my tests that seems to have made the error occur a little less frequently.
 

UnyteLux

Member
Jul 5, 2019
13
0
0
Visit site
I doubt that you are going to find a solution to this issue through a forum such as this one. You do need to have some clue as to what might possibly be going wrong. You mention that you made changes to the app code so I assume that you are technically minded? If so, consider doing two things

  1. Monitor system CPU, storage and memory usage - something like Simple System Monitor on Play Store by Darshan Parjuli will do the trick. If there is a spike in usage of any of these resources you have a clue
  2. Monitor LogCat messages - try LogCat[NO ROOT] by Anton Tananev on Play Store. Typically there are 1000s of messages flying through LogCat at any given time. However, you can filter out what is not relevant with a bit of trial and error.

I am still a newbie here so I am probably not allowed to put in links which is why I have given you the names of the tools to use along with their developers. Disclosure - neither have anything to do with me.

You should try do do exactly the same thing on another device which is known not to have the problem. If you notice a striking difference you will at least be on the road to identifying the source of the problem.