This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 92917 - WaitScreen executes CancellableTask two times.
Summary: WaitScreen executes CancellableTask two times.
Status: VERIFIED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: Visual Designer (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Brehovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-21 12:27 UTC by lauri
Modified: 2007-04-26 09:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lauri 2007-01-21 12:27:28 UTC
Problem causes WaitScreen to execute given CancellableTask two times.

This is race problem can occur in following case:
1. DeleteFile is called as last operation in CancellableTask.
2. This makes OS to query if operation is allowed.
3. When user allows operation, CancellableTask terminates.
4. now OS makes WaiScreen visible.
5. As task is not running (it already terminated), it is started again (in
showNotify).

Problems is seen in Nokia 6233 (S40 3rd edition) devices.

-- Lauri
Comment 1 Martin Brehovsky 2007-02-08 10:33:14 UTC
I was able to reproduce the problem with the latest S40 emulator. This problem
is caused by a race condition when switching displayables, The following fix
helped on the emulator, please check whether it helps also on your device:

cvs diff -- org\netbeans\microedition\lcdui\WaitScreen.java (in directory
C:\space\cvs_root\trunk\mobility\designer\nb_midp_components\src\)
Index: org/netbeans/microedition/lcdui/WaitScreen.java
===================================================================
RCS file:
/cvs/mobility/designer/nb_midp_components/src/org/netbeans/microedition/lcdui/WaitScreen.java,v
retrieving revision 1.3
diff -r1.3 WaitScreen.java
208,209c208,214
<                 WaitScreen.this.backgroundExecutor = null;
<                 doAction();                
---
>                 getDisplay().callSerially(new Runnable() {
>                     public void run() {
>                         WaitScreen.this.backgroundExecutor = null;
>                         doAction();                
>                     }
>                 });
>                 
Comment 2 Martin Brehovsky 2007-02-08 17:20:00 UTC
Fix commited to release551.
Comment 3 Lukas Hasik 2007-02-09 08:25:47 UTC
according to http://wiki.netbeans.org/wiki/view/Release551BranchIntegrationRules
developer must to add 551_HR_FIX keyword to issues committed to 5.5.1 branch
Comment 4 Lukas Hasik 2007-02-16 10:04:12 UTC
please, don't forget to set up the Target Milestone
Comment 5 Lukas Hasik 2007-04-16 09:55:03 UTC
verified in RC1 of 551