I am seeing occasional crashes in GC.Collect (called on the screen just
before my main game loop per level). I know some people are religious about
not calling GC.Collect but done strategically it can be useful. Here's what
I am seeing
12-03 10:03:29.951: DEBUG/AudioHardwareMot(6321): AudioStreamOutMot::standby
called
12-03 10:03:29.951: DEBUG/AudioHardwareMot(6321): Output 0x123e0 entering
standby
12-03 10:03:29.959: DEBUG/AudioHardwareMot(6321): Closing Output device
12-03 10:03:30.380: DEBUG/dalvikvm(27716): GC_EXTERNAL_ALLOC freed 153
objects / 87720 bytes in 30ms
*12-03 10:03:31.568: INFO/mono(27716): Stacktrace:
12-03 10:03:31.568: INFO/mono(27716): at System.GC.Collect () <0x0000b>
12-03 10:03:31.568: INFO/mono(27716): at GameLibrary.Utils.GarbageCollect
() <0x0000f>
12-03 10:03:31.568: INFO/mono(27716): at Exterminator.JobOrderScreen.Draw
(Microsoft.Xna.Framework.GameTime) <0x003cf>
12-03 10:03:31.568: INFO/mono(27716): at GameLibrary.ScreenManager.Draw
(Microsoft.Xna.Framework.GameTime) <0x00087>
12-03 10:03:31.568: INFO/mono(27716): at Microsoft.Xna.Framework.Game.Draw
(Microsoft.Xna.Framework.GameTime) <0x0014f>
12-03 10:03:31.568: INFO/mono(27716): at
Microsoft.Xna.Framework.Game.DoDraw (Microsoft.Xna.Framework.GameTime)
<0x0002f>
12-03 10:03:31.568: INFO/mono(27716): at
Microsoft.Xna.Framework.AndroidGameWindow.OnRenderFrame
(OpenTK.FrameEventArgs) <0x0012f>
12-03 10:03:31.568: INFO/mono(27716): at
OpenTK.Platform.Android.AndroidGameView.RunIteration () <0x00427>
12-03 10:03:31.568: INFO/mono(27716): at
OpenTK.Platform.Android.RepeatTimerTask.Run () <0x00023>
12-03 10:03:31.568: INFO/mono(27716): at Java.Util.TimerTask.n_Run
(intptr,intptr) <0x00033>
12-03 10:03:31.568: INFO/mono(27716): at (wrapper dynamic-method)
object.a51b8273-131b-4022-baad-ee1b4ea51e2a (intptr,intptr) <0x0002b>
12-03 10:03:31.568: INFO/mono(27716): at (wrapper native-to-managed)
object.a51b8273-131b-4022-baad-ee1b4ea51e2a (intptr,intptr)
<0xffffffff>*12-03 10:03:59.974: VERBOSE/DeviceStorageMonitorService(6328):
freeMemory=6630920192
12-03 10:03:59.974: VERBOSE/DeviceStorageMonitorService(6328): Threshold
Percentage=10
12-03 10:03:59.974: VERBOSE/DeviceStorageMonitorService(6328): mTotalMemory
= 70264913
12-03 10:03:59.974: INFO/DeviceStorageMonitorService(6328): Posting Message
again
12-03 10:04:15.802: DEBUG/dalvikvm(6420): GC_FOR_MALLOC freed 12828 objects
/ 524384 bytes in 124ms
12-03 10:04:39.294: DEBUG/PollingManager(6428): wake lock acquired
There should be no reason GC.Collect ever crashes, whether this is good
practice or not. I also cannot handle this exception and ignore (which of
course would be very scary but I have tried :) )
Is there a fix in the works for this problem?
Cheers
Warren
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/GC-Collect-can-crash-tp5044972p5044972.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid