warvair / peerblock

Automatically exported from code.google.com/p/peerblock
Other
0 stars 1 forks source link

Auto-update not triggering cache list generation #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Leave PB to autoupdate the blocklists
2. Once autoupdate has completed, click on "check for updates"
3. Notice that the auto update's window is open and it didn't close by
itself after the auto update, despite being set to close after 3 seconds. 
4. This causes auto updates to not trigger cache list generation due to the
(invisible) window not closing

What is the expected output? What do you see instead?
Auto updates should lead to cache list generation.
Auto updates lead to the auto-update mechanism hanging. (invisible update
window not closing)

What version of the product are you using? On what operating system?
r86 on windows XP

Please provide any additional information below.

Original issue reported on code.google.com by Praese...@gmail.com on 13 Aug 2009 at 3:58

GoogleCodeExporter commented 9 years ago
As per the logfile PraesesZA submitted via email, I can definitely see the 
problem:

/---------------------------------------
[8/15/2009] [19:14:14.741] [02864]  [UpdateLists]  > Entering routine.
[8/15/2009] [19:14:14.741] [02864]  [UpdateLists]    g_updater null, no parent,
creating dialog-box
[8/15/2009] [19:14:14.821] [02864]  [UpdateLists_OnInitDialog]  > Entering 
routine.
[8/15/2009] [19:14:14.821] [02864]  [UpdateLists_OnInitDialog]    spawning 
updatethread
[8/15/2009] [19:14:14.831] [02864]  [UpdateThread] [UpdateThread]    created 
thread
[8/15/2009] [19:14:14.861] [02864]  [UpdateLists_OnInitDialog]  < Leaving 
routine.
[8/15/2009] [19:14:14.881] [02864]  [UpdateLists]  < Leaving routine.
[8/15/2009] [19:14:14.881] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
[8/15/2009] [19:14:15.061] [01180]  [UpdateThread] [_Process]    updating 
peerblock
[8/15/2009] [19:14:15.071] [01180]  [UpdateThread] [_Process]    update
url:[http://update.peerblock.com/pb_update_test.php?build=30908120089]
[8/15/2009] [19:14:15.071] [01180]  [UpdateThread] [_Process]    homepage
url:[http://forums.peerblock.com]
[8/15/2009] [19:14:15.071] [01180]  [UpdateThread] [_Process]    agent
string:[PeerBlock/0.9.2.89]
[8/15/2009] [19:14:15.081] [01180]  [UpdateThread] [_Process]    updating 
dynamic lists
[8/15/2009] [19:14:15.081] [01180]  [UpdateThread] [_Process]    updating file:
[C:\Program Files\PeerBlock\lists\1662719053.list]
[8/15/2009] [19:14:15.091] [01180]  [UpdateThread] [_Process]    found list, 
adding
stuff to list-view
[8/15/2009] [19:14:15.091] [01180]  [UpdateThread] [_Process]    updating file:
[C:\Program Files\PeerBlock\lists\1211516814.list]
[8/15/2009] [19:14:15.101] [01180]  [UpdateThread] [_Process]    found list, 
adding
stuff to list-view
[8/15/2009] [19:14:15.101] [01180]  [UpdateThread] [_Process]    updating file:
[C:\Program Files\PeerBlock\lists\1361934031.list]
[8/15/2009] [19:14:15.101] [01180]  [UpdateThread] [_Process]    found list, 
adding
stuff to list-view
[8/15/2009] [19:14:15.101] [01180]  [UpdateThread] [_Process]    updating file:
[C:\Program Files\PeerBlock\lists\3214495483.list]
[8/15/2009] [19:14:15.101] [01180]  [UpdateThread] [_Process]    found list, 
adding
stuff to list-view
[8/15/2009] [19:14:15.101] [01180]  [UpdateThread] [_Process]    updating file:
[C:\Program Files\PeerBlock\lists\2306145797.list]
[8/15/2009] [19:14:15.111] [01180]  [UpdateThread] [_Process]    found list, 
adding
stuff to list-view
[8/15/2009] [19:14:15.111] [01180]  [UpdateThread] [_Process]    updating file:
[C:\Program Files\PeerBlock\lists\2755643614.list]
[8/15/2009] [19:14:15.121] [01180]  [UpdateThread] [_Process]    found list, 
adding
stuff to list-view
[8/15/2009] [19:14:15.121] [01180]  >up
[8/15/2009] [19:14:15.121] [01180]   1
[8/15/2009] [19:14:15.121] [01180]   2
[8/15/2009] [19:14:15.121] [01180]   3
[8/15/2009] [19:14:15.132] [01180]  <up
[8/15/2009] [19:14:15.132] [01180]  [UpdateThread] [_Process]    performing 
updates
[8/15/2009] [19:14:18.827] [01180]  >up
[8/15/2009] [19:14:18.827] [01180]   1
[8/15/2009] [19:14:18.827] [01180]   2
[8/15/2009] [19:14:18.837] [01180]   3
[8/15/2009] [19:14:18.837] [01180]  <up
...
[8/15/2009] [19:15:04.332] [01180]  >up
[8/15/2009] [19:15:04.332] [01180]   1
[8/15/2009] [19:15:04.332] [01180]   2
[8/15/2009] [19:15:04.332] [01180]   3
[8/15/2009] [19:15:04.332] [01180]  <up
[8/15/2009] [19:15:04.332] [01180]  [UpdateThread] [_Process]    response code: 
[200]
[8/15/2009] [19:15:04.342] [01180]  [UpdateThread] [_Process]    removing 
tempfile
[8/15/2009] [19:15:04.342] [01180]  [UpdateThread] [_Process]    performing 
cleanup
[8/15/2009] [19:15:04.342] [01180]  [UpdateThread] [_Process]    Done updating.
[8/15/2009] [19:15:04.402] [01180]  [UpdateThread] [_Process]    waiting for 
user to
close dialog box
[8/15/2009] [19:15:14.747] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
[8/15/2009] [19:15:44.750] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
\---------------------------------------

No further activity but those UpdateStatus messages once every 30 minutes, 
until 7:17:

/---------------------------------------
[8/16/2009] [07:16:19.459] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
[8/16/2009] [07:16:49.462] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
[8/16/2009] [07:17:17.082] [02864]  [UpdateLists]  > Entering routine.
[8/16/2009] [07:17:17.082] [02864]  [UpdateLists]    g_updater not null, found
parent, creating dialog-box
[8/16/2009] [07:17:17.092] [02864]  [UpdateLists]  < Leaving routine.
[8/16/2009] [07:17:17.122] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
[8/16/2009] [07:17:19.465] [02864]  [LogProc] [UpdateStatus]  > Entering 
routine.
[8/16/2009] [07:17:20.827] [02864]  [UpdateLists_OnCommand]    IDC_CLOSE
[8/16/2009] [07:17:20.837] [02864]  [UpdateLists_OnDestroy]  > Entering routine.
[8/16/2009] [07:17:20.837] [02864]  [UpdateLists_OnDestroy]    loading lists
[8/16/2009] [07:17:20.837] [02864]  [LoadLists]  > Entering routine.
[8/16/2009] [07:17:20.837] [02864]  [LoadLists]    generating cache
[8/16/2009] [07:17:20.837] [02864]  [GenCache]  > Entering routine.
[8/16/2009] [07:17:20.837] [02864]  [GenCache]    cache not valid
[8/16/2009] [07:17:20.837] [02864]  [GenCache]    window found, spawning thread
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Init]  > Entering routine.
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Init]    num static lists: 
[0]
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Init]    num dynamic 
lists: [6]
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Init]  < Leaving routine.
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Process]  > Entering 
routine.
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Process]    dynamic list
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Process]    list is enabled
[8/16/2009] [07:17:20.837] [02864]  [GenCacheFuncs] [Process]    loading list
[8/16/2009] [07:17:30.771] [02864]  [GenCacheFuncs] [Process]    list loaded
[8/16/2009] [07:17:30.771] [02864]  [GenCacheFuncs] [Process]  < Leaving 
routine.
...
[8/16/2009] [07:19:22.933] [02332]  >up
[8/16/2009] [07:19:22.933] [02332]   1
[8/16/2009] [07:19:22.933] [02332]   2
[8/16/2009] [07:19:22.933] [02332]   3
[8/16/2009] [07:19:22.943] [02332]  <up
[8/16/2009] [07:19:22.943] [02332]  [UpdateThread] [_Process]    response code: 
[200]
[8/16/2009] [07:19:22.943] [02332]  [UpdateThread] [_Process]    removing 
tempfile
[8/16/2009] [07:19:22.943] [02332]  [UpdateThread] [_Process]    performing 
cleanup
[8/16/2009] [07:19:22.943] [02332]  [UpdateThread] [_Process]    Done updating.
[8/16/2009] [07:19:22.973] [02332]  [UpdateThread] [_Process]    waiting for 
user to
close dialog box
[8/16/2009] [07:19:23.974] [02864]  [UpdateLists_OnTimer]  > Entering routine.
[8/16/2009] [07:19:23.974] [02864]  [UpdateLists_OnTimer]  < Leaving routine.
[8/16/2009] [07:19:24.976] [02864]  [UpdateLists_OnTimer]  > Entering routine.
[8/16/2009] [07:19:24.996] [02864]  [UpdateLists_OnTimer]  < Leaving routine.
[8/16/2009] [07:19:25.977] [02864]  [UpdateLists_OnTimer]  > Entering routine.
[8/16/2009] [07:19:25.977] [02864]  [UpdateLists_OnTimer]  < Leaving routine.
[8/16/2009] [07:19:26.978] [02864]  [UpdateLists_OnTimer]  > Entering routine.
[8/16/2009] [07:19:26.978] [02864]  [UpdateLists_OnTimer]  < Leaving routine.
[8/16/2009] [07:19:27.980] [02864]  [UpdateLists_OnTimer]  > Entering routine.
[8/16/2009] [07:19:27.990] [02864]  [UpdateLists_OnTimer]  < Leaving routine.
[8/16/2009] [07:19:27.990] [02864]  [UpdateLists_OnDestroy]  > Entering routine.
[8/16/2009] [07:19:27.990] [02864]  [UpdateLists_OnDestroy]    loading lists
[8/16/2009] [07:19:27.990] [02864]  [LoadLists]  > Entering routine.
[8/16/2009] [07:19:27.990] [02864]  [LoadLists]    generating cache
[8/16/2009] [07:19:27.990] [02864]  [GenCache]  > Entering routine.
[8/16/2009] [07:19:27.990] [02864]  [GenCache]    cache not valid
[8/16/2009] [07:19:27.990] [02864]  [GenCache]    no window, creating dialog box
[8/16/2009] [07:19:28.000] [02864]  [Loading_DlgProc]    msg: WM_INITDIALOG.
[8/16/2009] [07:19:28.000] [02864]  [Loading_OnInitDialog]  > Entering routine.
[8/16/2009] [07:19:28.000] [02864]  [Loading_OnInitDialog]    spawning thread to
handle loading
[8/16/2009] [07:19:28.000] [02864]  [Loading_OnInitDialog]  < Leaving routine.
[8/16/2009] [07:19:28.020] [00468]  [LoadingThread] [operator()]  > Entering 
routine.
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Init]  > Entering routine.
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Init]    num static lists: 
[0]
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Init]    num dynamic 
lists: [6]
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Init]  < Leaving routine.
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Process]  > Entering 
routine.
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Process]    dynamic list
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Process]    list is enabled
[8/16/2009] [07:19:28.020] [00468]  [GenCacheFuncs] [Process]    loading list
[8/16/2009] [07:19:29.001] [02864]  [UpdateLists_OnTimer]  > Entering routine.
[8/16/2009] [07:19:29.001] [02864]  [UpdateLists_OnTimer]  < Leaving routine.
\---------------------------------------

I suspect this is another issue caused by the fact that PG2's code is so heavily
intertwined with the UI, instead of being self-contained in a different 
"layer". 
While I haven't performed an extensive code-review yet, it's probably due to 
the fact
that it's not getting those "OnTimer" messages when the window isn't visible, 
so it's
never counting down its internal clock as to number of seconds required.

Looks like we can key off the "g_updater null, no parent" versus "g_updater not 
null,
found parent" messages to determine whether we've got a window or not, and then
handle things correctly when we're updating in the background.

Original comment by peerbloc...@gmail.com on 17 Aug 2009 at 1:05

GoogleCodeExporter commented 9 years ago
Great, I'm glad you were able to track down the problem! :)

Original comment by Praese...@gmail.com on 17 Aug 2009 at 3:56

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r139.

Original comment by peerbloc...@gmail.com on 10 Sep 2009 at 9:10