SMILEConsortium / smile_teacher_android

The SMILE Teacher Android App
http://www.smileconsortium.org
Apache License 2.0
1 stars 2 forks source link

Teacher version 0.9.9b1-jamsj tag crashes on certain tablets #111

Closed truedat101 closed 10 years ago

truedat101 commented 10 years ago

On some unbranded tablets, SMILE Teacher crashes for apparently no reason.

Tablet model is unknown Chinese mfg, 8 inch. Android OS is 4.0.3 and also 4.2.

To reproduce:

1) start SMILE Teacher 0.9.9b1jamsj 2) Connect to 10.1.0.1 (default) 3) crash:

Unable to resume activity org.smilec.smile/org.smilec.smile.ui.SessionValuesActivity: java.lang.NullPointerException at org.smilec.smile.ui.SessionValuesActivity.onResult(SessionValuesActivity.java:94)

Please analyze the code in SsssionValuesActivity.java to see if there is any place we must guard against null pointer, or any reason why this should occur.

This is high priority, as this occurred during a customer demo, and is a Critical blocker. If this can be fixed in the next 4 hours, that would be great, as that would be enough time to get the code built and out to the custome

truedat101 commented 10 years ago

This affects all versions, even the HEAD.

truedat101 commented 10 years ago

backBtn is null. Why?

truedat101 commented 10 years ago

I don't understand why it's null, but can you ensure either we don't do anything in the onResume where it fails. If I comment that out, it doesn't crash, but the create button doesn't do anything.

chrqls commented 10 years ago

Ok I think I understand what is happening. The x-large format is not as updated as the large format. That's why there is no bug on Nexus 7. I have to upgrade the x-large views

truedat101 commented 10 years ago

Right, seems like we've got something missing in the layouts. Can you fix this since you seem to have a better idea? I can test immediately. I'm trying to get the APK out to the customer tonight (in china) so would be helpful if it's an easy fix and you can do it.

On Tue, Jan 14, 2014 at 9:27 PM, Charles Quelos notifications@github.comwrote:

Ok I think I understand what is happening. The x-large format is not as updated as the large format. That's why there is no bug on Nexus 7.

— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/smile_teacher_android/issues/111#issuecomment-32335891 .

truedat101 commented 10 years ago

We are missing mdpi density.

This tablet is mdpi.

truedat101 commented 10 years ago

So please first provide the fix for mdpi, and then worry about xhdpi.

chrqls commented 10 years ago

@truedat101 I just would like to be sure of something: when you look at the login screen, your [Connect] button is under the field or on the right ?

truedat101 commented 10 years ago

Well, I what I see is based on the tag mentioned in the issue, 0.9.9, so it won't be exactly what you are working on. I will pull from the HEAD of dev and tell you.

On Tue, Jan 14, 2014 at 10:30 PM, Charles Quelos notifications@github.comwrote:

@truedat101 https://github.com/truedat101 I just would like to be sure of something: when you look at the login screen, your [Connect] button is under the field or on the right ?

— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/smile_teacher_android/issues/111#issuecomment-32338024 .

truedat101 commented 10 years ago

Connect is under.

On Tue, Jan 14, 2014 at 10:41 PM, David J. Kordsmeier dkords@gmail.comwrote:

Well, I what I see is based on the tag mentioned in the issue, 0.9.9, so it won't be exactly what you are working on. I will pull from the HEAD of dev and tell you.

On Tue, Jan 14, 2014 at 10:30 PM, Charles Quelos <notifications@github.com

wrote:

@truedat101 https://github.com/truedat101 I just would like to be sure of something: when you look at the login screen, your [Connect] button is under the field or on the right ?

— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/smile_teacher_android/issues/111#issuecomment-32338024 .

chrqls commented 10 years ago

Let me know if you still have a NullPointerException somewhere else on this 8 inch tablet.

truedat101 commented 10 years ago

Well, that fixes things, but the layout is squeezed completely to the point where the app takes up just 10% of the screen in the middle in the dialog phases before the main teacher view launches.

Can you maybe let the dialog stretch out further so it's not completely smashed together? It's really unreadable.

Here are the dimensions for this device:

1024x720 displaymetrics density_default resources are from mdpi

Can you target this device. Please undo the layout change to the login panels, but keep whatever fix you made for the nullpointer.

truedat101 commented 10 years ago

I really need to get this fixed today to get this over to the customer.

chrqls commented 10 years ago

@truedat101, does this change fix the problem you had with the 10%?

truedat101 commented 10 years ago

I'll build and send to the customer to test.

truedat101 commented 10 years ago

I tried on a different device (phablet from Huawei) and it seems to look good. Cross our fingers. I'll send it over.

chrqls commented 10 years ago

Cool!

truedat101 commented 10 years ago

Can you test in the emulator the following:

Let me know the results, and file issues for each.

chrqls commented 10 years ago

Any preference?

types of vm

truedat101 commented 10 years ago

Feel free to choose. Android Emulator AVD targets can be created to customize for your preference. I'd suggest we create one realistic device profile for each screen density.

On Wed, Jan 15, 2014 at 1:52 PM, Charles Quelos notifications@github.comwrote:

Any preference?

[image: types of vm]https://f.cloud.github.com/assets/3521208/1925287/3658ecec-7e2f-11e3-97f9-9d11237864d2.PNG

— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/smile_teacher_android/issues/111#issuecomment-32419244 .

chrqls commented 10 years ago

I think honestly that the mobile format is the least evolved. I think that it will crash as it did with x-large format. I should work on that first, right?

truedat101 commented 10 years ago

That's fine. We want to know where we stand with each screen density, so test first, file the issues, and then let's discuss which issues we want to fix.

On Wed, Jan 15, 2014 at 1:57 PM, Charles Quelos notifications@github.comwrote:

I think honestly that the mobile format is the least evolved. I think that it will crash as it did with x-large format. I should work on that first, right?

— Reply to this email directly or view it on GitHubhttps://github.com/SMILEConsortium/smile_teacher_android/issues/111#issuecomment-32419711 .

truedat101 commented 10 years ago

Latest fix needs work. All of the text is smashed and lines wrap, and the panel itself only fills part of the available space. @chrqls is there some reason we changed the panel layout to not fill the available space? Can you change that? It still looks bad on this customer device.

chrqls commented 10 years ago

What do you call "panel layout"? GeneralActivity ?

truedat101 commented 10 years ago

By panel, I guess I mean any ui widget that is floating on the screen. I don't really know what they are called in Android. Maybe these are dialogs? The first three dialogs related to the session creation have a layout bug.

truedat101 commented 10 years ago

2014-01-16-073406

My camera is bad, but the general idea is that the text on each button is now forced to wrap itself across 3 lines, and the linebrreaks are not in the right place so it looks like a word scramble.

truedat101 commented 10 years ago

2014-01-16-073356

This one almost looks ok, but the Create button is split 3 ways

Cr ea te

inside of the button.

truedat101 commented 10 years ago

You should be able to observe this in an MDPI layout device in the emulator.

truedat101 commented 10 years ago

Charles, can you comment on these fixes, what they are supposed to do? I ran on this tablet and have exactly same results. We really just need a fix for the MDPI layout. I'll have a look.

chrqls commented 10 years ago

@truedat101 There is some bugs I am not able to reproduce such as the create button in 3 parts. I saw this layout bug on any format or any virtual machine.

chrqls commented 10 years ago

I am going to push something regarding that problem in less than an hour. And just let me know if you still have this problem after.

chrqls commented 10 years ago

FYI, the last pull request is an update of UI on mobile. The design is similar to Nexus 7 format now

chrqls commented 10 years ago

I should not have MDPI layout bugs now. Careful: on mobile and MDPI format, I still have to fix the crash when we try to get the detail of a question in GeneralActivity

truedat101 commented 10 years ago

I'll test once you've fixed the potential crash.

chrqls commented 10 years ago

Ok

chrqls commented 10 years ago

I removed the crash on MDPI format, not yet on mobile format. I will fix that too. But first I need to check why I can not delete questions anymore on MDPI tablet or Nexus 7. I did not see the thing was broken

chrqls commented 10 years ago

Actually, we can delete questions. I made several tests on Nexus 7 and the VTAB and everything seems OK.

truedat101 commented 10 years ago

ok, I'll run a test in a bit.

truedat101 commented 10 years ago

Looks good. Let's close this issue.