Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonic初始化异常 #182

Closed
hongqinghe opened this issue Dec 18, 2017 · 8 comments
Closed

sonic初始化异常 #182

hongqinghe opened this issue Dec 18, 2017 · 8 comments

Comments

@hongqinghe
Copy link

What steps will reproduce the problem?
该问题的重现步骤是什么?
1.打开页面的时候出现 sonicSession为空 几率性事件,多为第一次点击
if (null != sonicSession) {
sonicSession.bindClient(sonicSessionClient = new SonicSessionClientImpl());
} else {
// this only happen when a same sonic session is already running,
// u can comment following codes to feedback as a default mode.
// throw new UnknownError("create session fail!");
Toast.makeText(this, "create sonic session fail!", Toast.LENGTH_LONG).show();
}
2:我在这里的操作是出现初始化异常的时候将错误信息抛出,导致程序奔溃

What is the expected output? What do you see instead?
你期待的结果是什么?实际看到的又是什么?
什么情况会造成这种初始化异常,当让我想拦截这种异常,使程序稳定

What version of the product are you using? On what operating system?
你正在使用产品的哪个版本?在什么操作系统上?
使用的是2.0版本,在1.0版本好像没出现过,android系统

Please provide any additional information below.
如果有的话,请在下面提供更多信息。

@marlonlu
Copy link
Contributor

"create session fail!"是指当前SonicSession创建失败,一般多见于上一个SonicSession还没destroy完成 ,具体你可以断点看看

@hongqinghe
Copy link
Author

你好 ,这种错误一般都是发生在开app刚进入的时候,而且发生的几率很小,我没办法捕捉到

@marlonlu
Copy link
Contributor

若再次出现,麻烦提供下完整的log

@hongqinghe
Copy link
Author

好的!

@hongqinghe
Copy link
Author

12-19 20:11:45.400 19095 19095 I SonicSdk_SonicDBHelper: onUpgrade start, from -1 to 1.
12-19 20:11:45.400 19095 19095 I SonicSdk_SonicDBHelper: onUpgrade finish, cost 1ms.
12-19 20:11:45.406 19095 19095 E SonicSdk_SonicEngine: createSession fail for sonic service is unavailable!

这是我刚才捕捉到的日志信息,发现是isSonicAvailable()校验失败,同样是偶发性的

@marlonlu
Copy link
Contributor

嗯 这里是安装时提示数据库升级,这时候我们避免升级错误而强制当前创建SonicSession失败,让页面直连打开。

@hongqinghe
Copy link
Author

那就是现在的版本可以不用抛出这个异常,然后手动将数据 库升级就可以了吧

@liangsaifei
Copy link

第一次初始化,百分百出现。。后面再进来就没事儿了。看来无解。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants