IDE hangs when running code that opens IDE

Post bugs related to the IDE here
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

IDE hangs when running code that opens IDE

Post by #NULL »

Code: Select all

Define.s pb_ide = #PB_Compiler_Home + "compilers/purebasic"
Define.i selectedLineNr = 3
Define.s selectedFilename = #PB_Compiler_File
RunProgram(pb_ide, "-l " + Str(selectedLineNr) + " " + #DQUOTE$ + GetFilePart(selectedFilename) + #DQUOTE$, GetPathPart(selectedFilename))
"[x] run only one instance" is checked in prefs
--> IDE hangs and has to be killed.

"[ ] run only one instance" is not checked in prefs
--> works fine at first, but when closing the 2nd IDE then the first one hangs in the same way.

Ubuntu 18, pb570b2 x64
Tested with some prior pb versions back to 5.43, the same. (500 didn't compile/run for some other reason)
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: IDE hangs when running code that opens IDE

Post by #NULL »

I want to add that it not only happens when compiled/run from the IDE with stupid code like the above. It also happens if an external tool does use code like the above and is run from the IDE.
I wanted to create an alternative search/find/replace IDE tool (which can open code location in the IDE) because the integrated one is unusable due to other bugs with window focus issues. Now even that is not possible.

It's still possible I'm doing something wrong with runprogram or tool config, so if anyone can create a tool that opens code in IDE in linux let me know :)

..well, I just tried to not run the tool from the IDE but to run it as a completely separate program and at least that seems to work ok.
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: IDE hangs when running code that opens IDE

Post by #NULL »

If I set PUREBASIC_HOME and PATH environment variables then the IDE doesn't hang like described above, but then I can't start another pb IDE version and also the setting '[x] only one instance' is ignored.
Post Reply