Giter VIP home page Giter VIP logo

sgtpuzzles's Introduction

Android port of Simon Tatham's Puzzles

This is Simon Tatham's Portable Puzzle Collection, ported to Android.

The easiest way to install it is from Google Play.

If you'd like to get involved, read on:

Project goals

  • Run in Android environments where puzzles make sense: phones, tablets, Chromebooks, maybe TVs, not watches or cars.
  • Provide the same puzzle collection that the upstream project provides for other platforms.
  • Provide appropriate controls for Android environments, e.g. on-screen buttons and the use of long-press instead of right-click.
  • Provide appropriate display adjustments for mobile use-cases, e.g. night mode, and minor changes to the recommended sizes of puzzles.
  • Run completely offline, including the documentation, and with minimum required permissions.
  • Follow Android conventions: implicit saving of games in progress, standard settings screen with immediate apply, etc.
  • Make it easy to exchange saved puzzle states with other users and other platforms.

Potential/experimental goals, that could exist on Android before potentially being included upstream later:

  • Accessibility improvements relative to upstream.
  • Translate the Puzzles into more languages: first fix issue #1 properly to allow translating strings that come from C, which is most of them. I don't yet know how to fix that, and I don't recommend starting work on any translations until it's fixed.
  • Make it easier to have multiple states of the same game in progress, without having to manage files.

Non-goals for this project

I do not want to make certain kinds of changes that I think would make the Android port too different from upstream:

  • New games that don't exist upstream.
  • Changes to game rules (implemented or documented) versus upstream.
  • Timers, scoring, or high-score tables that differ from upstream.
  • Hints or other progress feedback that differs from upstream.

Any suggestions in this category should be sent upstream to Simon, as per the Feedback section of his page, and if any such improvements are accepted upstream then I'll merge them into the Android port if at all possible.

You're welcome to discuss changes of this kind on this project's issue tracker, applying the tag upstream to issues to reflect that they won't be implemented here directly.

How to help without writing any code

Good bug reports and well-thought-out feature suggestions (bearing in mind the above) are always helpful; here's the issue tracker. It's always worth a quick search to see if your bug/idea has already been reported.

Simon has an excellent page on how to write a good bug report.

Need to add/change some graphics? The sources live in app/src/main/graphics-sources and were converted to icons with Android Asset Studio

Coders should read on...

Prerequisites

Some knowledge of Android Development and/or C, and ideally JNI, depending on what you want to work on: the puzzles themselves are in C, most Android-specific code is in Kotlin, and JNI (Java Native Interface) is the API bridge between the two.

If you have the option, a Linux-based development machine, as I haven't tried to build on Windows or OSX, and it will need some tweaks.

Android Studio

Android NDK (Native Development Kit)

If using gradle directly, create local.properties with sdk.dir=/your_path_here (I think Android Studio writes this automatically)

I probably missed a few things here. File a bug when you find them. :-)

Getting/configuring the source

The source lives at https://github.com/chrisboyle/sgtpuzzles - you can either clone/download it from there, or make your own fork on github (the Fork button near the top right). A fork means you can easily send me a "pull request" of your change, and I can review and integrate it, all within github.

You'll also find a branch called upstream, which is Simon's code whenever I last synced. Handy for diffs, to see what I broke on Android. :-)

This repository includes old git-svn commits that predate upstream's move to git. History will look slightly nicer if, after cloning, you do:

git fetch origin 'refs/replace/*:refs/replace/*'

Sadly github itself does not appear to support replacement so you will still see duplicates there.

You should now be able to edit, build and launch the app like any other Android project (except a lot of it is in C). Don't forget that you'll be signing with a dev key, so to test on a device that already has the Google Play version, uninstall that first.

Architecture / where to find stuff

Simon has some excellent developer documentation which is definitely worth reading first, at least the Introduction.

The Android front-end (android.c) is basically just glue, passing everything to Kotlin. The Kotlin classes providing the UI layer, game chooser, etc. are in app/src/main/kotlin. The main class GamePlay has the native methods that android.c implements. The game area on screen is a GameView, which basically just has a bitmap for the puzzle to draw on. Note that almost no native code is run until the user has chosen a game (unless there's a previous game to resume).

Files for other platforms etc. that are not currently usable in this fork are in the not-in-use directory.

If your change is relevant to other platforms, you should definitely ping Simon about it as well as me, but test on at least one other platform first in a separate checkout (see above).

Happy hacking! :-)

-- Chris Boyle

sgtpuzzles's People

Contributors

adrianheine avatar amdmi3 avatar benh-debian avatar bjh21 avatar blgl avatar built1n avatar bwhacks avatar chrisboyle avatar dmchurch avatar doopl avatar goyalyashpal avatar ijackson avatar jleedev avatar jonaskoelker avatar jtn20 avatar kaberett avatar kberg avatar kevinlyles avatar kilobyte avatar kraj avatar linkmauve avatar mquevill avatar neclepsio avatar omgitsraven avatar palfrey avatar pizzalovers007 avatar sgtatham avatar sunfall avatar tacothedank avatar x-sheep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sgtpuzzles's Issues

Shortcut key M conflicts with many games

I clearly wasn't awake when choosing the shortcut for the new "settings" item in the menu. This doesn't affect the on-screen keyboard, but becomes a problem when you open a physical keyboard, because then we cleverly hide the letters from the on-screen one, except the physical M now brings up settings. D'oh!

(reported by Ben Buchwald)

Mines: long press number to auto flag neighbours

Great suggestion from a user:

"If you long-press a number where all nabouring field are obviously mines, they should be marked as mines. This way, it's easy to avoid accidentally clicking on mines when trying to flag them."

Settings screen

We've done without one up to now, but possible things to put there include:

  • Chooser mode (grid/details, already a preference but only accessible by menu button)
  • Hide notification bar (not done by default, obviously) (issue #26)
  • Completion behaviour (if issue #21 is implented)
  • Override chooser-vs-game activity flow (if issue #38 is implemented)
  • Keyboard orientation options?

Remove custom crash reporting

It doesn't appear to be reliable on recent Android versions and people can always run Log Collector. It would also allow me to drop the permission to read logs.

Pattern: toast drag length

From Rowan: if you drag to set a line in Pattern, we could quickly indicate how long the drag was with a toast.

SIGSEGVs with STATEPOS > NSTATES

This is embarrassing. Another distinct crash. "I clicked on new game after having completed a game of same game. I was actually showing it to Simon Tatham at the time!" Here's the log, with my annotations:

01-23 20:13:16.219    67   200 I NotificationService: enqueueToast [...]
# There's the completion toast
01-23 20:13:19.619  2951  2951 D GameView: onKeyDown 82, KeyEvent{action=0 code=82 repeat=0 meta=0 scancode=139 mFlags=72}
#82 = Menu
01-23 20:13:28.320  2951  2951 W System.err: saved game was:
01-23 20:13:28.320  2951  2951 W System.err: SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
01-23 20:13:28.320  2951  2951 W System.err: VERSION :1:1
01-23 20:13:28.320  2951  2951 W System.err: GAME    :9:Same Game
01-23 20:13:28.320  2951  2951 W System.err: PARAMS  :7:5x5c3s2
01-23 20:13:28.320  2951  2951 W System.err: CPARAMS :7:5x5c3s2
01-23 20:13:28.320  2951  2951 W System.err: SEED    :15:532064490133735
01-23 20:13:28.320  2951  2951 W System.err: NSTATES :1:0
01-23 20:13:28.320  2951  2951 W System.err: STATEPOS:1:9
# Huh - that's not valid!
01-23 20:13:28.320  2951  2951 W System.err: java.lang.RuntimeException: crashed here (native trace should follow after the Java trace)
01-23 20:13:28.339  2951  2951 W System.err:    at name.boyle.chris.sgtpuzzles.SGTPuzzles.nativeCrashed(SGTPuzzles.java:969)
01-23 20:13:28.339  2951  2951 W System.err:    at name.boyle.chris.sgtpuzzles.SGTPuzzles.keyEvent(Native Method)
01-23 20:13:28.339  2951  2951 W System.err:    at name.boyle.chris.sgtpuzzles.SGTPuzzles.sendKey(SGTPuzzles.java:716)
01-23 20:13:28.339  2951  2951 W System.err:    at name.boyle.chris.sgtpuzzles.GameView.onTouchEvent(GameView.java:78)
# ...outer frames not interesting...
01-23 20:13:28.429    49    49 I DEBUG   : Build fingerprint: 'google/passion/passion/mahimahi:2.1/ERD79/22607:user/release-keys'
01-23 20:13:28.429    49    49 I DEBUG   : pid: 2951, tid: 2951  >>> name.boyle.chris.sgtpuzzles <<<
01-23 20:13:28.429    49    49 I DEBUG   : signal 11 (SIGSEGV), fault addr 00000000
01-23 20:13:28.429    49    49 I DEBUG   :  r0 004f4f50  r1 00000000  r2 00000004  r3 00000000
01-23 20:13:28.429    49    49 I DEBUG   :  r4 004f26d0  r5 0052be58  r6 000000aa  r7 001126b0
01-23 20:13:28.429    49    49 I DEBUG   :  r8 00000200  r9 4186ba70  10 0000000c  fp 00000000
01-23 20:13:28.429    49    49 I DEBUG   :  ip 80a88d18  sp be810928  lr 80a5f65c  pc afe0df80  cpsr 20000010
01-23 20:13:28.490    49    49 I DEBUG   :          # 00  pc 0000df80  /system/lib/libc.so
01-23 20:13:28.500    49    49 I DEBUG   :          # 01  pc 0005f658  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8750.5/samegame.c#L1042
01-23 20:13:28.500    49    49 I DEBUG   :          # 02  pc 00042d30  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8750.5/midend.c#L550
01-23 20:13:28.500    49    49 I DEBUG   :          # 03  pc 00043274  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8750.5/midend.c#L776
01-23 20:13:28.500    49    49 I DEBUG   :          # 04  pc 00007b54  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8750.5/android.c#L252
01-23 20:13:28.500    49    49 I DEBUG   :          # 05  pc 0000ecb4  /system/lib/libdvm.so
01-23 20:13:28.500    49    49 I DEBUG   : 
01-23 20:13:28.500    49    49 I DEBUG   : code around pc:
01-23 20:13:28.500    49    49 I DEBUG   : afe0df70 2afffff8 e2822040 e2522020 3a000003 
01-23 20:13:28.500    49    49 I DEBUG   : afe0df80 f421020d e2522020 f400022d 2afffffb 
01-23 20:13:28.500    49    49 I DEBUG   : afe0df90 e2822020 e3120010 0a000001 f4210a0d 
01-23 20:13:28.500    49    49 I DEBUG   : 
01-23 20:13:28.500    49    49 I DEBUG   : code around lr:
01-23 20:13:28.500    49    49 I DEBUG   : 80a5f64c e5850018 e5941018 e1a02102 ebfe9843 
01-23 20:13:28.500    49    49 I DEBUG   : 80a5f65c e1a00005 e28dd004 e8bd8030 e92d4ff0 
01-23 20:13:28.500    49    49 I DEBUG   : 80a5f66c e5d13000 e24dd004 e1a05001 e353004d 
01-23 20:13:28.500    49    49 I DEBUG   : 
01-23 20:13:28.500    49    49 I DEBUG   : stack:
01-23 20:13:28.500    49    49 I DEBUG   :     be8108e8  004f4f50  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be8108ec  001126b0  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be8108f0  00000200  
01-23 20:13:28.500    49    49 I DEBUG   :     be8108f4  afe0bc07  /system/lib/libc.so
01-23 20:13:28.500    49    49 I DEBUG   :     be8108f8  be810928  [stack]
01-23 20:13:28.500    49    49 I DEBUG   :     be8108fc  a9d9db1b  /system/lib/libbinder.so
01-23 20:13:28.500    49    49 I DEBUG   :     be810900  00396018  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be810904  a9d1410d  /system/lib/libutils.so
01-23 20:13:28.500    49    49 I DEBUG   :     be810908  004095ec  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be81090c  00396018  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be810910  00120000  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be810914  004f26d0  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be810918  0052be58  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be81091c  000000aa  
01-23 20:13:28.500    49    49 I DEBUG   :     be810920  e3a07077  
01-23 20:13:28.500    49    49 I DEBUG   :     be810924  ef900077  
01-23 20:13:28.500    49    49 I DEBUG   : # 00 be810928  004f4f50  [heap]
01-23 20:13:28.500    49    49 I DEBUG   :     be81092c  80a5f65c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
01-23 20:13:28.500    49    49 I DEBUG   : # 01 be810930  00000001  
01-23 20:13:28.500    49    49 I DEBUG   :     be810934  80a8b4b0  
01-23 20:13:28.500    49    49 I DEBUG   :     be810938  000000c2  
01-23 20:13:28.500    49    49 I DEBUG   :     be81093c  80a42d34  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so

Here's our innermost line, samegame.c:1042

memcpy(ret->tiles, state->tiles, state->n * sizeof(int));

Best guess: since the previous line allocated ret->tiles and thereby dereferenced ret and state, perhaps state->tiles was invalid? On closer inspection, this follows from nstates=0. So how did we get that?

ViewRoot$CalledFromWrongThreadException from SmallKeyboard.java:129

Everything comes crashing down on startup if the undo/redo-enabled state changes during init() on the temporary startGame thread:

[some crazy NoClassDefFoundErrors for Integer and Color...]
12-11 11:03:07.294 13990 13996 W System.err: Caused by: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
[...]
12-11 11:03:07.334 13990 13996 W System.err: at android.inputmethodservice.KeyboardView.setShifted(KeyboardView.java:435)
12-11 11:03:07.334 13990 13996 W System.err: at name.boyle.chris.sgtpuzzles.SmallKeyboard$KeyboardModel.setUndoRedoEnabled(SmallKeyboard.java:129)
12-11 11:03:07.334 13990 13996 W System.err: at name.boyle.chris.sgtpuzzles.SmallKeyboard.setUndoRedoEnabled(SmallKeyboard.java:189)
12-11 11:03:07.334 13990 13996 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.changedState(SGTPuzzles.java:955)
12-11 11:03:07.334 13990 13996 W System.err: ... 2 more

Trivial to fix with runOnUiThread().

Net: long-press = lock?

"The big issue with Net is, on a phone with no keyboard, it's near impossible to move the cursor. It's necessary to move the cursor (when one of the tiles becomes gray, denoting it is selected) in order to lock a tile, a feature which makes the game far less frustrating. Without being able to tell which tiles you have finished and which you haven't, it becomes hard to tell where you are in the puzzle.

My recommendation was, have the "tap-hold" function for this game lock the tile you tapped. As it stands, "tap-hold" makes the tapped tile rotate clockwise. A regular tap rotates it counter-clockwise. I don't know if I speak for everyone who plays this game, but for me, it's much more useful to be able to lock a tile than to rotate it in the other direction."

This may want to be optional, when I get around to adding an options screen.

SIGSEGV/SIGBUS in fetch_preset/get_text

Since the release of 8750.5 I have had 9 crash reports in the same place (and one other unrelated). Seen on 1.5, 1.6 and 2.0, on a range of devices. The traces all decode like this:

[two frames in libdvm.so, addresses vary by Android version]
00006d68 android.c:516:     const char * c = (*env)->GetStringUTFChars(env, j, NULL);
[the first call to _(some_string) in some game's fetch_preset]
00042220 midend.c:893           while (me->ourgame->fetch_preset(me->npresets, &name, &preset)) {
00007188 android.c:642      if ((n = midend_num_presets(_fe->me)) > 0) {
[one more frame in libdvm.so]

Here is an extract from a typical report (from a Sprint Hero on 1.5), with frame 03 annotated:

12-03 21:46:40.499 10692 10692 D SGTPuzzles: startGame: -1, 326 bytes
...
12-03 21:46:41.010    40    40 I DEBUG   : signal 11 (SIGSEGV), fault addr 705862c8
...
12-03 21:46:42.789    40    40 I DEBUG   :          # 00  pc 00047bea  /system/lib/libdvm.so
12-03 21:46:42.799    40    40 I DEBUG   :          # 01  pc 00041410  /system/lib/libdvm.so
12-03 21:46:42.830    40    40 I DEBUG   :          # 02  pc 00006d68  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
12-03 21:46:42.830    40    40 I DEBUG   :          # 03  pc 00009e2c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
blackbox.c:74           sprintf(str, _("%dx%d, %d balls"),  ret->w, ret->h, ret->minballs);
12-03 21:46:42.830    40    40 I DEBUG   :          # 04  pc 00042220  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
12-03 21:46:42.830    40    40 I DEBUG   :          # 05  pc 00007188  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
12-03 21:46:42.839    40    40 I DEBUG   :          # 06  pc 0000e434  /system/lib/libdvm.so

This means we were starting a game (either resuming it because the app was started, or New Game was pressed, or a custom game was started; it doesn't matter, there have been reports from all these cases) and we finished android_deserialise, continued on to fill in the "Type" menu, and on trying to call from C up to Java to translate the first item for that menu, we crashed somewhere in the mechanics of GetStringUTFChars. Perhaps either env or j was invalid.

There have been over 3000 downloads on Android Market since this release went out, and only these 9 reports, so even allowing for under-reporting, this suggests that this issue is rare. Perhaps a threading issue or some such.

NPE in drawLine (from resizeEvent, during init?)

02-19 00:41:24.620 16060 16060 D SGTPuzzles: startGame: -1, 1203 bytes
02-19 00:41:24.770 16060 16060 I AlertDialog: [onCreate] auto launch SIP.
02-19 00:41:24.851 16060 16060 D PhoneWindow: DebugMonitor class=android.app.ProgressDialog focus=true
02-19 00:41:24.980 16060 16060 E dalvikvm: Class lookup Ljava/lang/NullPointerException; attemped while exception Ljava/lang/NullPointerException; pending
02-19 00:41:24.980 16060 16060 I dalvikvm: DALVIK THREADS:
02-19 00:41:24.980 16060 16060 I dalvikvm: "main" prio=5 tid=3 RUNNABLE
02-19 00:41:24.980 16060 16060 I dalvikvm:   | group="main" sCount=0 dsCount=0 s=0 obj=0x40019680
02-19 00:41:24.980 16060 16060 I dalvikvm:   | sysTid=16060 nice=0 sched=0/0 handle=-1094951972
02-19 00:41:24.980 16060 16060 I dalvikvm:   at name.boyle.chris.sgtpuzzles.GameView.drawLine(GameView.java:~212)
02-19 00:41:24.980 16060 16060 I dalvikvm:   at name.boyle.chris.sgtpuzzles.SGTPuzzles.resizeEvent(Native Method)
02-19 00:41:24.980 16060 16060 I dalvikvm:   at name.boyle.chris.sgtpuzzles.SGTPuzzles$1.handleMessage(SGTPuzzles.java:138)
02-19 00:41:25.010 16060 16060 I dalvikvm:   at android.os.Handler.dispatchMessage(Handler.java:99)
02-19 00:41:25.061 16060 16060 I dalvikvm:   at android.os.Looper.loop(Looper.java:123)
02-19 00:41:25.061 16060 16060 I dalvikvm:   at android.app.ActivityThread.main(ActivityThread.java:4077)
02-19 00:41:25.061 16060 16060 I dalvikvm:   at java.lang.reflect.Method.invokeNative(Native Method)
02-19 00:41:25.100 16060 16060 I dalvikvm:   at java.lang.reflect.Method.invoke(Method.java:521)
02-19 00:41:25.140 16060 16060 I dalvikvm:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
02-19 00:41:25.140 16060 16060 I dalvikvm:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
02-19 00:41:25.140 16060 16060 I dalvikvm:   at dalvik.system.NativeStart.main(Native Method)
# ...
02-19 00:41:25.161 16060 16060 E dalvikvm: VM aborting
02-19 00:41:25.161 16060 16060 D SGTPuzzles: couldn't report saved game because: java.lang.NullPointerException
02-19 00:41:25.161 16060 16060 D SGTPuzzles: GameView has seen 0 keys since init
02-19 00:41:25.161 16060 16060 W System.err: java.lang.RuntimeException: crashed here (native trace should follow after the Java trace)
02-19 00:41:25.161 16060 16060 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.nativeCrashed(SGTPuzzles.java:985)
02-19 00:41:25.161 16060 16060 W System.err: at name.boyle.chris.sgtpuzzles.GameView.drawLine(GameView.java:212)
# rest of trace as above
02-19 00:41:25.200    76    76 I ActivityManager: Starting activity: Intent { comp={name.boyle.chris.sgtpuzzles/name.boyle.chris.sgtpuzzles.CrashHandler} }
02-19 00:41:25.241    40    40 I DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-19 00:41:25.241    40    40 I DEBUG   : Build fingerprint: 'sprint/htc_heroc/heroc/heroc:1.5/CUPCAKE/85027:user/release-keys'
02-19 00:41:25.241    40    40 I DEBUG   : pid: 16060, tid: 16060  >>> name.boyle.chris.sgtpuzzles <<<
02-19 00:41:25.241    40    40 I DEBUG   : signal 11 (SIGSEGV), fault addr deadd00d
02-19 00:41:25.241    40    40 I DEBUG   :  r0 00000330  r1 0000000c  r2 0000000c  r3 00000026
02-19 00:41:25.241    40    40 I DEBUG   :  r4 deadd00d  r5 0000bd00  r6 00000000  r7 ad06930b
02-19 00:41:25.250    40    40 I DEBUG   :  r8 00000144  r9 00000001  10 00264bd8  fp 00000000
02-19 00:41:25.250    40    40 I DEBUG   :  ip ad083ef8  sp bebc51c0  lr afe13e4d  pc ad03b642  cpsr 20000030
02-19 00:41:25.710    76    85 W ActivityManager: Activity pause timeout for HistoryRecord{43b0cef8 {name.boyle.chris.sgtpuzzles/name.boyle.chris.sgtpuzzles.SGTPuzzles}}
02-19 00:41:25.740    76    85 I ActivityManager: Start proc name.boyle.chris.sgtpuzzles:CrashHandler for activity name.boyle.chris.sgtpuzzles/.CrashHandler: pid=16145 uid=10097 gids={1007}
02-19 00:41:25.740    76    85 D CIQ     : throwUI04 name.boyle.chris.sgtpuzzles:CrashHandler
02-19 00:41:25.740    76    85 D CIQ     : processName name.boyle.chris.sgtpuzzles:CrashHandler
02-19 00:41:25.830    43    43 D dalvikvm: GC freed 272 objects / 10320 bytes in 99ms
02-19 00:41:26.110    43    43 D dalvikvm: GC freed 42 objects / 1816 bytes in 278ms
02-19 00:41:26.490    43    43 D dalvikvm: GC freed 2 objects / 48 bytes in 376ms
02-19 00:41:26.630    40    40 I DEBUG   :          # 00  pc 0003b642  /system/lib/libdvm.so
02-19 00:41:26.630    40    40 I DEBUG   :          # 01  pc 0005c8ee  /system/lib/libdvm.so
02-19 00:41:26.630    40    40 I DEBUG   :          # 02  pc 0005cb70  /system/lib/libdvm.so
02-19 00:41:26.640    40    40 I DEBUG   :          # 03  pc 0005d44e  /system/lib/libdvm.so
02-19 00:41:26.640    40    40 I DEBUG   :          # 04  pc 0003ad06  /system/lib/libdvm.so
02-19 00:41:26.640    40    40 I DEBUG   :          # 05  pc 0003d3aa  /system/lib/libdvm.so
02-19 00:41:26.640    40    40 I DEBUG   :          # 06  pc 00013380  /system/lib/libdvm.so
02-19 00:41:26.650    40    40 I DEBUG   :          # 07  pc 00017b9c  /system/lib/libdvm.so
02-19 00:41:26.650    40    40 I DEBUG   :          # 08  pc 000175e0  /system/lib/libdvm.so
02-19 00:41:26.660    40    40 I DEBUG   :          # 09  pc 000523b4  /system/lib/libdvm.so
02-19 00:41:26.660    40    40 I DEBUG   :          # 10  pc 0003ffc4  /system/lib/libdvm.so
02-19 00:41:26.670    40    40 I DEBUG   :          # 11  pc 00007090  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
02-19 00:41:26.670    40    40 I DEBUG   :          # 12  pc 00018354  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
02-19 00:41:26.680    40    40 I DEBUG   :          # 13  pc 0007ecf4  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
02-19 00:41:26.680    40    40 I DEBUG   :          # 14  pc 0004bb88  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
02-19 00:41:26.690    40    40 I DEBUG   :          # 15  pc 000084a4  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
02-19 00:41:26.700    40    40 I DEBUG   :          # 16  pc 0000e434  /system/lib/libdvm.so
02-19 00:41:26.700    40    40 I DEBUG   :          # 17  pc 00040b0a  /system/lib/libdvm.so
02-19 00:41:26.710    40    40 I DEBUG   :          # 18  pc 00013198  /system/lib/libdvm.so
02-19 00:41:26.720    40    40 I DEBUG   :          # 19  pc 00017b9c  /system/lib/libdvm.so
02-19 00:41:26.720    40    40 I DEBUG   :          # 20  pc 000175e0  /system/lib/libdvm.so
02-19 00:41:26.720    40    40 I DEBUG   :          # 21  pc 00052530  /system/lib/libdvm.so
02-19 00:41:26.730    40    40 I DEBUG   :          # 22  pc 00059a2e  /system/lib/libdvm.so
02-19 00:41:26.740    40    40 I DEBUG   :          # 23  pc 00013198  /system/lib/libdvm.so
02-19 00:41:26.740    40    40 I DEBUG   :          # 24  pc 00017b9c  /system/lib/libdvm.so
02-19 00:41:26.750    40    40 I DEBUG   :          # 25  pc 000175e0  /system/lib/libdvm.so
02-19 00:41:26.750    40    40 I DEBUG   :          # 26  pc 000523b4  /system/lib/libdvm.so
02-19 00:41:26.760    40    40 I DEBUG   :          # 27  pc 0003f178  /system/lib/libdvm.so
02-19 00:41:26.810    40    40 I DEBUG   :          # 28  pc 0002af78  /system/lib/libandroid_runtime.so
02-19 00:41:26.810    40    40 I DEBUG   :          # 29  pc 0002ba76  /system/lib/libandroid_runtime.so
02-19 00:41:26.810    40    40 I DEBUG   :          # 30  pc 00008bf2  /system/bin/app_process
02-19 00:41:26.860    40    40 I DEBUG   :          # 31  pc 0001fd22  /system/lib/libc.so
02-19 00:41:26.870    40    40 I DEBUG   : stack:
02-19 00:41:26.870    40    40 I DEBUG   :     bebc5180  bebc51a0  [stack]
02-19 00:41:26.870    40    40 I DEBUG   :     bebc5184  0014ff90  [heap]
02-19 00:41:26.870    40    40 I DEBUG   :     bebc5188  afe39f90 
02-19 00:41:26.870    40    40 I DEBUG   :     bebc518c  afe39fe4 
02-19 00:41:26.870    40    40 I DEBUG   :     bebc5190  00000000 
02-19 00:41:26.870    40    40 I DEBUG   :     bebc5194  afe13e4d  /system/lib/libc.so
02-19 00:41:26.870    40    40 I DEBUG   :     bebc5198  bebc51ac  [stack]
02-19 00:41:26.870    40    40 I DEBUG   :     bebc519c  afe12e69  /system/lib/libc.so
02-19 00:41:26.870    40    40 I DEBUG   :     bebc51a0  00000000 
02-19 00:41:26.870    40    40 I DEBUG   :     bebc51a4  ad083e1c 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51a8  0000bd00  [heap]
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51ac  00000000 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51b0  ad06930b  /system/lib/libdvm.so
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51b4  afe12ecd  /system/lib/libc.so
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51b8  e3a07077 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51bc  ef900077 
02-19 00:41:26.890    40    40 I DEBUG   : # 00 bebc51c0  00000000 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51c4  ad05c8f3  /system/lib/libdvm.so
02-19 00:41:26.890    40    40 I DEBUG   : # 01 bebc51c8  416b6297 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51cc  ad047f23  /system/lib/libdvm.so
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51d0  00000000 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51d4  ad084ab0 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51d8  ad083e1c 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51dc  402417b8 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51e0  41269130 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51e4  0000bd00  [heap]
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51e8  001b36b0  [heap]
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51ec  ad083e1c 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51f0  00000000 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51f4  ad06930b  /system/lib/libdvm.so
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51f8  00000000 
02-19 00:41:26.890    40    40 I DEBUG   :     bebc51fc  ad05cb75  /system/lib/libdvm.so

SIGSEGV in blitter_load making first move in Galaxies

There has been only one report of this. Here is an annotated log extract:

11-22 11:17:05.782  2171  2171 D GameView: onKeyDown 21, KeyEvent{action=0 code=21 repeat=0 meta=0 scancode=0 mFlags=0}
KeyEvent: public static final int KEYCODE_DPAD_LEFT = 21;
11-22 11:17:05.782  2171  2171 D dalvikvm: +++ not scanning '/system/lib/libwebcore.so' for 'keyEvent' (wrong CL)
11-22 11:17:05.782  2171  2171 D dalvikvm: +++ not scanning '/system/lib/libmedia_jni.so' for 'keyEvent' (wrong CL)
11-22 11:17:05.782  2171  2171 D dalvikvm: +++ not scanning '/system/lib/libexif.so' for 'keyEvent' (wrong CL)
11-22 11:17:05.782  2171  2171 W System.err: saved game was:
11-22 11:17:05.782  2171  2171 W System.err: SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
11-22 11:17:05.782  2171  2171 W System.err: VERSION :1:1
11-22 11:17:05.782  2171  2171 W System.err: GAME    :8:Galaxies
11-22 11:17:05.782  2171  2171 W System.err: PARAMS  :7:15x20du
11-22 11:17:05.782  2171  2171 W System.err: CPARAMS :7:15x20du
11-22 11:17:05.782  2171  2171 W System.err: SEED    :15:605188161465353
11-22 11:17:05.782  2171  2171 W System.err: DESC    :80:cmforsezqffifezrtncgznzhzjhdlhzzdzuyqbvbvpzgdsmeizanzzsccdzpuzsezzjjznjwdflsdumg
11-22 11:17:05.782  2171  2171 W System.err: NSTATES :1:1
11-22 11:17:05.782  2171  2171 W System.err: STATEPOS:1:1
11-22 11:17:05.782  2171  2171 W System.err: java.lang.RuntimeException: crashed here (native trace should follow after the Java trace)
11-22 11:17:05.791  2171  2171 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.nativeCrashed(SGTPuzzles.java:969)
11-22 11:17:05.791  2171  2171 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.keyEvent(Native Method)
11-22 11:17:05.791  2171  2171 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.sendKey(SGTPuzzles.java:716)
11-22 11:17:05.791  2171  2171 W System.err: at name.boyle.chris.sgtpuzzles.GameView.onKeyDown(GameView.java:134)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.KeyEvent.dispatch(KeyEvent.java:1037)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.View.dispatchKeyEvent(View.java:3683)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:748)
11-22 11:17:05.791  2171  2171 W System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchKeyEvent(PhoneWindow.java:1655)
11-22 11:17:05.791  2171  2171 W System.err: at com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1102)
11-22 11:17:05.791  2171  2171 W System.err: at android.app.Activity.dispatchKeyEvent(Activity.java:2038)
11-22 11:17:05.791  2171  2171 W System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1631)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2368)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2338)
11-22 11:17:05.791  2171  2171 W System.err: at android.view.ViewRoot.handleMessage(ViewRoot.java:1641)
11-22 11:17:05.791  2171  2171 W System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
11-22 11:17:05.791  2171  2171 W System.err: at android.os.Looper.loop(Looper.java:123)
11-22 11:17:05.791  2171  2171 W System.err: at android.app.ActivityThread.main(ActivityThread.java:4325)
11-22 11:17:05.791  2171  2171 W System.err: at java.lang.reflect.Method.invokeNative(Native Method)
11-22 11:17:05.791  2171  2171 W System.err: at java.lang.reflect.Method.invoke(Method.java:521)
11-22 11:17:05.791  2171  2171 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-22 11:17:05.791  2171  2171 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-22 11:17:05.791  2171  2171 W System.err: at dalvik.system.NativeStart.main(Native Method)
...
11-22 11:17:05.901    48    48 I DEBUG   : signal 11 (SIGSEGV), fault addr 7b1fcf88
...
11-22 11:17:05.931    48    48 I DEBUG   :          # 00  pc 0000605c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
android.c:212       (*env)->CallVoidMethod(env, gameView, blitterLoad, bl->handle, x + fe->ox, y + fe->oy);
11-22 11:17:05.931    48    48 I DEBUG   :          # 01  pc 00017dc0  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
drawing.c:166       dr->api->blitter_load(dr->handle, bl, x, y);
11-22 11:17:05.931    48    48 I DEBUG   :          # 02  pc 00021b44  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
galaxies.c:3185         blitter_load(dr, ds->bl, ds->dragx, ds->dragy);
11-22 11:17:05.931    48    48 I DEBUG   :          # 03  pc 00042334  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
midend.c:802                me->ourgame->redraw(me->drawing, me->drawstate, NULL,  me->states[me->statepos-1].state, +1 /*shrug*/,  me->ui, 0.0, me->flash_pos);
11-22 11:17:05.931    48    48 I DEBUG   :          # 04  pc 00042d7c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
midend.c:601                midend_redraw(me);
11-22 11:17:05.931    48    48 I DEBUG   :          # 05  pc 00043274  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
midend.c:776        ret = ret && midend_really_process_key(me, x, y, button);
11-22 11:17:05.931    48    48 I DEBUG   :          # 06  pc 00007b54  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
android.c:252       if (keyval >= 0 &&  !midend_process_key(fe->me, x - fe->ox, y - fe->oy, keyval))
11-22 11:17:05.931    48    48 I DEBUG   :          # 07  pc 0000ecb4  /system/lib/libdvm.so

SIGBUS in solo:game_redraw

A crash during resize, just after starting up with a completed game.

03-25 12:18:43.044 22737 22737 D SGTPuzzles: GameView has seen 0 keys since init
03-25 12:18:43.054 22737 22737 W System.err: java.lang.RuntimeException: crashed here (native trace should follow after the Java trace)
03-25 12:18:43.234 22737 22737 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.nativeCrashed(SGTPuzzles.java:981)
03-25 12:18:43.234 22737 22737 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.resizeEvent(Native Method)
03-25 12:18:43.234 22737 22737 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles$1.handleMessage(SGTPuzzles.java:138)
[...]
03-25 12:18:43.314   131   131 I DEBUG   : Build fingerprint: 'google/passion/passion/mahimahi:2.1-update1/ERE27/24178:user/release-keys'
03-25 12:18:43.314   131   131 I DEBUG   : pid: 22737, tid: 22737  >>> name.boyle.chris.sgtpuzzles <<<
03-25 12:18:43.314   131   131 I DEBUG   : signal 7 (SIGBUS), fault addr 00000000
[...]
03-25 12:18:44.594   166   980 I ActivityManager: Process com.google.android.apps.genie.geniewidget (pid 29001) has died.
03-25 12:18:44.594   166   980 W ActivityManager: Scheduling restart of crashed service com.google.android.apps.genie.geniewidget/.GenieRefreshService in 5000ms
03-25 12:18:44.834   131   131 I DEBUG   :          #00  pc 0007c664  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
03-25 12:18:44.834   131   131 I DEBUG   :          #01  pc 0004c254  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
03-25 12:18:44.854   131   131 I DEBUG   :          #02  pc 0000846c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so

Hit assert(pbest > 0) at keen.c:1902 (and less often solo.c:5082)

I've had 9 reports of this since releasing 9179.1:

#00  pc 00015ca4  /system/lib/libc.so
#01  pc 0001c92c  /system/lib/libc.so
#02  pc 0003e8ae  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  keen.c:1902
#03  pc 0003ed62  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  keen.c:2003
#04  pc 00059060  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  midend.c:830
#05  pc 00058182  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  midend.c:328
#06  pc 00007ccc  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  android.c:291
...

(relevant line: https://github.com/chrisboyle/sgtpuzzles/blob/9179.2/keen.c#L1902 )

...and 2 of this:

#00  pc 00015ca4  /system/lib/libc.so
#01  pc 0001c92c  /system/lib/libc.so
#02  pc 000983fa  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  solo.c:5082
#03  pc 00098d2e  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  solo.c:5257
#04  pc 00059060  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  midend.c:830
#05  pc 00058182  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  midend.c:328
#06  pc 00007ccc  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so  android.c:291
...

(relevant line: https://github.com/chrisboyle/sgtpuzzles/blob/master/solo.c#L5082 )

In each case, this is a resizeEvent leading to a redraw, and the loop that tries to size the grid for the pencil marks failing to find any acceptable size.

M button in Solo

Several puzzles have an M command to fill in a full set of marks in all empty squares; Solo doesn't seem to. No particular reason why it shouldn't.

Label controls in keyboard

Often the built-in keyboard has controls other than numbers, and these appear as the letters necessary to send to the game. Obviously the user has to go and read the help to find out what each does - we could do much better here by relabelling the buttons to appropriate words.

One slight problem, is that if there are many, or the names are long, we may use more rows of keyboard -> more screen space than might be considered sensible. So we may want to hide some less-used buttons.

Make arrows optional

A comment today on Market from "Leak" says:

"Please make the arrows optional I've got a Motorola Milestone and the arrows are a huge waste of space when I've got a D-pad on the slider (not that Bridges needs them anyway...)"

Now, this code is supposed to hide the arrow keys if a D-pad is present: https://github.com/chrisboyle/sgtpuzzles/blob/master/src/name/boyle/chris/sgtpuzzles/SmallKeyboard.java#L62

So, is there a bug in my code, or a bug in the platform, or is the user wrong, or am I misinterpreting them?

Any Milestone users (or Droid users, probably) can help by telling me whether you see arrow keys. Please check both with the slider closed and with it open. The intended behaviour is that the arrow keys are shown when the slider is closed, because navigationHidden should be true.

Shift-like button for right-click

From Alexander Gavrilov:

Would it be possible to add a special toggle button to a mini-keyboard at the bottom of the screen which basically locks the tap as a right-click emulation? So, if this special button is toggled, all subsequent taps on the screen will be recognized as right clicks. Un-toggling the button would yield usual left-clicks.

I think ideally this would work like shift on Android keyboards: tap once to affect the next tap, tap twice to lock (with clear indication on the button).

Crash on startup with Android version < 2.2.

I started calling Log.wtf in commit e3f3c31 (and again in commit 9e105fb). This does not exist before Android 2.2, which leads to a crash on startup, so I should soon make a release including commit 020d6ad which gets rid of them.

I suspect this is why a Market commenter complains (in Polish) that it doesn't work "since the last update" on "LG GT540".

Add zoom/pan controls

Currently the dimensions of puzzles are effectively limited by screen size and resolution: the puzzle is always scaled to fill the screen (minus titles/keyboard). Puzzles with more than, say, 20 grid squares on a side are usually impractical due to text readability.

This limitation could be removed with zoom/pan controls, as seen in other Android applications such as (to take a simple case) the image viewer. Ideally there would be kinetic panning (release finger while moving and the motion continues, with gradual deceleration).

Probably the hardest part of this is deciding what's a pan and what's a drag, and what's a right-mouse-button-drag (used in Map for example). I imagine it would be:

ActionResult nowResult when zoomed in
tapleft clickleft click
immediate dragleft-dragpan
pause, dragright-dragleft-drag
double-length pause, dragright-dragright-drag

That's not great if you want to right-drag a lot, but I don't see a better possibility without making things significantly less intuitive/cross-device-compatible.

Intermittent failure to resume (progress dialog stays up), especially in Keen

A couple of reports of this since the release of 9306.2. This is the progress dialog remaining visible when coming back to the app when it's finished, i.e. a load from saved state is taking place. Very little information so far, and I have not been able to reproduce it here on a Nexus One or Galaxy Tab 10.1. Trying emulators next, I guess.

If there was a particular diff that introduced this, it's probably in here: 9179.2...9306.2

Better activity flow between chooser and game

First run:
Welcome dialog -> game chooser -> game -> user hits back button -> app exits.

Some users are confused that they're not back at the game chooser.

Subsequent runs:
Resumes previous game -> user hits back button -> app exits.

Users occasionally don't manage to find the game chooser again. :-(

Some users, myself included, want to dip in and out of their current puzzle without visiting the chooser (start app, make a move or two, Back). I don't want to break established behaviour for these users.

Some other users would prefer to always go back to the chooser; I have about 4 Market comments to this effect. This will be more the case once issue #17 is fixed (so you can have several different games in progress).

SIGSEGV: configOK called with fe->cfg invalid

Found with monkey:

$ adb -e shell monkey -v --monitor-native-crashes -p name.boyle.chris.sgtpuzzles -s 1234 10000

01-31 13:04:38.373    52    77 I ActivityManager: Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/2/2 nav=3/1 orien=1 layout=18}
01-31 13:04:39.003   228   228 D dalvikvm: GC freed 2097 objects / 135328 bytes in 89ms
01-31 13:04:39.653   228   228 W KeyCharacterMap: No keyboard for id 0
01-31 13:04:39.653   228   228 W KeyCharacterMap: Using default keymap: /system/usr/keychars/qwerty.kcm.bin
01-31 13:04:39.814   228   228 D SGTPuzzles: startGame: 2, null
...
01-31 13:04:42.253    28    28 I DEBUG   : pid: 228, tid: 285  >>> name.boyle.chris.sgtpuzzles <<<
01-31 13:04:42.253    28    28 I DEBUG   : signal 11 (SIGSEGV), fault addr 3278327b
01-31 13:04:42.253    28    28 I DEBUG   :  r0 0040adb0  r1 00000000  r2 afe3bb74  r3 80a9b190
01-31 13:04:42.253    28    28 I DEBUG   :  r4 3278326f  r5 00000000  r6 0030dde8  r7 000004c4
01-31 13:04:42.253    28    28 I DEBUG   :  r8 80a9b190  r9 426b7fcc  10 426b7fb4  fp 0040ac98
01-31 13:04:42.253    28    28 I DEBUG   :  ip 0040ada8  sp 456ecd48  lr afe0f2c0  pc 80a144a0  cpsr 20000010
01-31 13:04:43.081    28    28 I DEBUG   :          # 00  pc 000144a0  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/cube.c#L518
01-31 13:04:43.081    28    28 I DEBUG   :          # 01  pc 0004b364  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/midend.c#L1252
01-31 13:04:43.081    28    28 I DEBUG   :          # 02  pc 00007aa0  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/android.c#L422
01-31 13:04:43.101    28    28 I DEBUG   :          # 03  pc 0000f1f4  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 04  pc 00037fcc  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 05  pc 00031642  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 06  pc 00013f58  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 07  pc 00019888  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 08  pc 00018d5c  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 09  pc 0004d6d0  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 10  pc 0004d702  /system/lib/libdvm.so
01-31 13:04:43.101    28    28 I DEBUG   :          # 11  pc 00041c78  /system/lib/libdvm.so
01-31 13:04:43.141    28    28 I DEBUG   :          # 12  pc 00010000  /system/lib/libc.so
01-31 13:04:43.141    28    28 I DEBUG   :          # 13  pc 0000fad4  /system/lib/libc.so

(No java trace, this was run without my crash handler.)

SIGSEGV with threading warning in get_text (Twiddle status bar)

Found with the monkey, and possibly related to issue #1:

$ adb -e shell monkey -v --monitor-native-crashes -p name.boyle.chris.sgtpuzzles -s 1234 10000

01-31 13:06:46.690   286   286 D SGTPuzzles: startGame: 28, null
01-31 13:06:46.840    52    77 I WindowManager: Setting rotation to 0, animFlags=1
01-31 13:06:46.900    52    77 I ActivityManager: Config changed: { scale=1.0 imsi=310/260 loc=en_US touch=3 keys=2/2/2 nav=3/1 orien=1 layout=18}
01-31 13:06:47.533   286   286 D dalvikvm: GC freed 4032 objects / 196072 bytes in 85ms
01-31 13:06:48.323   286   286 W KeyCharacterMap: No keyboard for id 0
01-31 13:06:48.334   286   286 W KeyCharacterMap: Using default keymap: /system/usr/keychars/qwerty.kcm.bin
01-31 13:06:48.764    52   132 W InputManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43d8e808
01-31 13:06:49.764    52    76 D dalvikvm: GC freed 3426 objects / 297760 bytes in 134ms
01-31 13:06:50.690   286   303 W dalvikvm: JNI WARNING: threadid=19 using env from threadid=3
01-31 13:06:50.690   286   303 W dalvikvm:              in Lname/boyle/chris/sgtpuzzles/SGTPuzzles;.keyEvent (III)I (GetStringUTFChars)
01-31 13:06:50.690   286   303 I dalvikvm: "newGame" prio=5 tid=19 NATIVE
01-31 13:06:50.690   286   303 I dalvikvm:   | group="main" sCount=0 dsCount=0 s=N obj=0x43db8790 self=0x49c7c8
01-31 13:06:50.690   286   303 I dalvikvm:   | sysTid=303 nice=0 sched=0/0 cgrp=default handle=4835552
01-31 13:06:50.690   286   303 I dalvikvm:   at name.boyle.chris.sgtpuzzles.SGTPuzzles.keyEvent(Native Method)
01-31 13:06:50.690   286   303 I dalvikvm:   at name.boyle.chris.sgtpuzzles.SGTPuzzles.sendKey(SGTPuzzles.java:720)
01-31 13:06:50.690   286   303 I dalvikvm:   at name.boyle.chris.sgtpuzzles.SGTPuzzles$6.run(SGTPuzzles.java:419)
...
01-31 13:06:50.850    28    28 I DEBUG   : Build fingerprint: 'generic/google_sdk/generic/:2.1/ERD79/22607:eng/test-keys'
01-31 13:06:50.850    28    28 I DEBUG   : pid: 286, tid: 303  >>> name.boyle.chris.sgtpuzzles <<<
01-31 13:06:50.850    28    28 I DEBUG   : signal 11 (SIGSEGV), fault addr deadd00d
01-31 13:06:50.850    28    28 I DEBUG   :  r0 00000354  r1 afe1331d  r2 0000000c  r3 deadd00d
01-31 13:06:50.850    28    28 I DEBUG   :  r4 00000026  r5 ad07ff50  r6 00000001  r7 00000001
01-31 13:06:50.850    28    28 I DEBUG   :  r8 000004c4  r9 00000078  10 80a9b190  fp 00000078
01-31 13:06:50.850    28    28 I DEBUG   :  ip ad080160  sp 453dfa38  lr afe142dd  pc ad035452  cpsr 20000030
01-31 13:06:51.200    28    28 I DEBUG   :          # 00  pc 00035452  /system/lib/libdvm.so
01-31 13:06:51.322    28    28 I DEBUG   :          # 01  pc 00027a98  /system/lib/libdvm.so
01-31 13:06:51.362    28    28 I DEBUG   :          # 02  pc 00027bba  /system/lib/libdvm.so
01-31 13:06:51.362    28    28 I DEBUG   :          # 03  pc 0002f264  /system/lib/libdvm.so
01-31 13:06:51.362    28    28 I DEBUG   :          # 04  pc 00007254  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/android.c#L527
01-31 13:06:51.362    28    28 I DEBUG   :          # 05  pc 00087b90  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/twiddle.c#L1238
01-31 13:06:51.362    28    28 I DEBUG   :          # 06  pc 0004b800  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/midend.c#L818
01-31 13:06:51.400    28    28 I DEBUG   :          # 07  pc 0004c384  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/midend.c#L570
01-31 13:06:51.483    28    28 I DEBUG   :          # 08  pc 0004c67c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/midend.c#L792
01-31 13:06:51.483    28    28 I DEBUG   :          # 09  pc 00008040  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
http://github.com/chrisboyle/sgtpuzzles/blob/86945cdfce25df7154137322f03739ed61d079d3/android.c#L263
01-31 13:06:51.483    28    28 I DEBUG   :          # 10  pc 0000f1f4  /system/lib/libdvm.so

No Java trace; this was run without my crash handler.

no way to middle press in net

The net game works better if you can lock squares,but that needs a middle mouse press which there is no way of doing

Vibrate on long press?

This would help confirm that a long press was successful, but might be really irritating in games where long presses are common, so should really be optional, which means creating an options screen (there isn't one currently).

Signpost can run out of letters

If you have more than 26 chains ("sets") in Signpost, we will cheerfully label them with the characters after 'z', which is a fast route into Unicode madness (indistinguishable rectangles, mostly). Thanks go to Mohamed Eldawy for finding this.

Fix will want to go upstream too.

Need better feature graphic

http://android-developers.blogspot.com/2011/10/android-market-featured-image.html

I'm doing exactly what this says not to do, as seen here:

https://market.android.com/details?id=name.boyle.chris.sgtpuzzles

Contributions or ideas for a better image are very welcome! :-)

Without having too much detail in the graphic, it would ideally suggest some of these key points:

  • Collection of many games (33 currently) - perhaps show a few of the icons?
  • Never runs out of levels
  • Multi-platform, works well on tablets (now). Need some more screenshots for this as well.
  • Free, open source

Saving puzzle type for all puzzles

Keeping the settings defining the current settings (including any custom settings) for all games as opposed to just the current game. You could also store the entire game state but that might get large, storing the settings would be great though.

ArrayIndexOutOfBoundsException in onPrepareOptionsMenu

200ms after starting, restoring a perfectly normal saved game of Loopy:

01-05 10:41:40.393  3820  3820 W System.err: java.lang.ArrayIndexOutOfBoundsException
01-05 10:41:40.473  3820  3820 W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.onPrepareOptionsMenu(SGTPuzzles.java:381)
01-05 10:41:40.473  3820  3820 W System.err: at android.app.Activity.onPreparePanel(Activity.java:2065)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:429)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.policy.impl.PhoneWindow.openPanel(PhoneWindow.java:517)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.policy.impl.PhoneWindow.openPanelsAfterRestore(PhoneWindow.java:1590)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.policy.impl.PhoneWindow.access$1500(PhoneWindow.java:86)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.onAttachedToWindow(PhoneWindow.java:2043)
01-05 10:41:40.473  3820  3820 W System.err: at android.view.View.dispatchAttachedToWindow(View.java:5567)
01-05 10:41:40.473  3820  3820 W System.err: at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:1032)
01-05 10:41:40.473  3820  3820 W System.err: at android.view.ViewRoot.performTraversals(ViewRoot.java:676)
01-05 10:41:40.473  3820  3820 W System.err: at android.view.ViewRoot.handleMessage(ViewRoot.java:1613)
01-05 10:41:40.473  3820  3820 W System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
01-05 10:41:40.473  3820  3820 W System.err: at android.os.Looper.loop(Looper.java:123)
01-05 10:41:40.473  3820  3820 W System.err: at android.app.ActivityThread.main(ActivityThread.java:4320)
01-05 10:41:40.473  3820  3820 W System.err: at java.lang.reflect.Method.invokeNative(Native Method)
01-05 10:41:40.473  3820  3820 W System.err: at java.lang.reflect.Method.invoke(Method.java:521)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
01-05 10:41:40.473  3820  3820 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
01-05 10:41:40.473  3820  3820 W System.err: at dalvik.system.NativeStart.main(Native Method)

Line 381, with the offending array access, is:

else menu.findItem((Integer)gameTypes.keySet().toArray()[currentType]).setChecked(true);

So currentType was out of bounds. It is only ever set in tickTypeItem(), which should be called from native code, in this case it should have been called from ..._init() because we were restoring. Looks like Android decided to restore the "open" state of a menu, and either currentType or gameTypes was not filled in yet. This looks like a race: onPrepareOptionsMenu() will happen on the UI thread while we're restoring in a background thread. Lovely.

Add multiplayer feature (competitive, race-to-solve)

A wishlist idea suggested by a couple of people (quoted here from Ben Kolin):

What I would very much like to do is play the games in a competitive fashion against one or a few other players. The same game at the same time.

This scenario would end up being a whole lot like the setup for the game Cestos on the Android platform, where a simple one-screen "lobby" area serves to show how many people are waiting to play each game, and to actually cause matches to start, handle buddy lists for playing against specific people, etc. Cestos serves AdMob ads to offset costs, which I think could make a lot of sense here too (or a low-cost paid edition). The main game play would be single player non-interactive (just as it is now), other than that a user should be alerted when someone else in the party has "won" that round. Winning would be more or less submitting a winning configuration along with a game id to the server.

Yes there's plenty of potential to cheat or otherwise mess with things but those that play geeky games like these probably won't go to the trouble. In a perfect world the native platform executables, Java applets, Android executables, and any other platform ports could all play against each other at the same time. The network interface could be added on top such that any port could be enhanced over time to provide online play.

SIGSEGV in Canvas.drawColor

Two reports of this. One crashed on startup with the following save, the other was a longer save from Filling, both appear unremarkable:

SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
VERSION :1:1
GAME    :6:Towers
PARAMS  :3:5dh
CPARAMS :3:5dh
SEED    :15:992428006494657
DESC    :28:/2//2///4/4////////////1,s3e
AUXINFO :52:8dada85b4465ffbef4763b654f85bb34b5534ca7b8925268da4a
NSTATES :2:12
STATEPOS:2:12
MOVE    :6:R4,4,5
MOVE    :6:R1,1,5
MOVE    :6:R2,0,5
MOVE    :6:R1,3,2
MOVE    :6:R1,4,1
MOVE    :6:R2,4,2
MOVE    :6:R2,3,1
MOVE    :6:R2,2,3
MOVE    :6:R2,1,4
MOVE    :6:R1,2,4
MOVE    :6:R1,0,3

...like this:

W System.err: java.lang.RuntimeException: crashed here (native trace should follow after the Java trace)
W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.nativeCrashed(SGTPuzzles.java:981)
W System.err: at android.graphics.Canvas.native_drawColor(Native Method)
W System.err: at android.graphics.Canvas.drawColor(Canvas.java:742)
W System.err: at name.boyle.chris.sgtpuzzles.GameView.clear(GameView.java:175)
W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.requestResize(SGTPuzzles.java:787)
W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles.init(Native Method)
W System.err: at name.boyle.chris.sgtpuzzles.SGTPuzzles$11.run(SGTPuzzles.java:676)

The native trace is uninteresting. The last line of my code is:

if( canvas != null ) canvas.drawColor( Color.BLACK );

So it's not at all obvious what I might have done wrong here...

Range inconsistent about solve -> undo -> complete -> flash?

In most games, if you solve, undo the solve, and go on to complete the game, you still get a victory flash. This is not true in Range. I fixed this and emailed Simon about it in September 2010, but I think it was not fixed upstream and I accidentally reverted the change on some subsequent merge.

Black Box should allow range for ball count

On other platforms Black Box will allow the ball count to be "3-5" for example. I've accidentally prevented this on Android by limiting the field to digits only (the dash is not accepted).

Drawing issues on reorienting during start/resume

Susan went from another app to Puzzles while reorienting (closing the keyboard on a G1). This resulted in incorrect drawing. The game was Signpost 9x11, and the background colour on all squares but the top-right 5x7 was grey (the background of areas outside the board).

Arrow keys on screen if no trackball/d-pad

Discussed at Android Developer Labs 2011: perhaps there could be a translucent movable large set of arrow keys + left/right click on screen, if the device has no trackball/d-pad.

SIGSEGV (assertion?) solving unequal

Report from a G1 (US?) that died on clicking solve, with this game:

SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
VERSION :1:1
GAME    :7:Unequal
PARAMS  :3:4de
CPARAMS :3:4de
DESC    :36:0D,0,0,0,0,2U,0U,0,0,0,0,0,0,0,0U,2,
NSTATES :1:1
STATEPOS:1:1

If you load this into a Linux build and press solve, you get:
latin.c:891: latin_solver_top: Assertion `maxdiff <= diff_recursive' failed.

There's not much of a trace here:

03-21 07:35:32.116  5406  5406 D SGTPuzzles: GameView has seen 0 keys since init
# [nativeCrashed in solveEvent]
03-21 07:35:32.396  1925  1925 I DEBUG   : Build fingerprint: 'tmobile/kila/dream/trout:1.6/DMD64/21415:user/ota-rel-keys,release-keys'
03-21 07:35:32.396  1925  1925 I DEBUG   : pid: 5406, tid: 5406  >>> name.boyle.chris.sgtpuzzles <<<
03-21 07:35:32.396  1925  1925 I DEBUG   : signal 11 (SIGSEGV), fault addr 80499b96
03-21 07:35:32.396  1925  1925 I DEBUG   :  r0 beef265c  r1 00354cb8  r2 00000006  r3 8049a0e8
03-21 07:35:32.396  1925  1925 I DEBUG   :  r4 00000005  r5 8049ffac  r6 00000001  r7 00304cb8
03-21 07:35:32.396  1925  1925 I DEBUG   :  r8 beef265c  r9 00354cb8  10 00000006  fp 00000000
03-21 07:35:32.396  1925  1925 I DEBUG   :  ip 00000003  sp beef25a0  lr 804347bc  pc 8049a0f0  cpsr a0000010
03-21 07:35:33.496    70    79 D dalvikvm: GC freed 22591 objects / 1128192 bytes in 636ms
03-21 07:35:33.766  1925  1925 I DEBUG   :          # 00  pc 0009a0f0  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# addr2line doesn't like this
03-21 07:35:33.766  1925  1925 I DEBUG   :          # 01  lr 804347bc  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8887.1/latin.c#L908 ?
03-21 07:35:33.766  1925  1925 I DEBUG   : stack:
# [...]

Not much use. Here's what happens if I press solve on this game in a debugging build on my Nexus One:

03-21 12:25:48.208 30855 30855 I DEBUG   : Build fingerprint: 'google/passion/passion/mahimahi:2.1-update1/ERE27/24178:user/release-keys'
03-21 12:25:48.208 30855 30855 I DEBUG   : pid: 30894, tid: 30894  >>> name.boyle.chris.sgtpuzzles <<<
03-21 12:25:48.208 30855 30855 I DEBUG   : signal 11 (SIGSEGV), fault addr deadbaad
# That seems to be what assertion failures do on Android...
03-21 12:25:48.208 30855 30855 I DEBUG   :  r0 00000000  r1 afe13429  r2 00000027  r3 00000054
03-21 12:25:48.208 30855 30855 I DEBUG   :  r4 afe3ae88  r5 00000000  r6 00000000  r7 00000006
03-21 12:25:48.208 30855 30855 I DEBUG   :  r8 be8b48bc  r9 00423b18  10 00000006  fp 00000000
03-21 12:25:48.208 30855 30855 I DEBUG   :  ip 00002eec  sp be8b47c8  lr deadbaad  pc afe10ae4  cpsr 60000030
03-21 12:25:48.288 30855 30855 I DEBUG   :          # 00  pc 00010ae4  /system/lib/libc.so
03-21 12:25:48.288 30855 30855 I DEBUG   :          # 01  pc 00017d5c  /system/lib/libc.so
03-21 12:25:48.298 30855 30855 I DEBUG   :          # 02  pc 00039c58  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8905.1/latin.c#L891
03-21 12:25:48.298 30855 30855 I DEBUG   :          # 03  pc 0009c5c8  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8905.1/unequal.c#L817
03-21 12:25:48.298 30855 30855 I DEBUG   :          # 04  pc 0009ca04  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8905.1/unequal.c#L1355
03-21 12:25:48.298 30855 30855 I DEBUG   :          # 05  pc 00053b8c  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8905.1/midend.c#L1307
03-21 12:25:48.298 30855 30855 I DEBUG   :          # 06  pc 000082ec  /data/data/name.boyle.chris.sgtpuzzles/lib/libpuzzles.so
# http://github.com/chrisboyle/sgtpuzzles/blob/8905.1/android.c#L381
# [...]

View not attached to window manager

A couple of reports of this:

java.lang.IllegalArgumentException: View not attached to window manager
W System.err:   at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355)
W System.err:   at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)
W System.err:   at android.view.Window$LocalWindowManager.removeView(Window.java:432)
W System.err:   at android.app.Dialog.dismissDialog(Dialog.java:278)
W System.err:   at android.app.Dialog.access$000(Dialog.java:71)
W System.err:   at android.app.Dialog$1.run(Dialog.java:111)
W System.err:   at android.app.Dialog.dismiss(Dialog.java:268)
W System.err:   at name.boyle.chris.sgtpuzzles.SGTPuzzles.dismissProgress(SGTPuzzles.java:180)
W System.err:   at name.boyle.chris.sgtpuzzles.SGTPuzzles$1.handleMessage(SGTPuzzles.java:146)

So far no idea what could have caused it. Some sort of race condition.

Samsung's WebView too keen to launch Browser?

A user with a SAMSUNG-SGH-I897 has reported a bug where "The help contents page loads but when I tap on an entry I get a page not found error". The user's log shows that the Browser application was launched (presumably in response to a link being clicked in the WebView) and of course the browser can't load content from file:///android_asset/en/... so will show an error. The Browser should not be launched here, and on other devices e.g. the Nexus One, it isn't (the WebView navigates to the new page instead). I have had no other reports.

A quick look at http://developer.android.com/reference/android/webkit/WebView.html doesn't suggest any workarounds / ways to intercept. :-(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.