QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: STxAxTIC on February 10, 2020, 02:17:02 am

Title: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 02:17:02 am
Been running the same Win10 machine a few years, the only variable is the new QB64... twice today I haven't been able to close an exe window after trying to close it. Anyone else?
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: SMcNeill on February 10, 2020, 03:09:08 am
Do you have an _EXIT in your program anywhere?  Or $CHECKING:OFF?
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 07:20:36 am
I dont use underscore commands except for _Width typically. No fancy meta stuff. It could still be my OS causing the issue, just fishy how sudden....
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: FellippeHeitor on February 10, 2020, 07:40:49 am
From which qb64 version did you switch to the latest? We have replaced the whole c++ compiler with 1.3, it may be the case of whitelisting the whole folder again (antivĂ­rus? Windows defender?).

And since it's Windows 10, didn't it update itself sometime around the time you updated QB64? Then it wouldn't be the only variable.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 07:45:24 am
All things considered, the new QB64 is the only variable. The facts:

i) I've been using this same computer the same way since the day I had it. Antivirus off, firewall off, training wheels off.

ii) Since I can only imagine other people are also using Windows 10, and are subject to the same updates as I am, perhaps on the same brand laptop for some people. So that makes it not my personal variable, statistically, in a weird way. Something about the rising tide raising all ships... The only thing I did all by myself was install the new QB64, from the previous version. Maybe 2 months old.

iii) You all know I don't do any exotic QB64 stuff - all QB45 commands whenever possible, rite?

This "crash" happened while making my last two programs:

https://www.qb64.org/forum/index.php?topic=2143.0 (https://www.qb64.org/forum/index.php?topic=2143.0)

https://www.qb64.org/forum/index.php?topic=2164.msg114120#msg114120 (https://www.qb64.org/forum/index.php?topic=2164.msg114120#msg114120)
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: FellippeHeitor on February 10, 2020, 07:51:53 am
Do you still have the older version there? Does untitled compiled with it still close immediately?

The bulk of 1.4 additions and fixes happened in the past two months and it's been a lot of changes. We'd have to pinpoint which older version didn't cause the issue on your machine. Steve is on W10 and it seems ok there.

Would you be able to keep going back in versions and test them locally?
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 07:55:55 am
Oh jeez - thats a needle in a haystack, would probably need to automate that test. In the past 5 days, I've probably attempted to close a program 500 times and it's worked 498, I may never see a pattern. All I know is I downloaded the latest about a week ago, and the time before that was a few months. Deleted old version on download.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: FellippeHeitor on February 10, 2020, 08:06:20 am
Cloning the repository locally and checking out each automated commit labeled "Update internal/source" by Luke and then running setup_win.bat would take you step by step without having to download each version in full. https://github.com/QB64Team/qb64/commits/development
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 08:16:39 am
All true - but actually *doing* the test will need better tools. For me at least... While we have many retirees at this site I only have time to write a program to open and close windows if I were to tackle this.

Pretend it has a 1% chance of happening. How many times should each version be checked before it passes? Just 100? Okay, suppose it happens. We're still far from blaming either the OS or QB64. I would only be satisfied by a Bayesian analysis. If it exists, bugs like this can't be hunted like looking for Sasquatch, it should be done very systematically.

EDIT

Quote
Bayesian analysis, a method of statistical inference (named for English mathematician Thomas Bayes) that allows one to combine prior information about a population parameter with evidence from information contained in a sample to guide the statistical inference process.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: FellippeHeitor on February 10, 2020, 08:29:06 am
You lost me there.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 08:48:10 am
Oh, where are my manners? The quote is from Wikipedia.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: bplus on February 10, 2020, 11:08:12 am
I think STxAxTIC is saying he can't replicate the problem 100% of the time, no, more like a fraction of a percent 2/500 = .4%  << Edit: from .04%

Yeah, that is about the number of times a program fails to close leaving a Screen hanging and I have to go into Windows Task Manager and close it myself. It is far too flukey to figure out what happened because I am always modifying this and that.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: Cobalt on February 10, 2020, 11:24:21 am
I'm going to call OS BS here, I've been using 1.3DB and 1.4RC for a while now and have never had an issue with a program not wanting to go away, go away too soon maybe, but never being stubborn about closing.

I'll pull those programs from the posts you listed and see If I can ever get a hangup on close up.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: Cobalt on February 10, 2020, 11:46:49 am
Yep just compiled and ran it 250 times. And I know it was 250 times cause I hit space on the same line then F5 until I was 250 spaces over. not once did it give any resistance to closing. used your "Ellipse Intersect Line" code for the test. now that I've wasted a quarter hour back to Dragon Warrior!which has been compiled and ran countless times with no closing issues... premature closing issues but thats my fault.

so in recap, with 90% certainly, this is most likely OS BS or hardware+OS BS.

if you want to blame QB64 for something blame it for your code not working how you want, cause you know as programmers our code is 100% flawless!  :D
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: bplus on February 10, 2020, 11:59:27 am
Yep definitely could be operator, might more likely happen when run a mod, forget to close it, make a mod, run that, close that, make a mod run that close that... the old run still up keeps getting it's exe name closed and modified.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: STxAxTIC on February 10, 2020, 12:26:50 pm
Glad someone like bplus is seeing eye to eye with me on this.  Anyway, if it helps get closer to the problem, I can say a few things about the conditions leading to when it happened.

Besides the obvious (Win10, qb64v1.4 candidate, no AV, no, FW)

0. "Failure to close", to me right now, is defined as the program ending properly, getting the "Press any key" message, but then the X button and alt+f4 each fail to dismiss the window.

1. I was in the edit > run > edit > run etc. phase of finishing a program at each occurrence.

2. I never, or very rarely at least, have multiple instances of Qb64 open. Nor do I have the source open in another editor. No exceptions to this were going on when the programs failed to close.

3. Item 2 extends to my whole habit on the computer. Everything is closed, including browers and tabs, daily. I probably had Chrome open, maybe a folder or two, when it happened.

4. I havent made any changes to my system whatsoever beyond view settings when I bought the thing.
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: bplus on February 10, 2020, 01:23:06 pm
Ah, I am running v1.3 standard issue most the time when I hang a screen. I have no idea the exact stat but 1 time in 500, 1 time in 1000?  Certainly 1 time in 100 seems too frequent.

PS I did not notice correlation to "untitled", I would say I am deep into mod and test, mod and test a titled and folder saved bas file. I will be sure to take more notes of such events but it is usually when I am in the middle of blundering my way into something interesting. :)
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: Pete on February 10, 2020, 09:11:36 pm
I've had this happen maybe once or twice with v.1.3, say over several hundreds of times running exe programs. I just go to task manager and close it there, no biggie, but to the point, my gut feeling was it was caused by some OS interference, not QB64. I do recall I had a bunch of things going on (windows open, several apps running, etc.)

Pete
Title: Re: Possible bug: Can't close Untitled.exe sometimes
Post by: FellippeHeitor on February 10, 2020, 11:54:28 pm
I get it a lot on a Windows 7 system with lots of admin stuff that prevent users from doing anything to system's settings. God knows how many processes it has running just to prevent me from using it normally.

That's far from STx's case though. This is a hard one to track down.