Hi Bill, Thanks for trying! I tried the new APK but the following script still crashes for me:
NB. bug: the following crashes J with bus error max=: 100 padrifshort=: ]`(max (,,[) ])@.(>&#) ts =: 0 1 0 0 0 1 0 0 0, (7 9$9$0 1), (0 0 0 1 0 0 0 1 0) NB. crash NB. try=: [: ( [+2 <./\ padrifshort)&.>/\@|. [: </. 0 (<0 0)} ] NB. try=: [: ( [+2 <./\ padrifshort)&.>/\@|. [: </. ] NB. try=: [: (2 <./\ padrifshort)&.>/\@|. [: </. ] NB. try=: [: (2 <./\ padrifshort)&.>/\ [: </. ] NB. try=: [: (2 <./\ ])&.>/\ [: </. ] NB. try=: [: (2 >./\ ])&.>/\ [: </. ] NB. try=: [: (2 <./\ ])&.>/\ </. try=: [: (2 <./\ ])&.>/\ </. NB. fine NB. try=: [: (>&#)&.>/\ [: </. ] NB. try=: [: (padrifshort)&.>/\ [: </. ] NB. try=: [: (2 <./\ ])&.>/ [: </. ] NB. try=: [: (2 #\ ])&.>/\ [: </. ] try ts ~/.../J/aoc2021 $ jcon JVERSION Engine: j903/j32/android Release-a: commercial/2022-01-07T10:45:28 Library: 9.03.08 Platform: Android 32 (armeabi-v7a) Installer: unknown InstallPath: /mnt/sdcard/Android/data/com.jsoftware.j.android/files Contact: www.jsoftware.com load 'bug.ijs' Bus error Thanks, Jan-Pieter On Fri, Jan 7, 2022, 03:55 bill lam <[email protected]> wrote: > There was a minor update and I tested it on 32-bit raspberry and the try ts > didn't crash. > > I uploaded an updated jandroid.apk. please download and try again. > tool>check for new version should also work this time. > > On Fri, Jan 7, 2022 at 10:01 AM Jan-Pieter Jacobs < > [email protected]> wrote: > > > Hi Bill, > > > > Are > > > > max =: 100 > > tss =: 0 1 0 0 0 , (3 5$5$0 1), (0 0 0 1 0 ) > > > > small enough? > > In this case "try ts" still crashes. In case it's useful, I reducing the > > "try" verb as well, with the following results: > > > > max=: 100 > > padrifshort=: ]`(max (,,[) ])@.(>&#) > > ts =: 0 1 0 0 0 1 0 0 0, (7 9$9$0 1), (0 0 0 1 0 0 0 1 0) > > > > NB. all of the below crash with bus error > > NB. try=: [: ( [+2 <./\ padrifshort)&.>/\@|. [: </. 0 (<0 0)} ] > > NB. try=: [: ( [+2 <./\ padrifshort)&.>/\@|. [: </. ] > > NB. try=: [: (2 <./\ padrifshort)&.>/\@|. [: </. ] > > NB. try=: [: (2 <./\ padrifshort)&.>/\ [: </. ] > > NB. try=: [: (2 <./\ ])&.>/\ [: </. ] > > NB. try=: [: (2 >./\ ])&.>/\ [: </. ] > > NB. try=: [: (2 <./\ ])&.>/\ </. > > try=: [: (2 <./\ ])&.>/\ </. > > > > NB. the following do not crash > > NB. try=: [: (>&#)&.>/\ [: </. ] > > NB. try=: [: (padrifshort)&.>/\ [: </. ] > > NB. try=: [: (2 <./\ ])&.>/ [: </. ] > > NB. try=: [: (2 #\ ])&.>/\ [: </. ] > > try ts > > > > I hope this helps. > > > > Jan-Pieter > > > > On Thu, Jan 6, 2022, 23:18 bill lam <[email protected]> wrote: > > > > > It's likely a 32-bit arm unaligned memory access issue. Can you check > if > > it > > > will also crash for a small max and ts ? > > > > > > On Fri, 7 Jan 2022 at 3:39 AM Jan-Pieter Jacobs < > > > [email protected]> > > > wrote: > > > > > > > I was trying to debug my implementation of Dijkstra's algorithm and > ran > > > > into this J crash: > > > > > > > > (AoC Day 15 spoiler ahead -- well sort off, the solution is not > > entirely > > > > correct, hence the debugging :p) > > > > > > > > ts is a snaking path of 0's from 0 0 to 9 9, and try1 (should) > > implement > > > > Dijkstra's algorithm for finding a path with a minimal sum of the > nodes > > > > crossed. Something in my implementation is wrong (hints welcome), but > > > the J > > > > bug turned up when I wanted to debug this approach by adding a \ to > > keep > > > > intermediate results, which causes a bus error: > > > > > > > > try=: [: ([ + 2 <./\ padrifshort)&.>/\@|. [: </. 0 (<0 0)} ] > > > > ts =: 0 1 0 0 0 1 0 0 0, (7 9$9$0 1), (0 0 0 1 0 0 0 1 0) > > > > try1=: [: ([ + 2 <./\ padrifshort)&.>/@|. [: </. 0 (<0 0)} ] > > > > max=: 2e9 > > > > padrifshort=: ]`(max (,,[) ])@.(>&#) > > > > try1 ts NB. "works" no crash, but result is wrong. > > > > ┌─┐ > > > > │2│ > > > > └─┘ > > > > try ts > > > > Bus error > > > > NB. J crashed. > > > > > > > > For an explanation of the code, see ( > > > > > > http://www.jsoftware.com/pipermail/programming/2022-January/059538.html > > > ). > > > > > > > > My J version: > > > > JVERSION > > > > Engine: j903/j32/android > > > > Release-a: commercial/2021-12-17T11:10:19 > > > > Library: 9.03.08 > > > > Platform: Android 32 (armeabi-v7a) > > > > Installer: unknown > > > > InstallPath: /mnt/sdcard/Android/data/com.jsoftware.j.android/files > > > > Contact: www.jsoftware.com > > > > > > > > Jan-Pieter > > > > > ---------------------------------------------------------------------- > > > > For information about J forums see > http://www.jsoftware.com/forums.htm > > > > > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
