Zbar hangs when debugging an app
« Thread started on: Dec 18th, 2013, 10:20am »
This has plagued me for some time now and I finally figured out how to reproduce it. Here's the setup:
1. Start with ZBar not running. 2. Open up Visual C# (I'm using the 2008 express edition, but I doubt it matters). 3. Create a new Windows Forms application. 4. Click the debug button to run the empty form. 5. Move the empty form onto the second monitor that ZBar will reside on. 6. Click the Pause button in visual studio. 7. Launch Zbar.... ZBar hangs until visual studio resumes. I'm guessing you need a timeout on some API call in there.. Should be pretty easy to track down.
The same thing happens if ZBar is running the whole time and you remote desktop to the machine with a single monitor, then exit the remote session and log in locally.
I saw the recent conversations about open sourcing the app, and I'm all for it. I sincerely hope this application continues to live on as I find it to be fantastic. I'm surprised it doesn't have a larger following than it does.
I've replaced some SendMessage calls with SendMessageTimeout (it's the ones which get the icon which seem to cause the trouble) and the problem is solved here at least.
You can see this problem whenever any app has stopped responding, and I've seen it from time to time and thought about how I should get to looking at it. It takes a little nudge occasionally to get that done :)