Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1900] Application Events: Close, Resume, Pause - Pause never fired

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-03-13T12:14:20.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsiOS
Labelsreported-1.4.0
ReporterLars Schwarz
AssigneeStephen Tramer
Created2011-04-15T03:05:04.000+0000
Updated2012-03-14T10:05:32.000+0000

Description

To me it seems like the pause event is never fired. The only event fired is the resume event. Close only seems to be fired when the UIBackgroundModes have been set.
Tested using iOS SDK 4.1, Titanium SDK 1.4.0 on iPhone 3GS.

Comments

  1. hal 2011-04-15

    Assigning to Ralf for triage

  2. Jan Stanzel 2012-02-22

    I think I am seeing the same problem. Titanium kind of fires the pause event (I'm seeing the "[DEBUG] fire app event: pause" from AppModule.m) but then the actual pause listeners in my code don't get called. So far I've been able to trace it throughout AppModule.m and then TiHost.m, there it still calls fireEvent for all pause listeners. After that, I'm not sure where I have to look. Sometimes, though (maybe 5% of the time) the pause listeners actually get called. When not, they'll get called upon resume (before the resume listeners get called). This is a problem since I'm trying to set a flag whether the app paused correctly or some crash occurred, so it's pretty important to me. The workaround so far was to disable pausing the app via the Info.plist, but that's not really a good solution. Any ideas what might cause this?
  3. Stephen Tramer 2012-02-22

    This is a well-known issue that has to do with internal threading interactions. We're working on resolving it. There is a build which fixes this issue but we are in the process of backing out the change due to performance hits.
  4. Stephen Tramer 2012-03-12

    Part of the PR #1597 omnibus (https://github.com/appcelerator/titanium_mobile/pull/1597) wrt "pause" which is the only event that is no longer correctly triggered.
  5. Blain Hamon 2012-03-13

    Combined pull #1597 + #1645
  6. Wilson Luu 2012-03-14

    Closing bug. Verified fix in TIMOB-1542 and TIMOB-4538.

JSON Source