cubinb / catroid

Automatically exported from code.google.com/p/catroid
0 stars 0 forks source link

[CATROID] Upload Project causes crash when changing screen orientation #140

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start uploading project.
2. Change screen orientation by rotating phone
3. Upload will stop without any message
4. A few seconds later program crashes

What is the expected output?
Upload will continue

What do you see instead?
Upload stops and program crashes

Original issue reported on code.google.com by p.tiel...@gmail.com on 15 Feb 2012 at 3:13

GoogleCodeExporter commented 8 years ago

Original comment by aried3r on 20 Feb 2012 at 9:49

GoogleCodeExporter commented 8 years ago
Issue is fixed at my clone of catroid 
http://code.google.com/r/atermenji-catroid//
Please review it.

Here is a brief description of changes.
1) DashboardLayout is added [1]. It gives several benefits:
 - buttons on the main screen is arranged correctly on large screens (was tested on 10.1 Asus TF101). Changes can be seen on attached before/after screenshots.
 - two layout files for main activity were replaced with one using DashboardLayout[2]. there is no need in different layouts for different screen orientations since button positioning is handled in DashboardLayout.
2) Upload Project crash during screen rotation is fixed by adding 
"android:configChanges="keyboardHidden|orientation" line to the 
MainMenuActivity tag in the manifest. 
3) "testUploadProjectSucces" method from [3] was modified to reproduce this 
bug. Test was crushing before the change and showed green light after. 
4) "solo.goBack()" was removed from "testCreateNewProject" test at 
MainMenuActivityTest. Becaus of Back button press in this test, it worked 
incorrect on Honeycomb.

Fixing the bug by adding "android:configChanges="keyboardHidden|orientation" 
line to the manifest is the acceptable way in this situation by my opinion. App 
doesn't need to update resources during MainMenuActivity rotation since there 
is only one layout file for that activity and layout is updated in 
DashboardLayout code.

[1] 
http://code.google.com/r/atermenji-catroid/source/browse/catroid/src/at/tugraz/i
st/catroid/ui/widget/DashboardLayout.java
[2] 
http://code.google.com/r/atermenji-catroid/source/browse/catroid/res/layout/acti
vity_main_menu.xml
[3] 
http://code.google.com/r/atermenji-catroid/source/browse/catroidUiTest/src/at/tu
graz/ist/catroid/uitest/web/ProjectUpAndDownloadTest.java

Original comment by aterme...@gmail.com on 22 Feb 2012 at 10:26

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision e11486ed6864.

Original comment by aried3r on 9 Mar 2012 at 1:11

GoogleCodeExporter commented 8 years ago

Original comment by aried3r on 9 Mar 2012 at 1:23

GoogleCodeExporter commented 8 years ago
I discovered that there is a problem with landscape mode on the phone. See 
attachement. The Google I/O Sched app handles landscape just fine.
The current code can be found in my ARieder branch.

Original comment by aried3r on 9 Mar 2012 at 1:05

Attachments:

GoogleCodeExporter commented 8 years ago
It seems that this is my fault. There probably went something wrong when I was 
manually creating and applying patches.

Will investigate.

Original comment by aried3r on 9 Mar 2012 at 7:21

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 45acf4b75269.

Original comment by aried3r on 9 Mar 2012 at 8:11

GoogleCodeExporter commented 8 years ago

Original comment by knut0025 on 14 Mar 2012 at 5:40