Qksms: QKSMS3 beta 6 crashes on MMS (and no MMS is being received)

Created on 14 Mar 2018  路  11Comments  路  Source: moezbhatti/qksms

(Hey moezbhatti, long time no chat!)

I'm running on Android 7.0 on an LG G5.

Upon attempting to send an MMS message, QKSMS3 crashes.
I've also noticed that I haven't received any MMS messages until I restore QKSMS 2.7.3 (or other sms app), and see the messages. They do not show up new, as they are in the message database.

Here's an adb logcat of QKSMS from start, creating a new message, attaching an image, and (attempting) sending a message.
https://gist.github.com/MyNameIsCosmo/4f2e515a372b456bce8d6f5cd2d66c85

EDIT:
This happens on beta 5, 4, and 3 as I've tested.

bug

All 11 comments

+1

Experiencing the same issue

Here is the log

1) http://i63.tinypic.com/2ym8x84.png
2) http://i64.tinypic.com/29ep4w5.png
3) http://i64.tinypic.com/fyzyt.jpg

It's good to see you again @MyNameIsCosmo !

This is currently the top issue in terms of volume, and it seems to only affect users on LG devices running Android 7.x

I haven't been able to reproduce it myself. The issue could be the result of a number of different things, so I may end up needing to buy a G5 so I can get to the bottom of this. Definitely needs to be fixed before I can release 3.0

@MyNameIsCosmo would you be comfortable doing some tinkering? If so I can list all the things I think _might_ fix the issue but am just not able to personally test

Sure, I'll set up my environment tonight and trace the error back to see what's up.

I have a T-Mobile LG G5 that needs a screen replaced. If you can make good use of it, I can fix it up, flash stock on it, and ship it your way.

I found that after sending/receiving MMS, and upon crash, you can go to Settings > Sync Messages to retrieve the sent and received messages as well as view them within QKSMS.
Upon further inspection (logging what CursorToMessage.map() returned), mms messages seemed to be classified as sms types, hence throwing the couldn't find column 'blah' errors

I'm not too sure how to fix this currently, but wanted to document it before digging in further.

The two files to look at are qksms/src/main/java/common/util/SyncManager.kt (line 144) and qksms/src/main/java/data/mapper/CursorToMessage.kt (line 49).

Making sure Mms.SUBJECT is prioritized over Sms.ADDRESS in CursorToMessage.kt fixed the issue, however I'm not sure if this has any consequences with, say, group messages.

diff --git a/qksms/src/main/java/data/mapper/CursorToMessage.kt b/qksms/src/main/java/data/mapper/CursorToMessage.kt
index da2a10ba..d66fb651 100644
--- a/qksms/src/main/java/data/mapper/CursorToMessage.kt
+++ b/qksms/src/main/java/data/mapper/CursorToMessage.kt
@@ -42,11 +42,13 @@ class CursorToMessage @Inject constructor(
         val cursor = from.first
         val columnsMap = from.second

         return Message().apply {
             type = when {
                 cursor.getColumnIndex(MmsSms.TYPE_DISCRIMINATOR_COLUMN) != -1 -> cursor.getString(columnsMap.msgType)
-                cursor.getColumnIndex(Sms.ADDRESS) != -1 -> "sms"
                 cursor.getColumnIndex(Mms.SUBJECT) != -1 -> "mms"
+                cursor.getColumnIndex(Sms.ADDRESS) != -1 -> "sms"
                 else -> "unknown"
             }

@@ -179,4 +181,4 @@ class CursorToMessage @Inject constructor(
             -1
         }
     }
-}
\ No newline at end of file
+}

Sorry for the delayed response - I've been on vacation these last couple days!

Really appreciate the offer to send over the phone! But now that the issue has been resolved I likely wouldn't end up needing it :)

This fix seems to make sense

In the docs there seems to be this field under Mms.Addr: https://developer.android.com/reference/android/provider/Telephony.Mms.Addr.html#ADDRESS

When quering the message databse, this field doesn't seem to return anything in my tests. It seems that on some phones it actually does appear, which made that function think that the message was an SMS (since it assumed only SMS could support that column)

I know for certain that "Subject" is certainly not supported in the SMS database however, so this should fix the issue without any consequence

Fixed by 53b3270c44864aa92ff0998d57a311ab01ecebc7

Since I know cosmo has an LG device, seems like the issue is fixed with the crashing but now I can't get an mms to send regardless of attachment size. Receiving works just fine.

@ThatAdonis
If you are on Linux/Mac, could you do the following:

  1. Install Beta 7
  2. Open up a terminal/cmd prompt and type in the following command:
    console adb logcat | grep -F "`adb shell ps | grep QK | cut -c10-15`" >> qksms.log
  3. Open QKSMS

    1. Create a new conversation

    2. Attach an image

    3. (try to) send the mms

  4. Ctrl+C the adb logcat in the terminal
  5. Paste the contents of qksms.log on gist.github.com or pastebin.com and drop a link in this issue

EDIT:
You can do this from an Android phone using an app such as CatLog if you have root. LogCat (No Root) may work.

  1. Install and open CatLog/LogCat
  2. Clear the log
  3. Open QKSMS

    1. Create a new conversation

    2. Attach an image

    3. (try to) send the mms

  4. Go back to CatLog/LogCat

    1. If using CatLog, filter for "QKSMS" and then save



      • I'm not sure if saving filtered results works



    2. If using LogCat, export the entire log (sharing) and share it privately.

  5. Paste the contents of the log on gist.github.com or pastebin.com and drop a link in this issue

Sorry haven't had the time to set up adb on my new computer. Let me know if more is needed https://gist.github.com/ThatAdonis/ab5e7be4d917b4afb32aab51f5d36d68
also have a full and seperate logcat in case the whole info was not shown with the qksms filter https://gist.github.com/ThatAdonis/e440624062112f897cfa9007cd6b9819

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BastianInuk picture BastianInuk  路  3Comments

xavihernandez picture xavihernandez  路  4Comments

phileastv picture phileastv  路  4Comments

xavihernandez picture xavihernandez  路  4Comments

gabkomarnicki picture gabkomarnicki  路  5Comments