Windows Vista Wrong Thread on CloseArchives Forums/BlitzPlus Bug Reports/Windows Vista Wrong Thread on Close
| When using the System menu Close or the X icon (in the upper right) on Windows Vista an error dialog errors reporting simply "Wrong Thread".|
| Is there any news for a possible fix or work around for this issue?|
I got the same Problem and it is quite iritating
the update to 1.46 didnt help :(
plz is there any solution?
| sry for the pushing, but somehow id like an awnser :'(|
anybody any idea?
| can you post a small code example of this? I don't seem to have the problem, unless I just don't understand what you are talking about. |
| I don't have B+, but are you sure you are handling the exit/close message properly? |
| When checking a $803 (windows closed by X button) and its true, the window does close but sometimes you get an Error "Wrong Thread"|
I think something is messed up with the window handles, so it doesnt know which client windows were created(by blitz), something like that
| Here is the simplest code that always fails for on 2 different Vista systems that I personal test with. |
window=CreateWindow( "Graphics window",0,0,640,480 )
If EventID()=$803 End
Some additional information.
- The 2 systems that I test on where I've seen this happen on are both Vista 64 systems.
- Multiple users of my software have reported seeing this error on my application.
- The problem occurs when running from within BlitzBasic or from a compiled application, BUT, when running in debug mode within BlitzBasic the error does not occur.
Please let me know if you need additional tests performed it would be very helpful to have this issue addressed.
| Were the users with the issue also running Vista 64? |
Since you are mentioning Vista 64 and Blitz Plus does not produce 64bit EXEs, I am guessing there is some conflict going on with the 32bit emulation layer that Vista 64 is using.
| Unfortunately I didn't ask about the Vista version when this was reported since at that time I didn't have a reason to think that it could be related to that. |
Most likely obvious....but the Wrong Thread error occurs after the BlitzPlus End function is called.
| That is a shame, that is a crucial piece of info. If an EU reports a bug, getting the version of the OS should be mandatory. |
Based on what is described, I am guessing they were using Vista 64bit, and there is some niggling issue that Mark needs to look at. Maybe he will have a chance to look at it after he finished up with the latest Max release? B+ does have a lot of life left in it and would be worth his effort.
| On Vista64 the error happens for sure.|
But the 64bit is no excuse for it, because BlitzPlus is the only application that shows that. Not even the other Blitz languages have that problem so its clearly a problem with the thread ending code for B+ killing the wrong thread (first?) on close
| Forcibly killing the process with the Windows API ExitProcess function results in this error message not occurring. I guess this could result in some resources not properly closed or freed.|
Anyone have further thoughts on a possible work around.
| An official comment (one way or the other) from Mark, would be nice. |
| Jep it was a 64bit Vista|
and it only appears when the debugger is off
"B+ does have a lot of life left in it and would be worth his effort. "
true words ..
| Mark, any comment? |
| I have been helping test this for one of the guys since I have a plethora of machines and configurations at work. |
So far this has happened on 6 different Vista64 machines I have tried it on.
10 Months without a Comment from Marks side
il guess i will just compile my new Project with the debugger on -_-*
| It might be time to start looking at a competing language since BlitzPlus does not work properly on Vista 64. |
Maybe i should start to learn BlitzMax, but i dont want to learn it if after 2 Years its not getting developed/supported anymore..
| ozzi789: If the bug hasn't been fixed 10 months after being reported, it probably isn't going to get fixed. Time to move on. |
| For what it's worth I've gone with using the Windows API ExitProcess and so far have not found any problems with doing this.|
| The "Wrong Thread" Error also appears on Windows 7 RC (also 64 bit). I think it's because of the "End"-Command. If I use this|
window=CreateWindow( "Graphics window",0,0,640,480 ) Repeat WaitEvent() If EventID()=$803 Exit Forever
it works fine.
| Does that work without error for when the "X" is clicked and for ending the program? |
BASS_SetVolume(startupvolume) BASS_Free() config_file=OpenFile ("config.ini") WriteLine (config_file,GadgetX(win)) WriteLine (config_file,GadgetY(win)) WriteLine (config_file,1) CloseFile(config_file) If lcd=1 G15_FreeFont sm8 G15_FreeFont sm6 G15_FreeFont sm12 G15_End EndIf End
This is the code on a 803 in my project, the wrong thread still comes when i use Exit instead of End!
Could you please post me the decls for that ExitProcess?
ok ExitProcess works fine!
api_ExitProcess (uExitCode%) : "ExitProcess"
into a decls file and use
api_ExitProcess (uExitCode%) not End ;)
| I had someone report this bug with my texture generator as well today. |
| any official word? |
We're looking into it right now.
| Cool it got fixed with 1.47!|
Thanks helps me pretty much :)