#binary doesn't execute sometimes

20 messages · Page 1 of 1 (latest)

lusty latch
#

i have been working on a project for a couple months, building a gui program using c++ and wxwidgets.

in the last couple of days, i was trying to get 2 classes/windows to share data that a wxChoice widget has so that if the data in the wxChoice is altered, it is shown in both locations (the main frame's wxChoice widget and also the Template Editor's wxChoice widget).

I created a circular dependency doing this, so now I have forward declared the classes to avoid this problem, but it seems that since then, I have created some new problem where the project will build successfully with no problems, but getting the .exe file to run successfully is sporadic (something like 1 in 7-10 attempts to run the program works).

What could posibly be causing this behaviour? Prior to this point, the program EXE would launch every time.

reef smeltBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

lusty latch
past glen
#

seems like the exe has some issue and the process keeps running (despite stopping the debugger)
check task manager to see if that's the case

usually this points to an issue with threads (not ending correctly)

lusty latch
#

If the program doesn't launch, I don't see any process in task manager. Only if the program runs correctly.

I tried using ASSN and TSAN last night but I couldn't get it to build with it. Tried using clang to compile it but couldn't get it to build. Sorry I'm not great with the build tools, still learning about all of that as I go.

#

and i think they conclude also clang doesn work for it under msys2 windows

#

so my next best option is probably to try to build it under linux.

#

yeah i think maybe msvc could have something, just i'm not set up for that.

#

ye. i'm no expert but i did think that the experts are the ones that put all that stuff together for us noobs to use?

#

lol. oh man. why is everything in c++ ending up in "just compile this yourself". i have a linux vps, and i was developing for cross platform

#

well, always having in mind to develop for cross platform. but the vps has no windowing system on it

#

you mean binary packages as in, "windows exe"?

#

ye you mean a single binary that has all its libraries etc. included, not like a binary that uses shared libraries

#

i never even thought this behaviour i'm seeing could be possible until now. been using computers for almost 30 years and i've never seen this. binary launches sometimes but not others. wtf

#

it's so painfully weird that i'm now interested to learn whytf its doing this

#

lol oh man. youre saying stuff to me that i did 25 years ago. i'm coming full circle back around to running a linux box.

lusty latch
#

ok i had a relook at my code and i think this problem was being caused by some sort of circular member sharing i was trying to make the program do. I've redone the code and I think i have it working properly now and the program launching problem seems to have gone away.

#

so i think i'll mark this as solved

#

!solved