rockingmaster / openintents

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

OI Shopping List: Pressing note icon crashes OI Notepad #434

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Edit an item and press the "Note" button.

What is the expected output? What do you see instead?
OI Notepad launches and should show the note, but it crashes immediately.

This bug has been introduced in r3878, as new fields have been introduced in 
NotePadProvider:
http://code.google.com/p/openintents/source/browse/trunk/notepad/NotePad/src/org
/openintents/notepad/NotePadProvider.java#92

However, OI Shopping List does not know yet about these new fields:
http://code.google.com/p/openintents/source/browse/trunk/shoppinglist/ShoppingLi
stLibrary/src/org/openintents/shopping/library/provider/ShoppingContract.java#83
4

which makes OI Notepad crash:

12-17 21:47:51.529: E/AndroidRuntime(22656): FATAL EXCEPTION: main
12-17 21:47:51.529: E/AndroidRuntime(22656): java.lang.RuntimeException: Unable 
to start activity 
ComponentInfo{org.openintents.notepad/org.openintents.notepad.NoteEditor}: 
java.lang.IllegalArgumentException: Invalid column selection_start
[...]
12-17 21:47:51.529: E/AndroidRuntime(22656): Caused by: 
java.lang.IllegalArgumentException: Invalid column selection_start
[...]
12-17 21:47:51.529: E/AndroidRuntime(22656):    at 
org.openintents.notepad.NoteEditor.onCreate(NoteEditor.java:464)
-----

A simple fix would be to include the new fields in OI Shopping List. However, 
this is not future-proof, as this approach will break whenever new fields are 
added to OI Notepad.

A better approach is to check which fields are present. OI Notepad should only 
try to read those columns that exist in the database.

Original issue reported on code.google.com by peli0...@googlemail.com on 17 Dec 2011 at 9:07

GoogleCodeExporter commented 8 years ago
Reminds me of the issue with encryption for OI Shopping List notes. In r3306 
you added a separate state STATE_EDIT_EXTERNAL_NOTE for use when editing a note 
from OI Shopping List. Maybe the fix for this issue could be to not try to save 
the position when in that state.

Original comment by AaronPer...@gmail.com on 18 Dec 2011 at 2:33

GoogleCodeExporter commented 8 years ago
http://www.google-melange.com/gci/task/view/google/gci2011/7125271

Original comment by peli0...@googlemail.com on 26 Dec 2011 at 9:25

GoogleCodeExporter commented 8 years ago
Switched task:
http://www.google-melange.com/gci/task/view/google/gci2011/7134320

Original comment by peli0...@googlemail.com on 26 Dec 2011 at 2:00

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

Original comment by rmce...@gmail.com on 29 Dec 2011 at 10:02