cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clayton Grassick (JIRA)" <>
Subject [jira] [Commented] (CB-6761) Calling a function the first time no callbacks are being executed
Date Mon, 02 Jun 2014 18:48:03 GMT


Clayton Grassick commented on CB-6761:

Aha: If the initial actual online/offline state is false, then the following sequence happens:

reset puts the online flag = false and the actual online state to true.

This triggers an online event, which calls popAndEncode and thus notifyOfFlush(true).

This sets online flag = true, which means that no events will ever be triggered again.

A safer way might be to set online true if there are messages pending, and false if not. reset
would set it to offline. Then only listen to online events and in the flush event, set online
back to false.

> Calling a function the first time no callbacks are being executed
> -----------------------------------------------------------------
>                 Key: CB-6761
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 3.5.0
>         Environment: Nexus 5, Android 4.4.2
>            Reporter: Roy Ackermann
>            Priority: Blocker
>              Labels: callback, function
> Using different functions the same error occurs. Calling a function the first time no
callbacks are being executed. There is no error in the log. Using the same function again
for a second call, everything works fine. Now the first call is being executed as well and
I receive the callback from the first excution.
> It looks like something is wainting. It is odd that the second call works and executes
the first call as well.
> I found this bug on this calls:
> - window.requestFileSystem(LocalFileSystem.PERSISTENT, 3097152, gotFS, fail);
> -, onFailCamera, { targetWidth: 1200,
targetHeight: 1200, quality: 55, destinationType: Camera.DestinationType.FILE_URI, saveToPhotoAlbum:
true, correctOrientation:true});
> -, onFailCamera, { targetWidth: 1000,targetHeight:
1000, quality: 65, destinationType: Camera.DestinationType.FILE_URI  , saveToPhotoAlbum: false
,  sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM, correctOrientation:true});

This message was sent by Atlassian JIRA

View raw message