Thanks for your tip. Plugging my phone in, and using that rather than the emulator, the logcat is now telling me this:
(and the app on my phone saying "The application SuperCollider (process uk.co.mcld.dabble.GlastoCollider1) has
unexpectedly quit. Please try again").
01-13 22:31:05.027: D/ATRecorder(16368): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@4052a670
01-13 22:31:05.287: D/AndroidRuntime(16368): Shutting down VM
01-13 22:31:05.287: W/dalvikvm(16368): threadid=1: thread exiting with uncaught exception (group=0x4001d648)
01-13 22:31:05.287: E/AndroidRuntime(16368): FATAL EXCEPTION: main
01-13 22:31:05.287: E/AndroidRuntime(16368): java.lang.ClassCastException: android.os.BinderProxy
01-13 22:31:05.287: E/AndroidRuntime(16368): at net.sf.supercollider.android.SuperColliderActivity$ScServiceConnection.onServiceConnected(SuperColliderActivity.java:45)
01-13 22:31:05.287: E/AndroidRuntime(16368): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1107)
01-13 22:31:05.287: E/AndroidRuntime(16368): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1124)
01-13 22:31:05.287: E/AndroidRuntime(16368): at android.os.Handler.handleCallback(Handler.java:587)
01-13 22:31:05.287: E/AndroidRuntime(16368): at android.os.Handler.dispatchMessage(Handler.java:92)
01-13 22:31:05.287: E/AndroidRuntime(16368): at android.os.Looper.loop(Looper.java:150)
01-13 22:31:05.287: E/AndroidRuntime(16368): at android.app.ActivityThread.main(ActivityThread.java:4293)
01-13 22:31:05.287: E/AndroidRuntime(16368): at java.lang.reflect.Method.invokeNative(Native Method)
01-13 22:31:05.287: E/AndroidRuntime(16368): at java.lang.reflect.Method.invoke(Method.java:507)
01-13 22:31:05.287: E/AndroidRuntime(16368): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
01-13 22:31:05.287: E/AndroidRuntime(16368): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
01-13 22:31:05.287: E/AndroidRuntime(16368): at dalvik.system.NativeStart.main(Native Method)
01-13 22:31:09.101: I/Process(16368): Sending signal. PID: 16368 SIG: 9
Does this mean anything to anyone?
Thanks
Thor
Since the problem seems to be related to starting the audio service, you may want to make sure everything is in order with AIDL stuff--that you declared the Service in the manifest, and so on. Getting the service to bind correctly is tricky, and I wouldn't want to figure out how to do it by looking at Android AIDL docs. If you don't have a functional, skeletal project that runs an audio service, I'd be happy share code for a simple recording app.
All I can say from my PoV is that I haven't really been working on
android for a few months (disappointed by latency and other things,
moved on to other stuff until they fix it... may be years...), so I
have no idea about building on recent OS releases or SDKs. I don't
believe there's much other dev activity at the moment - so it'd be
great if you could get it working (if there are patches to send,
please send them) but you'd probably be taking the initiative.
Dan
2012/1/14 thor <th....@gmail.com>:
Thanks for this note. I will do my best. I've become very stubborn with
this thing now. I've never had the experience of not being able to build
something and this annoys me : )
Regarding the latency, it's true. But my view on SC on the Android is
that the latency problem is primarily a screen-or-sensor to sound-engine
problem. However, there is so much to explore in terms of SC on mobile
devices that do not necessarily require interactivity.
Perhaps others on this list have some tips, but I'll certainly send all
patches or updates. I'd be happy to write a more thorough helpfile
as well if I eventually get this to sound.
Cheers
thor
So what was the hassle? Could you upload your changes onto
a github repository? Or somehow submit it back to the project.
Dan said he's happy to apply patches if you are able to send them
to him.
Looking forward to see more how you're doing.
t
#include <cmath>#include <math.h>#ifndef isnan#define isnan(x) \(sizeof (x) == sizeof (long double) ? isnan_ld (x) \: sizeof (x) == sizeof (double) ? isnan_d (x) \: isnan_f (x))static inline int isnan_f (float x) { return x != x; }static inline int isnan_d (double x) { return x != x; }static inline int isnan_ld (long double x) { return x != x; }#endif///////////////////////////////////////////////////////////////////////////////////////
inline bool sc_isnan(float x){#if (defined(__cplusplus) && defined(__GNUC__) && _GLIBCXX_HAVE_ISNAN)//return std::isnan(x);return isnan(x);#elsereturn (!(x >= 0.f || x <= 0.f));#endif}
> p.d. At which stage are you having problems?
It starts the app on my phone, but it crashes immediately. I've tried all possible
combinations of sdks and java versions.
Would you be able to send me a working Eclipse project? Perhaps I can run it from there?
Not sure if it would work though as I'm on a Mac. You're on Windows, right?
Here are the messages I get. Perhaps you can read something in them?
02-01 21:25:38.937: D/PowerManagerService(262): New lightsensor value:320, lcdValue:142
02-01 21:25:38.937: D/PowerManagerService(262): lightSensorChangedLocked, buttonValue >= 0, mPowerState = 3
02-01 21:25:38.937: D/lights(262): set_light_buttons_func: on=0 brightness=0
02-01 21:25:41.650: D/AndroidRuntime(27356): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-01 21:25:41.650: D/AndroidRuntime(27356): CheckJNI is OFF
02-01 21:25:41.650: D/dalvikvm(27356): creating instr width table
02-01 21:25:41.810: D/AndroidRuntime(27356): Calling main entry com.android.commands.pm.Pm
02-01 21:25:41.820: D/AndroidRuntime(27356): Shutting down VM
02-01 21:25:41.820: D/dalvikvm(27356): GC_CONCURRENT freed 105K, 68% free 331K/1024K, external 0K/0K, paused 1ms+0ms
02-01 21:25:41.820: D/dalvikvm(27356): Debugger has detached; object registry had 1 entries
02-01 21:25:41.950: D/AndroidRuntime(27365): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-01 21:25:41.950: D/AndroidRuntime(27365): CheckJNI is OFF
02-01 21:25:41.950: D/dalvikvm(27365): creating instr width table
02-01 21:25:42.110: D/AndroidRuntime(27365): Calling main entry com.android.commands.am.Am
02-01 21:25:42.120: V/HtcAppUsageStats(262): handleMessage msg=1
02-01 21:25:42.120: I/ActivityManager(262): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=net.sf.supercollider.android/.SuperColliderActivity } from pid 27365
02-01 21:25:42.160: V/HtcAppUsageStats(262): (launch app, package): (SuperCollider, net.sf.supercollider.android)
02-01 21:25:42.170: D/AndroidRuntime(27365): Shutting down VM
02-01 21:25:42.170: D/dalvikvm(27365): GC_CONCURRENT freed 106K, 66% free 358K/1024K, external 0K/0K, paused 0ms+1ms
02-01 21:25:42.190: I/AndroidRuntime(27365): NOTE: attach of thread 'Binder Thread #3' failed
02-01 21:25:42.190: D/jdwp(27365): Got wake-up signal, bailing out of select
02-01 21:25:42.190: D/dalvikvm(27365): Debugger has detached; object registry had 1 entries
02-01 21:25:42.200: I/ActivityManager(262): Start proc net.sf.supercollider.android for activity net.sf.supercollider.android/.SuperColliderActivity: pid=27374 uid=10158 gids={1015, 3003}
02-01 21:25:42.260: D/dalvikvm(27374): Debugger has detached; object registry had 1 entries
02-01 21:25:42.260: D/SensorService(262): enable: get sensor name = MPL accel
02-01 21:25:42.260: D/Sensors(262): handle : 4 en: 1, v07-Correct timerirq initial delay setting
02-01 21:25:42.260: D/Sensors(262): mEnabled = 0x10
02-01 21:25:42.300: I/(262): mpu3050_resume: Resuming to 0070
02-01 21:25:42.300: D/SensorService(262): pid=262, uid=1000
02-01 21:25:42.330: W/libagl(262): handle fade alpha 2
02-01 21:25:42.340: W/dalvikvm(530): disableGcForExternalAlloc: false
02-01 21:25:42.340: W/libagl(262): handle fade alpha 8
02-01 21:25:42.360: W/libagl(262): handle fade alpha 17
02-01 21:25:42.360: D/ATRecorder(27374): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@4052a930
02-01 21:25:42.360: I/ActivityManager(262): Start proc uk.co.mcld.dabble.GlastoCollider1 for service uk.co.mcld.dabble.GlastoCollider1/.ScService: pid=27382 uid=10127 gids={1015}
02-01 21:25:42.370: W/libagl(262): handle fade alpha 29
02-01 21:25:42.390: W/libagl(262): handle fade alpha 45
02-01 21:25:42.410: W/libagl(262): handle fade alpha 63
02-01 21:25:42.420: W/libagl(262): handle fade alpha 83
02-01 21:25:42.440: W/libagl(262): handle fade alpha 104
02-01 21:25:42.460: W/libagl(262): handle fade alpha 113
02-01 21:25:42.470: W/libagl(262): handle fade alpha 136
02-01 21:25:42.480: W/InputManagerService(262): [unbindCurrentClientLocked] Disable input method client.
02-01 21:25:42.480: W/InputManagerService(262): [startInputLocked] Enable input method client.
02-01 21:25:42.490: W/libagl(262): handle fade alpha 157
02-01 21:25:42.510: W/libagl(262): handle fade alpha 177
02-01 21:25:42.520: D/dalvikvm(131): GC_EXPLICIT freed 12K, 44% free 3025K/5379K, external 0K/0K, paused 147ms
02-01 21:25:42.520: W/libagl(262): handle fade alpha 197
02-01 21:25:42.540: W/libagl(262): handle fade alpha 214
02-01 21:25:42.560: W/libagl(262): handle fade alpha 229
02-01 21:25:42.570: W/libagl(262): handle fade alpha 240
02-01 21:25:42.590: W/libagl(262): handle fade alpha 252
02-01 21:25:42.600: W/libagl(262): handle fade alpha 252
02-01 21:25:42.600: D/AndroidRuntime(27374): Shutting down VM
02-01 21:25:42.600: W/dalvikvm(27374): threadid=1: thread exiting with uncaught exception (group=0x4001d648)
02-01 21:25:42.610: W/libagl(262): handle fade alpha 254
02-01 21:25:42.610: E/AndroidRuntime(27374): FATAL EXCEPTION: main
02-01 21:25:42.610: E/AndroidRuntime(27374): java.lang.ClassCastException: android.os.BinderProxy
02-01 21:25:42.610: E/AndroidRuntime(27374): at net.sf.supercollider.android.SuperColliderActivity$ScServiceConnection.onServiceConnected(SuperColliderActivity.java:45)
02-01 21:25:42.610: E/AndroidRuntime(27374): at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1107)
02-01 21:25:42.610: E/AndroidRuntime(27374): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1124)
02-01 21:25:42.610: E/AndroidRuntime(27374): at android.os.Handler.handleCallback(Handler.java:587)
02-01 21:25:42.610: E/AndroidRuntime(27374): at android.os.Handler.dispatchMessage(Handler.java:92)
02-01 21:25:42.610: E/AndroidRuntime(27374): at android.os.Looper.loop(Looper.java:150)
02-01 21:25:42.610: E/AndroidRuntime(27374): at android.app.ActivityThread.main(ActivityThread.java:4293)
02-01 21:25:42.610: E/AndroidRuntime(27374): at java.lang.reflect.Method.invokeNative(Native Method)
02-01 21:25:42.610: E/AndroidRuntime(27374): at java.lang.reflect.Method.invoke(Method.java:507)
02-01 21:25:42.610: E/AndroidRuntime(27374): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
02-01 21:25:42.610: E/AndroidRuntime(27374): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
02-01 21:25:42.610: E/AndroidRuntime(27374): at dalvik.system.NativeStart.main(Native Method)
02-01 21:25:42.610: W/ActivityManager(262): Force finishing activity net.sf.supercollider.android/.SuperColliderActivity
02-01 21:25:42.620: W/libagl(262): handle fade alpha 242
02-01 21:25:42.630: W/libagl(262): handle fade alpha 192
02-01 21:25:42.640: W/libagl(262): handle fade alpha 192
02-01 21:25:42.660: W/libagl(262): handle fade alpha 169
02-01 21:25:42.660: D/dalvikvm(131): GC_EXPLICIT freed <1K, 44% free 3025K/5379K, external 0K/0K, paused 130ms
02-01 21:25:42.671: W/libagl(262): handle fade alpha 132
02-01 21:25:42.691: W/libagl(262): handle fade alpha 125
02-01 21:25:42.711: W/libagl(262): handle fade alpha 107
02-01 21:25:42.721: W/libagl(262): handle fade alpha 88
02-01 21:25:42.731: D/dalvikvm(131): GC_EXPLICIT freed <1K, 44% free 3025K/5379K, external 0K/0K, paused 65ms
02-01 21:25:42.751: W/libagl(262): handle fade alpha 62
02-01 21:25:42.751: D/SurfaceFlinger(262): [DISP] purgatorizeLayer_l 0xf8ec78 4
02-01 21:25:42.761: D/SurfaceFlinger(262): [DISP] purgatorizeLayer_l 0xd65b60 4
02-01 21:25:42.771: W/libagl(262): handle fade alpha 37
02-01 21:25:42.791: D/SurfaceFlinger(262): [DISP] remove 0xd65b60 2
02-01 21:25:42.791: D/SurfaceFlinger(262): [DISP] remove 0xf8ec78 2
02-01 21:25:42.801: W/libagl(262): handle fade alpha 27
02-01 21:25:42.821: W/libagl(262): handle fade alpha 12
02-01 21:25:42.841: W/libagl(262): handle fade alpha 7
02-01 21:25:42.871: W/libagl(262): handle fade alpha 1
02-01 21:25:42.911: D/SurfaceFlinger(262): [DISP] purgatorizeLayer_l 0x15dadc0 4
02-01 21:25:42.931: D/SurfaceFlinger(262): [DISP] remove 0x15dadc0 2
02-01 21:25:43.121: W/ActivityManager(262): Activity pause timeout for HistoryRecord{40c185a0 net.sf.supercollider.android/.SuperColliderActivity}
02-01 21:25:43.121: D/SensorService(262): disable: get sensor name = MPL accel
02-01 21:25:43.121: D/Sensors(262): handle : 4 en: 0, v07-Correct timerirq initial delay setting
02-01 21:25:43.121: W/MPL-sup(262): MLGetAKMComassStatus, gAKMCompassStatus = 0
02-01 21:25:43.121: D/Sensors(262): mEnabled = 0x0
02-01 21:25:43.121: I/(262): mpu3050_suspend: suspending sensors to 0000
02-01 21:25:43.121: I/(262): mpu3050_suspend: Will resume next to 0070
02-01 21:25:43.161: D/SensorService(262): pid=262, uid=1000
02-01 21:25:43.171: I/CarouselTimeLog(530): onStart() finish: 1328131543174
02-01 21:25:43.171: D/CarouselDummyActivity(530): CarouselDummyActivity.onResume: tab_downloaded
02-01 21:25:43.321: W/libagl(262): handle fade alpha 248
02-01 21:25:43.351: W/libagl(262): handle fade alpha 227
02-01 21:25:43.391: W/libagl(262): handle fade alpha 195
02-01 21:25:43.421: W/libagl(262): handle fade alpha 155
02-01 21:25:43.461: W/libagl(262): handle fade alpha 112
02-01 21:25:43.491: W/libagl(262): handle fade alpha 53
02-01 21:25:43.531: W/libagl(262): handle fade alpha 23
02-01 21:25:43.561: W/libagl(262): handle fade alpha 5
02-01 21:25:43.591: I/ActivityManager(262): Displayed net.sf.supercollider.android/.SuperColliderActivity: +1s389ms
02-01 21:25:46.965: D/Wallpaper(530): pauseWallpaper: false
02-01 21:25:46.985: I/Process(27374): Sending signal. PID: 27374 SIG: 9
02-01 21:25:47.005: W/InputManagerService(262): [unbindCurrentClientLocked] Disable input method client.
02-01 21:25:47.005: W/InputManagerService(262): [startInputLocked] Enable input method client.
02-01 21:25:47.025: I/ActivityManager(262): Process net.sf.supercollider.android (pid 27374) has died.
02-01 21:25:47.025: I/WindowManager(262): WIN DEATH: Window{4055a340 net.sf.supercollider.android/net.sf.supercollider.android.SuperColliderActivity paused=false}
02-01 21:25:47.035: D/SurfaceFlinger(262): [DISP] purgatorizeLayer_l 0x7dc968 4
02-01 21:25:47.035: D/AndroidRuntime(27382): Shutting down VM
02-01 21:25:47.035: W/dalvikvm(27382): threadid=1: thread exiting with uncaught exception (group=0x4001d648)
02-01 21:25:47.045: E/AndroidRuntime(27382): FATAL EXCEPTION: main
02-01 21:25:47.045: E/AndroidRuntime(27382): java.lang.RuntimeException: Unable to stop service uk.co.mcld.dabble.GlastoCollider1.ScService@40522010: java.lang.NullPointerException
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.app.ActivityThread.handleStopService(ActivityThread.java:2417)
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.app.ActivityThread.access$2900(ActivityThread.java:132)
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1114)
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.os.Handler.dispatchMessage(Handler.java:99)
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.os.Looper.loop(Looper.java:150)
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.app.ActivityThread.main(ActivityThread.java:4293)
02-01 21:25:47.045: E/AndroidRuntime(27382): at java.lang.reflect.Method.invokeNative(Native Method)
02-01 21:25:47.045: E/AndroidRuntime(27382): at java.lang.reflect.Method.invoke(Method.java:507)
02-01 21:25:47.045: E/AndroidRuntime(27382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
02-01 21:25:47.045: E/AndroidRuntime(27382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
02-01 21:25:47.045: E/AndroidRuntime(27382): at dalvik.system.NativeStart.main(Native Method)
02-01 21:25:47.045: E/AndroidRuntime(27382): Caused by: java.lang.NullPointerException
02-01 21:25:47.045: E/AndroidRuntime(27382): at uk.co.mcld.dabble.GlastoCollider1.ScService.stop(ScService.java:95)
02-01 21:25:47.045: E/AndroidRuntime(27382): at uk.co.mcld.dabble.GlastoCollider1.ScService.onDestroy(ScService.java:109)
02-01 21:25:47.045: E/AndroidRuntime(27382): at android.app.ActivityThread.handleStopService(ActivityThread.java:2400)
02-01 21:25:47.045: E/AndroidRuntime(27382): ... 10 more
02-01 21:25:47.085: D/SurfaceFlinger(262): [DISP] remove 0x7dc968 2
02-01 21:25:47.125: D/SurfaceFlinger(262): [DISP] purgatorizeLayer_l 0xb3cee8 5
02-01 21:25:47.135: W/dalvikvm(530): disableGcForExternalAlloc: false
02-01 21:25:47.165: D/SurfaceFlinger(262): [DISP] remove 0xb3cee8 2
02-01 21:25:50.168: D/SurfaceFlinger(262): [DISP] removeAbnormalLayer
02-01 21:25:50.178: I/Process(27382): Sending signal. PID: 27382 SIG: 9
02-01 21:25:50.208: D/Wallpaper(530): pauseWallpaper: false
02-01 21:25:50.238: D/InputManagerService(262): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40939c40
02-01 21:25:50.238: I/ActivityManager(262): Process uk.co.mcld.dabble.GlastoCollider1 (pid 27382) has died.
02-01 21:25:50.378: D/SurfaceFlinger(262): [DISP] purgatorizeLayer_l 0x8c0020 5
02-01 21:25:50.408: D/SurfaceFlinger(262): [DISP] remove 0x8c0020 2
02-01 21:25:52.520: V/DeviceStorageMonitorService(262): freeMemory=694366208
02-01 21:25:52.520: D/DeviceStorageMonitorService(262): OoO SMS Memory available. SMS_AVAILABLE_THRESHOLD == 524288
02-01 21:25:52.520: I/DeviceStorageMonitorService(262): Posting Message again
02-01 21:25:53.311: W/ActivityManager(262): Activity destroy timeout for HistoryRecord{40c185a0 net.sf.supercollider.android/.SuperColliderActivity}
Hi Thor,Sure I could try to polish up the project I'm working on right now and send it to you, maybe it could work (Yes, sorry I'm with windows). The thing is now I have it really messy since I'm putting processing as well...>_< But I can try cleaning it up.
Could you tell me though what code is at line 45 in SuperColliderActivity.java?