Ticket #48 (closed defect)

Opened 8 years ago

Last modified 6 years ago

invoking image I/O during threads breaks notifications

Reported by: anonymous Owned by: roebling
Priority: normal Milestone:
Component: base Version:
Keywords: thread Cc: roebling, vadz
Blocked By: Patch: no
Blocking:

Description

Bug#: 118
Product: .wxWindows
Version: 2.2.0
Platform: wxGTK
OS/Version: Linux - RedHat
Status: NEW
Resolution:
Severity: normal
Priority: P2
Component: thread
AssignedTo: ???
ReportedBy: br_9801@…
URL:
Summary: invoking image I/O during threads breaks notifications

I am trying to perform slow image I/O operations in a
separate thread in order to keep the GUI responsive.
In order to update the GUI when new images computed by the
GUI are available, I use a wxTimer that polls a "mailbox"
between the compute thread and the GUI thread.

But once I have performed an image I/O operation in the compute
thread, the wxTimer stops calling Notify. There is a fairly
simple workaround: I can restart the timer from the
compute thread, but that seems kind of like a kludge.

More generally, it might be good to document what things can
and cannot be caled from within threads. I assume that
the GUI itself should be accessed only from the main thread.
But wxWindows I/O classes, wxWindows data structures, and
wxWindows image functions (input, output, rescaling) ought
to be callable from multiple threads.

I'm attaching a source file that demonstrates the bug.
Run it as "bug-2" to just run the timer, and give it
the argument of "1" to run it with a thread to demonstrate
the bug.

Tom.

PS: here is the version information

$ rpm -q -a | grep wx
wxGTK-2.2.2-0
wxGTK-devel-2.2.2-0
wxPython-2.2.1-0
$


Created an attachment (id=21)
file demonstrating the bug (bug-2.cpp)

Change History

Changed 7 years ago by roebling

I don't see any attachment for reproducing the error.

Changed 6 years ago by vadz

I don't see anything happening to this bug anyhow

Note: See TracTickets for help on using tickets.