nerzhul / ncsms-android

repository for the ncsms on Android
95 stars 38 forks source link

Crashing app when syncing #30

Closed Trollken-zz closed 9 years ago

Trollken-zz commented 9 years ago

Hi,

First of all, thks for your work, i was looking for this kind of software for a long time !

I just got a little problem : when i start syncing, app crashes after some seconds displaying : "Unfortunatly, owncloud SMS" has stopped". ( this kind of android system error : http://www.ekoob.com/wp-content/uploads/2012/07/app-has-stopped-crashed-android-nexus-7.png ).

Above, you'll find information about my client/server configuration. Btw, I've got a bit more than 25000 sms to sync...

Server

ownCloud version: 7.0.4
PHP version: 5.4
HTTPd server: Apache
HTTPS: wat do you mean ? :)

Client

Android version: 4.2.2
Phone: Samsung galaxy S2
ownCloud SMS app version: 0.16.1

Thks a lot and have a nice day :).

nerzhul commented 9 years ago

Hmmm i'm using the app with Android 4.2.2 too. Do you send a report ?

nerzhul commented 9 years ago

I see a report for a HT desire with Android 4.1 with a crash when syncing, maybe it's related. Is this a fresh install ?

nerzhul commented 9 years ago

In report it to 0.18 branch. 0.17 will be released and your fix, if already exists must be sent to play store, which let me have a backtrace for fixing it

Trollken-zz commented 9 years ago

Well, my error doesn't display the "error" button, i only can press "ok".

The owncloud sms app has been installed yesterday (the server-side app too).

Thks for your reply :).

Trollken-zz commented 9 years ago

Hi ! :).

I updated the app to 0.17, still got the problem :(.

Is there any way to get logs ?

nerzhul commented 9 years ago

If you don't have the button for sending crash, plug your phone in debug mode on an eclipse with Android SDK installed (devel mode in fact...)

Trollken-zz commented 9 years ago

Well, thks for these information, i'll take a look at it asap :-).

nerzhul commented 9 years ago

Have you installed google play store ?

Trollken-zz commented 9 years ago

Yes, Google Play Store is installed on my device.

nerzhul commented 9 years ago

That's stange. We could only debug using eclipse with android-SDK here, i think

Trollken-zz commented 9 years ago

Hi,

I just found tons of errors on the Apache logs... doesn't seem to be directly ocsms app related.

[Tue Feb 10 09:15:16 2015] [error] [client 5.135.110.0] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 5 database is locked' in /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:138\nStack trace:\n#0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(138): PDOStatement->execute(Array)\n#1 /var/www/owncloud/lib/private/db/statementwrapper.php(63): Doctrine\DBAL\Statement->execute(Array)\n#2 /var/www/owncloud/lib/private/db.php(235): OC_DB_StatementWrapper->execute(Array)\n#3 /var/www/owncloud/lib/private/files/cache/cache.php(272): OC_DB::executeAudited('UPDATE `*PREFIX...', Array)\n#4 /var/www/owncloud/lib/private/files/cache/changepropagator.php(63): OC\Files\Cache\Cache->update('681', Array)\n#5 /var/www/owncloud/lib/private/files/cache/updater.php(142): OC\Files\Cache\ChangePropagator->propagateChanges()\n#6 [internal function]: OC\Files\Cache\Updater->__destruct()\n#7 {main}\n\nNext exception 'Doctrine\DBAL\DBALException' with message 'An exception occurred while executing 'UPDATE "oc_filecache in /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php on line 47, referer: https://myserver.net/owncloud/index.php/apps/ocsms/

nerzhul commented 9 years ago

You SQlite database is locked and no, it's not a ocsms issue here, i think you'll need to find the problem with your database, and see if it's related with sync (maybe an error which is mishandled)

Trollken-zz commented 9 years ago

Well, I just did some sync tests right now.

I don't have theses SQL errors anymore.

In Apache, the only logs i got when i start sync are these :


raspberrypi:443 92.103.166.6 - trollken [16/Feb/2015:11:25:56 +0100] "GET /owncloud//index.php/apps/ocsms/get/apiversion?format=json HTTP/1.1" 200 1677 "-" "Android-ownCloud"
raspberrypi:443 92.103.166.6 - trollken [16/Feb/2015:11:25:58 +0100] "GET /owncloud//index.php/apps/ocsms/get/smsidlist?format=json HTTP/1.1" 200 854 "-" "Android-ownCloud"

Then i got the crash...

EDIT : Here is the tables list of my database. Is there something missing for ocsms ?

sqlite> .tables
oc_activity                   oc_group_user               
oc_appconfig                  oc_groups                   
oc_clndr_calendars            oc_jobs                     
oc_clndr_objects              oc_locks                    
oc_clndr_repeat               oc_lucene_status            
oc_clndr_share_calendar       oc_mimetypes                
oc_clndr_share_event          oc_ocsms_config             
oc_contacts_addressbooks      oc_ocsms_smsdatas           
oc_contacts_cards             oc_ocsms_user_datas         
oc_contacts_cards_properties  oc_permissions              
oc_documents_invite           oc_pictures_images_cache    
oc_documents_member           oc_preferences              
oc_documents_op               oc_privatedata              
oc_documents_revisions        oc_properties               
oc_documents_session          oc_share                    
oc_file_map                   oc_share_external           
oc_filecache                  oc_storages                 
oc_files_trash                oc_users                    
oc_gallery_sharing            oc_vcategory                
oc_group_admin                oc_vcategory_to_object 
nerzhul commented 9 years ago

Then, it seems it's in the sync algorithm, after getting the ID list from server, which permits to compare existing messages with ocsms messages... but the algorithm is complex, and a backtrace with logcat would be helpful

Trollken-zz commented 9 years ago

Well, I installed logcat on my smartphone and started sync. Here are the logs :

trollken@debian:~/ownCloud/Perso/Divers/ownsmslogs$ cat 2015-02-16-11-35-40.txt 
02-16 11:35:04.382 I/ActivityManager(2197): START u0 {act=com.android.systemui.recent.action.TOGGLE_RECENTS flg=0x10800000 cmp=com.android.systemui/.recent.RecentsActivity (has extras)} from pid 2331
02-16 11:35:08.887 I/ActivityManager(2197): Start proc fr.unix_experience.owncloud_sms:sync for service fr.unix_experience.owncloud_sms/.sync_adapters.SmsSyncService: pid=6711 uid=10093 gids={50093, 3003, 1028}
02-16 11:35:09.047 W/Trace   (6711): error opening trace file: No such file or directory (2)
02-16 11:35:09.092 I/ActivityManager(2197): Start proc fr.unix_experience.owncloud_sms for content provider fr.unix_experience.owncloud_sms/.providers.SmsDataProvider: pid=6725 uid=10093 gids={50093, 3003, 1028}
02-16 11:35:09.237 D/NetworkUtils(6711): Searching known-servers store at /data/data/fr.unix_experience.owncloud_sms/files/knownServers.bks
02-16 11:35:09.262 D/OwnCloudClient #0(6711): Creating OwnCloudClient
02-16 11:35:09.287 D/OwnCloudClient #0(6711): REQUEST GET /owncloud//index.php/apps/ocsms/get/apiversion
02-16 11:35:09.307 D/AdvancedSslSocketFactory(6711): Creating SSL Socket with remote myserver.com:443, local null:0, params: org.apache.commons.httpclient.params.HttpConnectionParams@4131cca0
02-16 11:35:09.307 D/AdvancedSslSocketFactory(6711):  ... with connection timeout 60000 and socket timeout 60000
02-16 11:35:12.202 D/OCSMSOwnCloudClient(6711): HTTP Request done at try 1
02-16 11:35:12.247 D/SmsSyncAdapter(6711): Server API version: 1
02-16 11:35:12.257 D/OwnCloudClient #0(6711): REQUEST GET /owncloud//index.php/apps/ocsms/get/smsidlist
02-16 11:35:15.482 D/OCSMSOwnCloudClient(6711): HTTP Request done at try 1
02-16 11:35:15.497 D/OCSMSOwnCloudClient(6711): No inbox Sms received from server (doPushRequest, get SMS list)
02-16 11:35:15.497 D/OCSMSOwnCloudClient(6711): No sent Sms received from server (doPushRequest, get SMS list)
02-16 11:35:15.497 D/OCSMSOwnCloudClient(6711): No drafts Sms received from server (doPushRequest, get SMS list)
02-16 11:35:16.832 D/dalvikvm(6711): GC_CONCURRENT freed 2989K, 42% free 4479K/7696K, paused 4ms+2ms, total 49ms
02-16 11:35:16.832 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 28ms
02-16 11:35:16.912 D/dalvikvm(6711): GC_CONCURRENT freed 376K, 39% free 4763K/7696K, paused 2ms+4ms, total 41ms
02-16 11:35:16.987 D/dalvikvm(6711): GC_FOR_ALLOC freed 380K, 35% free 5052K/7696K, paused 34ms, total 34ms
02-16 11:35:16.987 I/dalvikvm-heap(6711): Grow heap (frag case) to 5.674MB for 20680-byte allocation
02-16 11:35:17.057 D/dalvikvm(6711): GC_FOR_ALLOC freed 305K, 32% free 5278K/7720K, paused 36ms, total 36ms
02-16 11:35:17.162 D/dalvikvm(6711): GC_CONCURRENT freed 561K, 27% free 5693K/7720K, paused 4ms+3ms, total 49ms
02-16 11:35:17.162 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 37ms
02-16 11:35:17.287 D/dalvikvm(6711): GC_CONCURRENT freed 633K, 21% free 6173K/7720K, paused 2ms+2ms, total 47ms
02-16 11:35:17.287 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 30ms
02-16 11:35:17.367 D/dalvikvm(6711): GC_FOR_ALLOC freed 242K, 18% free 6357K/7720K, paused 48ms, total 49ms
02-16 11:35:17.512 D/dalvikvm(6711): GC_CONCURRENT freed 737K, 13% free 6901K/7920K, paused 2ms+2ms, total 60ms
02-16 11:35:17.512 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 29ms
02-16 11:35:17.692 D/dalvikvm(6711): GC_CONCURRENT freed 858K, 13% free 7547K/8648K, paused 2ms+2ms, total 76ms
02-16 11:35:17.692 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 50ms
02-16 11:35:17.882 D/dalvikvm(6711): GC_CONCURRENT freed 989K, 13% free 8290K/9508K, paused 2ms+3ms, total 66ms
02-16 11:35:17.882 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 48ms
02-16 11:35:18.117 D/dalvikvm(6711): GC_CONCURRENT freed 1117K, 13% free 9129K/10476K, paused 2ms+3ms, total 78ms
02-16 11:35:18.377 D/dalvikvm(6711): GC_CONCURRENT freed 1146K, 13% free 9997K/11372K, paused 2ms+3ms, total 85ms
02-16 11:35:18.652 D/dalvikvm(6711): GC_CONCURRENT freed 1176K, 12% free 10871K/12276K, paused 2ms+2ms, total 129ms
02-16 11:35:18.652 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 59ms
02-16 11:35:19.017 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 72ms
02-16 11:35:19.327 D/dalvikvm(6711): GC_CONCURRENT freed 1168K, 10% free 12631K/14028K, paused 3ms+3ms, total 125ms
02-16 11:35:19.327 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 104ms
02-16 11:35:20.082 D/dalvikvm(6711): GC_CONCURRENT freed 1167K, 10% free 13513K/14908K, paused 2ms+3ms, total 131ms
02-16 11:35:20.082 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 55ms
02-16 11:35:20.347 D/dalvikvm(6711): GC_CONCURRENT freed 1167K, 9% free 14396K/15792K, paused 2ms+3ms, total 120ms
02-16 11:35:20.637 D/dalvikvm(6711): GC_CONCURRENT freed 1156K, 9% free 15288K/16672K, paused 2ms+3ms, total 128ms
02-16 11:35:20.637 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 37ms
02-16 11:35:20.907 D/dalvikvm(6711): GC_CONCURRENT freed 1182K, 9% free 16154K/17564K, paused 2ms+3ms, total 130ms
02-16 11:35:20.907 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 97ms
02-16 11:35:20.977 D/SmsFetcher(6711): 18601 messages read from content://sms/inbox
02-16 11:35:21.757 D/dalvikvm(6711): GC_CONCURRENT freed 1175K, 8% free 17029K/18432K, paused 1ms+4ms, total 189ms
02-16 11:35:21.757 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 178ms
02-16 11:35:22.062 D/dalvikvm(6711): GC_CONCURRENT freed 1183K, 8% free 17897K/19308K, paused 2ms+3ms, total 152ms
02-16 11:35:22.062 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 92ms
02-16 11:35:22.392 D/dalvikvm(6711): GC_CONCURRENT freed 1190K, 8% free 18758K/20176K, paused 1ms+4ms, total 180ms
02-16 11:35:22.392 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 172ms
02-16 11:35:22.572 V/PhoneStatusBar(2331): setLightsOn(true)
02-16 11:35:22.757 D/dalvikvm(6711): GC_CONCURRENT freed 1174K, 7% free 19634K/21036K, paused 3ms+3ms, total 172ms
02-16 11:35:22.757 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 119ms
02-16 11:35:23.047 D/dalvikvm(6711): GC_CONCURRENT freed 1177K, 7% free 20507K/21912K, paused 2ms+4ms, total 154ms
02-16 11:35:23.047 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 139ms
02-16 11:35:23.382 D/dalvikvm(6711): GC_CONCURRENT freed 1182K, 7% free 21374K/22784K, paused 3ms+3ms, total 162ms
02-16 11:35:23.382 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 148ms
02-16 11:35:23.697 D/dalvikvm(6711): GC_CONCURRENT freed 1196K, 7% free 22227K/23652K, paused 2ms+3ms, total 164ms
02-16 11:35:23.697 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 148ms
02-16 11:35:24.017 D/dalvikvm(6711): GC_CONCURRENT freed 1189K, 6% free 23087K/24504K, paused 2ms+3ms, total 173ms
02-16 11:35:24.017 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 160ms
02-16 11:35:24.387 D/dalvikvm(6711): GC_CONCURRENT freed 1175K, 6% free 23960K/25364K, paused 3ms+4ms, total 179ms
02-16 11:35:24.387 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 165ms
02-16 11:35:24.742 D/dalvikvm(6711): GC_CONCURRENT freed 1168K, 6% free 24840K/26236K, paused 2ms+3ms, total 186ms
02-16 11:35:24.742 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 170ms
02-16 11:35:25.082 D/dalvikvm(6711): GC_CONCURRENT freed 1172K, 6% free 25715K/27116K, paused 2ms+4ms, total 191ms
02-16 11:35:25.082 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 175ms
02-16 11:35:25.527 D/dalvikvm(6711): GC_CONCURRENT freed 1177K, 6% free 26586K/27992K, paused 1ms+4ms, total 286ms
02-16 11:35:25.527 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 272ms
02-16 11:35:26.422 D/dalvikvm(6711): GC_CONCURRENT freed 1170K, 5% free 27465K/28864K, paused 1ms+4ms, total 254ms
02-16 11:35:26.422 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 240ms
02-16 11:35:26.772 D/dalvikvm(6711): GC_CONCURRENT freed 1160K, 5% free 28355K/29744K, paused 1ms+4ms, total 211ms
02-16 11:35:26.772 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 199ms
02-16 11:35:27.137 D/dalvikvm(6711): GC_CONCURRENT freed 1166K, 5% free 29238K/30632K, paused 1ms+4ms, total 216ms
02-16 11:35:27.137 D/dalvikvm(6711): WAIT_FOR_CONCURRENT_GC blocked 203ms
02-16 11:35:27.152 D/SmsFetcher(6711): 17261 messages read from content://sms/sent
02-16 11:35:27.482 D/dalvikvm(6711): GC_FOR_ALLOC freed 590K, 6% free 29532K/31232K, paused 212ms, total 212ms
02-16 11:35:27.772 D/dalvikvm(6711): GC_FOR_ALLOC freed 575K, 6% free 29787K/31664K, paused 209ms, total 209ms
02-16 11:35:27.772 I/dalvikvm-heap(6711): Grow heap (frag case) to 30.441MB for 662266-byte allocation
02-16 11:35:27.887 D/dalvikvm(6520): GC_CONCURRENT freed 561K, 47% free 6325K/11780K, paused 2ms+9ms, total 38ms
02-16 11:35:28.097 D/dalvikvm(6711): GC_FOR_ALLOC freed 517K, 8% free 30013K/32312K, paused 258ms, total 258ms
02-16 11:35:28.397 D/dalvikvm(6711): GC_FOR_ALLOC freed 768K, 7% free 30352K/32312K, paused 209ms, total 209ms
02-16 11:35:28.402 I/dalvikvm-heap(6711): Grow heap (frag case) to 31.783MB for 1490086-byte allocation
02-16 11:35:28.757 D/dalvikvm(6711): GC_FOR_ALLOC freed 1149K, 9% free 30860K/33768K, paused 210ms, total 210ms
02-16 11:35:28.757 I/dalvikvm-heap(6711): Grow heap (frag case) to 32.989MB for 2235124-byte allocation
02-16 11:35:29.047 D/dalvikvm(6711): GC_CONCURRENT freed 1690K, 13% free 31621K/35952K, paused 9ms+11ms, total 287ms
02-16 11:35:29.347 D/dalvikvm(6711): GC_FOR_ALLOC freed 26K, 13% free 31623K/35952K, paused 278ms, total 279ms
02-16 11:35:29.357 I/dalvikvm-heap(6711): Grow heap (frag case) to 34.800MB for 3352682-byte allocation
02-16 11:35:29.787 D/dalvikvm(6711): GC_CONCURRENT freed 2552K, 17% free 32766K/39228K, paused 16ms+20ms, total 428ms
02-16 11:35:30.102 D/dalvikvm(6711): GC_FOR_ALLOC freed 22K, 17% free 32767K/39228K, paused 296ms, total 297ms
02-16 11:35:30.112 I/dalvikvm-heap(6711): Grow heap (frag case) to 37.516MB for 5029018-byte allocation
02-16 11:35:30.372 D/dalvikvm(6711): GC_CONCURRENT freed 3469K, 22% free 34432K/44140K, paused 17ms+11ms, total 262ms
02-16 11:35:30.932 D/dalvikvm(6711): GC_FOR_ALLOC freed 395K, 22% free 34482K/44140K, paused 237ms, total 237ms
02-16 11:35:30.937 I/dalvikvm-heap(6711): Grow heap (frag case) to 41.589MB for 7543522-byte allocation
02-16 11:35:31.222 D/dalvikvm(6711): GC_CONCURRENT freed 5080K, 3% free 36965K/38004K, paused 33ms+10ms, total 285ms
02-16 11:35:32.027 D/dalvikvm(6711): GC_FOR_ALLOC freed 720K, 3% free 37068K/38020K, paused 238ms, total 238ms
02-16 11:35:32.042 I/dalvikvm-heap(6711): Grow heap (frag case) to 47.711MB for 11315278-byte allocation
02-16 11:35:32.612 D/dalvikvm(6711): GC_CONCURRENT freed 7649K, 17% free 40792K/49072K, paused 33ms+13ms, total 572ms
02-16 11:35:33.787 D/dalvikvm(6711): GC_FOR_ALLOC freed 1074K, 17% free 40941K/49072K, paused 245ms, total 245ms
02-16 11:35:33.787 I/dalvikvm-heap(6711): Forcing collection of SoftReferences for 16972912-byte allocation
02-16 11:35:34.047 D/dalvikvm(6711): GC_BEFORE_OOM freed 9K, 17% free 40932K/49072K, paused 262ms, total 263ms
02-16 11:35:34.047 E/dalvikvm-heap(6711): Out of memory on a 16972912-byte allocation.
02-16 11:35:34.047 I/dalvikvm(6711): "SyncAdapterThread-1" prio=5 tid=11 RUNNABLE
02-16 11:35:34.047 I/dalvikvm(6711):   | group="main" sCount=0 dsCount=0 obj=0x412f81c8 self=0x52f543e8
02-16 11:35:34.047 I/dalvikvm(6711):   | sysTid=6724 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1391746672
02-16 11:35:34.047 I/dalvikvm(6711):   | state=R schedstat=( 10394200454 2959536511 5502 ) utm=1014 stm=24 core=1
02-16 11:35:34.047 I/dalvikvm(6711):   at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:~94)
02-16 11:35:34.047 I/dalvikvm(6711):   at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:132)
02-16 11:35:34.047 I/dalvikvm(6711):   at java.lang.StringBuilder.append(StringBuilder.java:124)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONStringer.string(JSONStringer.java:344)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONStringer.value(JSONStringer.java:252)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONObject.writeTo(JSONObject.java:667)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONStringer.value(JSONStringer.java:237)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONArray.writeTo(JSONArray.java:572)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONStringer.value(JSONStringer.java:233)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONObject.writeTo(JSONObject.java:667)
02-16 11:35:34.047 I/dalvikvm(6711):   at org.json.JSONObject.toString(JSONObject.java:636)
02-16 11:35:34.047 I/dalvikvm(6711):   at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.createJSONRequestEntity(OCSMSOwnCloudClient.java:252)
02-16 11:35:34.047 I/dalvikvm(6711):   at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.createPushRequest(OCSMSOwnCloudClient.java:218)
02-16 11:35:34.047 I/dalvikvm(6711):   at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.doPushRequestV1(OCSMSOwnCloudClient.java:151)
02-16 11:35:34.047 I/dalvikvm(6711):   at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.doPushRequest(OCSMSOwnCloudClient.java:89)
02-16 11:35:34.052 I/dalvikvm(6711):   at fr.unix_experience.owncloud_sms.sync_adapters.SmsSyncAdapter.onPerformSync(SmsSyncAdapter.java:67)
02-16 11:35:34.057 I/dalvikvm(6711):   at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
02-16 11:35:34.057 I/dalvikvm(6711): 
02-16 11:35:34.062 W/dalvikvm(6711): threadid=11: thread exiting with uncaught exception (group=0x4106c930)
02-16 11:35:34.062 E/AndroidRuntime(6711): FATAL EXCEPTION: SyncAdapterThread-1
02-16 11:35:34.062 E/AndroidRuntime(6711): java.lang.OutOfMemoryError
02-16 11:35:34.062 E/AndroidRuntime(6711):  at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:94)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:132)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at java.lang.StringBuilder.append(StringBuilder.java:124)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONStringer.string(JSONStringer.java:344)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONStringer.value(JSONStringer.java:252)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONObject.writeTo(JSONObject.java:667)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONStringer.value(JSONStringer.java:237)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONArray.writeTo(JSONArray.java:572)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONStringer.value(JSONStringer.java:233)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONObject.writeTo(JSONObject.java:667)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at org.json.JSONObject.toString(JSONObject.java:636)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.createJSONRequestEntity(OCSMSOwnCloudClient.java:252)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.createPushRequest(OCSMSOwnCloudClient.java:218)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.doPushRequestV1(OCSMSOwnCloudClient.java:151)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at fr.unix_experience.owncloud_sms.engine.OCSMSOwnCloudClient.doPushRequest(OCSMSOwnCloudClient.java:89)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at fr.unix_experience.owncloud_sms.sync_adapters.SmsSyncAdapter.onPerformSync(SmsSyncAdapter.java:67)
02-16 11:35:34.062 E/AndroidRuntime(6711):  at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
02-16 11:35:36.357 I/Process (6711): Sending signal. PID: 6711 SIG: 9
02-16 11:35:36.652 I/ActivityManager(2197): Process fr.unix_experience.owncloud_sms:sync (pid 6711) has died.
nerzhul commented 9 years ago

Oh ! outofMemoryError.... it seems your phone hadn't so many memory. How many memory do you have and how many available before sync ?

Trollken-zz commented 9 years ago

790MB max, and before sync, it's around 350/400 MB free

Maybe is this related to the 25 000 sms i have to sync ? :).

nerzhul commented 9 years ago

maybe, but those SMS will not take 350MB of memory.... that's very strange. I think i must look at memory improvements then.

Trollken-zz commented 9 years ago

I just started sync with a RAM monitor app running. When app crashes, I still got 315MB free memory.

Is there a way to check the memory limit given to the dalvik vm ?

nerzhul commented 9 years ago

very strange. I think it's related to StringBuilder java object then

Trollken-zz commented 9 years ago

So, I kept looking for some information.

It looks like the default dalvik heap size for galaxy S2 is set to 48MB.

 dalvik.vm.heapgrowthlimit=48m

When i start sync and check memory usage, i can see it going from 350MB free to 300MB, and then crash. Seems definitly related.

Anyway, thks for your work and reactivity :-).

nerzhul commented 9 years ago

then the memory is limited.. We need an API improvement for such devices

enoch85 commented 9 years ago

@nerzhul You just released 0.18.2 and this has the milestone 0.18. It feels like you don't work on this project as much as needed. At the same time you charge people in Play Store to get the app.

Sorry for OT but I think it's a shame that you don't fix bugs and enhance the app as expected.

nerzhul commented 9 years ago

Daniel, i was a bit busy these days but i will be on holidays next month and will work on new features.

nerzhul commented 9 years ago

@enoch85 working on it this evening. The memory problem is very very anoying because it depends on phone constructors...

nerzhul commented 9 years ago

For this issue, it will be fixed in next release by adding an option to reduce data sent per sync to the server. This will permit app to send datas per package instead of trying sending all datas in one time and use too many memory.