karmapa / AdarshaIos

📱 Tibetan sutra reader iOS app
GNU General Public License v3.0
5 stars 2 forks source link

全文檢索輸入頁碼後,點搜尋結果,閃退 #69

Open chiehan1 opened 8 years ago

chiehan1 commented 8 years ago

例如輸入 57.3b 下方出現結果 點結果要進入內文時 閃退

kmsheng commented 8 years ago

screen shot 2016-01-14 at 2 35 40 pm

kmsheng commented 8 years ago

@yapcheahshen 請參考上圖協助修正, ksa 在 ios 只要 q 有代入特殊字元, 例如 小數點 ( . ), 減號 ( - ) 就會直接 crash 掉

kmsheng commented 8 years ago

跟 node.js 無關 圖片上寫的是 ios native module 噴出來的錯誤 Exception '-NsNull objectAtIndexedSubscript:]: unrecognized seletor sent to instance 0x102a76af0' was thrown while invoking mergePostings on target KsanaFileSystem with params

yap cheah shen notifications@github.com 於 2016年1月14日 週四 下午10:15寫道:

can you repeat the problem in node.js ?

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171654577.

kmsheng commented 8 years ago

剛剛測過, 如果是 pure node.js 環境沒這問題

Kuan Min Sheng kmsh3ng@gmail.com 於 2016年1月14日 週四 下午10:42寫道:

跟 node.js 無關 圖片上寫的是 ios native module 噴出來的錯誤 Exception '-NsNull objectAtIndexedSubscript:]: unrecognized seletor sent to instance 0x102a76af0' was thrown while invoking mergePostings on target KsanaFileSystem with params

yap cheah shen notifications@github.com 於 2016年1月14日 週四 下午10:15寫道:

can you repeat the problem in node.js ?

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171654577.

yapcheahshen commented 8 years ago

ok,我再看看

2016-01-14 22:46 GMT+08:00 kmsheng notifications@github.com:

剛剛測過, 如果是 pure node.js 環境沒這問題

Kuan Min Sheng kmsh3ng@gmail.com 於 2016年1月14日 週四 下午10:42寫道:

跟 node.js 無關 圖片上寫的是 ios native module 噴出來的錯誤 Exception '-NsNull objectAtIndexedSubscript:]: unrecognized seletor sent to instance 0x102a76af0' was thrown while invoking mergePostings on target KsanaFileSystem with params

yap cheah shen notifications@github.com 於 2016年1月14日 週四 下午10:15寫道:

can you repeat the problem in node.js ?

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171654577.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171661587.

yapcheahshen commented 8 years ago

https://github.com/ksanaforge/ksana-search/tree/hotfix_mergepostings_invalidsearch 先開一個hotfix_mergepostings_invalidsearch 的 branch 請試試。

regards, yap

2016-01-14 22:47 GMT+08:00 Yap yapcheahshen@gmail.com:

ok,我再看看

2016-01-14 22:46 GMT+08:00 kmsheng notifications@github.com:

剛剛測過, 如果是 pure node.js 環境沒這問題

Kuan Min Sheng kmsh3ng@gmail.com 於 2016年1月14日 週四 下午10:42寫道:

跟 node.js 無關 圖片上寫的是 ios native module 噴出來的錯誤 Exception '-NsNull objectAtIndexedSubscript:]: unrecognized seletor sent to instance 0x102a76af0' was thrown while invoking mergePostings on target KsanaFileSystem with params

yap cheah shen notifications@github.com 於 2016年1月14日 週四 下午10:15寫道:

can you repeat the problem in node.js ?

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171654577>.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171661587.

kmsheng commented 8 years ago

@yapcheahshen 升級後炸了啊, 我 ksana-search 會一直停在 329db65, 是因為一升上去就爆炸

screen shot 2016-01-15 at 4 41 43 pm

kmsheng commented 8 years ago

@yapcheahshen 這個 Cannot set property 'posting' of undefined 是在搜尋框輸入文字時發生的

yapcheahshen commented 8 years ago

可否將所有呼叫ksa ,以及各種可能會出錯的查詢或動作, 寫成一些簡單的 react native components ? 不需要人工輸入,在componentDidMount 中呼叫 ksa , render 只簡單地秀執行成功或失敗。

除了react native init 的module 以及ksana-* 之外,不要有其他的dependencies。 單獨放到這裡: https://github.com/ksanaforge/ksa-testsuite/tree/master/jiangkangyur

我也會陸續加。

regards, yap

2016-01-15 16:45 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 這個 Cannot set property 'posting' of undefined 是在搜尋框輸入文字時發生的

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171903519.

kmsheng commented 8 years ago

要我寫是可以, 為什麼 copyright 是 Ksana Forge? https://github.com/ksanaforge/ksa-testsuite/blob/master/LICENSE#L1

yap cheah shen notifications@github.com 於 2016年1月15日 週五 下午8:55寫道:

可否將所有呼叫ksa ,以及各種可能會出錯的查詢或動作, 寫成一些簡單的 react native components ? 不需要人工輸入,在componentDidMount 中呼叫 ksa , render 只簡單地秀執行成功或失敗。

除了react native init 的module 以及ksana-* 之外,不要有其他的dependencies。 單獨放到這裡: https://github.com/ksanaforge/ksa-testsuite/tree/master/jiangkangyur

我也會陸續加。

regards, yap

2016-01-15 16:45 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 這個 Cannot set property 'posting' of undefined 是在搜尋框輸入文字時發生的

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171903519.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171952890.

yapcheahshen commented 8 years ago

ksa-testsuite是用ISC 授權,和BSD相似,比GPL寬鬆得多。 你要放在kmsheng 底下也無妨呀。

kmsheng notifications@github.com 於 2016年1月15日 下午9:29 寫道:

要我寫是可以, 為什麼 copyright 是 Ksana Forge? https://github.com/ksanaforge/ksa-testsuite/blob/master/LICENSE#L1

yap cheah shen notifications@github.com 於 2016年1月15日 週五 下午8:55寫道:

可否將所有呼叫ksa ,以及各種可能會出錯的查詢或動作, 寫成一些簡單的 react native components ? 不需要人工輸入,在componentDidMount 中呼叫 ksa , render 只簡單地秀執行成功或失敗。

除了react native init 的module 以及ksana-* 之外,不要有其他的dependencies。 單獨放到這裡: https://github.com/ksanaforge/ksa-testsuite/tree/master/jiangkangyur

我也會陸續加。

regards, yap

2016-01-15 16:45 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 這個 Cannot set property 'posting' of undefined 是在搜尋框輸入文字時發生的

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171903519>.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171952890.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-171962128.

kmsheng commented 8 years ago

@yapcheahshen https://github.com/karmapa/ksaReactNativeTestSuite

yapcheahshen commented 8 years ago

https://github.com/ksanaforge/ksana-search/commits/hotfix_jiangkangyur_dash_crash

我查出問題了。 之前的hotfix 把正在實作中的功能放進去 用這個branch 應該ok,在mac os x 測過了。

2016-01-16 0:21 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen https://github.com/karmapa/ksaReactNativeTestSuite

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172005288.

kmsheng commented 8 years ago

@yapcheahshen 請協助修正錯誤 Cannot set property 'posting' of undefined https://github.com/karmapa/ksaReactNativeTestSuite/commit/2a7f72b6a7028d66bfc7d6ea9995608c3155f2c1

yapcheahshen commented 8 years ago

https://github.com/ksanaforge/ksana-search/commit/6357fe15d9c686b7aab177cb4aca4202bf3dc29a 這個修正可以解決 cannot set property 'posting' of undefined 的問題。

kmsheng commented 8 years ago

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

yapcheahshen commented 8 years ago

是用Master branch 嗎

從我的 iPad 傳送

kmsheng notifications@github.com 於 2016年1月18日 上午12:36 寫道:

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

— Reply to this email directly or view it on GitHub.

kmsheng commented 8 years ago

不是,是用 hotfix_jiangkangyur_dash_crash yap cheah shen notifications@github.com於 2016年1月18日 週一,上午10:07寫道:

是用Master branch 嗎

從我的 iPad 傳送

kmsheng notifications@github.com 於 2016年1月18日 上午12:36 寫道:

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172407843.

yapcheahshen commented 8 years ago

我的意思是其他的module, ksana-jsonrom , ksana-search , ksana-simple-api

2016-01-18 12:28 GMT+08:00 kmsheng notifications@github.com:

不是,是用 hotfix_jiangkangyur_dash_crash yap cheah shen notifications@github.com於 2016年1月18日 週一,上午10:07寫道:

是用Master branch 嗎

從我的 iPad 傳送

kmsheng notifications@github.com 於 2016年1月18日 上午12:36 寫道:

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172407843.

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421469.

kmsheng commented 8 years ago

https://github.com/karmapa/ksaReactNativeTestSuite 裡的 package.json 上有寫啊 yap cheah shen notifications@github.com於 2016年1月18日 週一,下午12:31寫道:

我的意思是其他的module, ksana-jsonrom , ksana-search , ksana-simple-api

2016-01-18 12:28 GMT+08:00 kmsheng notifications@github.com:

不是,是用 hotfix_jiangkangyur_dash_crash yap cheah shen notifications@github.com於 2016年1月18日 週一,上午10:07寫道:

是用Master branch 嗎

從我的 iPad 傳送

kmsheng notifications@github.com 於 2016年1月18日 上午12:36 寫道:

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172407843>.

— Reply to this email directly or view it on GitHub <https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421469 .

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421688.

yapcheahshen commented 8 years ago

我直接copy index.ios.js 到我開環境。 因為重裝 node_modules , react-native 很慢,又要多佔一兩萬個檔案。

2016-01-18 12:34 GMT+08:00 kmsheng notifications@github.com:

https://github.com/karmapa/ksaReactNativeTestSuite 裡的 package.json 上有寫啊 yap cheah shen notifications@github.com於 2016年1月18日 週一,下午12:31寫道:

我的意思是其他的module, ksana-jsonrom , ksana-search , ksana-simple-api

2016-01-18 12:28 GMT+08:00 kmsheng notifications@github.com:

不是,是用 hotfix_jiangkangyur_dash_crash yap cheah shen notifications@github.com於 2016年1月18日 週一,上午10:07寫道:

是用Master branch 嗎

從我的 iPad 傳送

kmsheng notifications@github.com 於 2016年1月18日 上午12:36 寫道:

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172407843>.

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421469 .

— Reply to this email directly or view it on GitHub <https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421688 .

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421858.

yapcheahshen commented 8 years ago

ok, 我看到問題了,是模組之間不匹配造成的, 將ksana-analyzer, ksana-jsonrom, ksana-search , ksana-simple-api 是互相有關連的,不能只升其中一個, 其餘的跟上master branch 即可解決。

Yap yapcheahshen@gmail.com 於 2016年1月18日 下午12:53 寫道:

我直接copy index.ios.js 到我開環境。 因為重裝 node_modules , react-native 很慢,又要多佔一兩萬個檔案。

2016-01-18 12:34 GMT+08:00 kmsheng notifications@github.com:

https://github.com/karmapa/ksaReactNativeTestSuite 裡的 package.json 上有寫啊 yap cheah shen notifications@github.com於 2016年1月18日 週一,下午12:31寫道:

我的意思是其他的module, ksana-jsonrom , ksana-search , ksana-simple-api

2016-01-18 12:28 GMT+08:00 kmsheng notifications@github.com:

不是,是用 hotfix_jiangkangyur_dash_crash yap cheah shen notifications@github.com於 2016年1月18日 週一,上午10:07寫道:

是用Master branch 嗎

從我的 iPad 傳送

kmsheng notifications@github.com 於 2016年1月18日 上午12:36 寫道:

@yapcheahshen 沒有啊, 我更新了還是看到 cannot set property 'posting' of undefined

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172407843 .

— Reply to this email directly or view it on GitHub < https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421469 .

— Reply to this email directly or view it on GitHub <https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421688 .

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172421858.

kmsheng commented 8 years ago

@yapcheahshen 我剛測過現在的 master 沒問題,可以再請你補上 tag 嗎 ?

yapcheahshen commented 8 years ago

補了ksana-search@1.5.5

2016-01-18 14:37 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 我剛測過現在的 master 沒問題,可以再請你補上 tag 嗎 ?

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172439620.

kmsheng commented 8 years ago

@yapcheahshen 你有推上 remote 嗎 ?

yapcheahshen commented 8 years ago

剛網路斷線。 已push npmjs 和git

2016-01-18 15:16 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 你有推上 remote 嗎 ?

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172448202.

kmsheng commented 8 years ago

@yapcheahshen 問題還是很多, 我在目前的 view 加了一個 TextInput 輸入 -1 會得到 Exception '-[NSTaggedPointerString objectAtIndexedSubscript:]: unrecognized selector sent to instance 0xa000000000000651' was thrown while invoking mergePostings on target KsanaFileSystem with params (

kmsheng commented 8 years ago

@yapcheahshen https://github.com/karmapa/ksaReactNativeTestSuite

kmsheng commented 8 years ago

@yapcheahshen 輸入過快的話會得到 nested open kdb!! jiangkangyur.kdb

yapcheahshen commented 8 years ago

對,因為 open/search/fetch 動作未完成之前,就再呼叫ksa 速度會變得很慢,所以現在不允許重複呼叫。

1.6.0 版以後,會加快開檔速度十倍以上。這種情況會改善很多。

2016-01-18 16:15 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 輸入過快的話會得到 nested open kdb!! jiangkangyur.kdb

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172458723.

kmsheng commented 8 years ago

@yapcheahshen 那也應該是從 callback 丟 err 出來吧? 現在是直接 crash 耶

yapcheahshen commented 8 years ago

大概是某個地方直接throw 了。我再查查看。

2016-01-18 16:32 GMT+08:00 kmsheng notifications@github.com:

@yapcheahshen https://github.com/yapcheahshen 那也應該是從 callback 丟 err 出來吧? 現在是直接 crash 耶

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-172461868.

kmsheng commented 8 years ago

blocked by https://github.com/ksanaforge/ksana-simple-api/issues/5

kmsheng commented 8 years ago

@yapcheahshen 這個 issue 一共有兩個問題, 一個是 call 太快會 crash, 另一個是輸入不該輸入的字元會 crash, 目前我先把常見的錯誤案例寫在 https://github.com/karmapa/AdarshaIos/blob/master/src/helpers/isCrashStr.js

kmsheng commented 8 years ago

@yapcheahshen 最理想的修正方式還是請你找出為什麼輸入不該輸入的字元會 trigger mergePostings error, 不然這樣子寫這種 workaround 像是大海撈針

yapcheahshen commented 8 years ago

理論上沒有任何的字元應該觸發mergePostings error 用戶的任何輸入都只有兩種結果,一是找到,二是找不到。

kmsheng notifications@github.com 於 2016年1月22日 下午7:46 寫道:

@yapcheahshen https://github.com/yapcheahshen 最理想的修正方式還是請你找出為什麼輸入不該輸入的字元會 trigger mergePostings error, 不然這樣子寫這種 workaround 像是大海撈針

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-173895240.

chiehan1 commented 8 years ago

現在點搜尋結果似乎是不太會閃退了,但有時在搜尋欄輸入字元時,還是會閃退

kmsheng commented 8 years ago

搜哪個字閃退要記錄下來

chiehan1 notifications@github.com 於 2016年1月29日 週五 下午3:22寫道:

現在點搜尋結果似乎是不太會閃退了,但有時在搜尋欄輸入字元時,還是會閃退

— Reply to this email directly or view it on GitHub https://github.com/karmapa/AdarshaIos/issues/69#issuecomment-176616500.

chiehan1 commented 8 years ago

目前還沒辦法複製,通常重啟以後輸入相同的搜尋條件,又都不會閃退