I'm having trouble with an ImageJ macro. Functions selectImage(id) and selectWindow(name) are causing ImageJ to crash completely, even so that I have to reset Unity altogether (I'm on Ubuntu 12.04), since all GUI input just freezes.
The macro in which this happens is rather long. When I use the aforementioned functions in short and simple macros nothing happens. I first open the images, then perform some thousands of operations, and then request the window switch. That's when the whole thing freezes.
Is anyone familiar enough with these so as to suggest what might be the problem?
If you prefix your macro with setBatchMode(true) then ImageJ will execute the macro in the background, not displaying or updating any windows until the macro is complete (or until setBatchMode(false) is called). This will prevent selectWindow and selectImage calls from actually bringing windows to the foreground, and in your case crashing Unity. Your macro will also be orders of magnitude faster.
I found the solution as I wrote the question. The problem was that I was calling selectImage() and selectWindow() inside a loop, which was resulting in thousands of window switch requests per second. I guess Unity can't handle that very well.
Bottom line: don't call those functions inside a long loop.
Related
My first question here.
As I'm writing code normaly, sometimes I need to copy. And like every 50-100 Ctrl+C copys, the mouse pointer goes to another part of the code and it doesn't copy what was selected (I mainly use eclipse IDE, but I believe this happened in other editors). It's like I was pressing Ctrl+LMB.
This kinda happens randomly and I can't seem to replicate it. I believe I'm misclicking a key but I never do realize what I just did.
This can really piss me off and I can't find anything online related.
Is it just me? Does anyone have an ideia what could be happening?
I don't have much experience with simulink but everything was working fine until the symbols inside the blocks (integrator, merge, unary minus...) dissapeared and now it is just a white square (they continue working tho). I haven't modified the format or similar that I can recall.
I have also tried to delete those blocks and import new ones from the library browser but the problem persist.
How can I fix this problem?
PD: I can't upload an image sorry :((
I had a similar problem in the past, I used the next commands in the command window.
restoredefaultpath
rehash toolboxcache
It will take some time, but might work.
Last Edit:
It appears I've had an F8 key being pressed non-stop, and it seems to be a shortcut for "Go to Next Error or Warning".
I've wrote a piece of code, it has an error which I'm aware of. Specifically, I'm trying to run a function which doesn't exist yet:
All good, I'm glad it is telling me there's a problem, but... I wish to keep writing stuff in the same file and I simply can't. Every so often the GUI keeps sending the caret (the place where my next piece of text will be written) to the beginning of the problematic piece of code. Simply speaking, I can't keep doing anything until I resolve the problem, since it forcefully intrudes my every action. Even more than that! When I go to a different file, with means of fixing the problem and adding the missing function, it once again interrupts me and forcefully takes me back to the problematic file to show me that there's a problem (??!?!?!). Closing it with "Esc" only closes it once, but it keeps on returning every several seconds.
I don't think it was like that just a week ago, and I didn't install any new plugin since then. I'm currently using the last version, 1.58.2.
How do I stop this work-flow-intruding behavior?
Edit:
I've kept on working for some time and it turns out the issue is much bigger than that. Whenever I type a name of some property, half way through some wild problem would jump and tell me "Cannot find name 'quar'. Did you mean 'quarter'?". The issue is basically the time delay of the problem checks, it's non-existent. It's also too intrusive, moving the caret and jumping between files to show me the existing problems. It's very recent, it didn't happen earlier this week. I've tried disabling different plugins I have and they're not the cause.
This is not exactly your issue, but could be related to what you are experiencing: https://github.com/microsoft/vscode/issues/68776
Try disabling the Outline Explorer and see what happens then.
Furthermore, see if disabling autosave improves anything.
I am using GDB with emacs and sometimes use GDB with DDD.
Starting version 22 (???) Emacs provides a tool-bar-mode, where you can do
the most important commands like run, next, step, up/down of stack frames in the emacs UI.
As such , I have moved away from DDD, since anyways I run most commands through command line and the sometime through the limited UI given in the tool-bar-mode.
However, the ability to hover your mouse over a variable and make the value to pop-up still seems to be missing. Does anyone know about some mode in emacs or some .el file that would allow Emacs to do the same.
This kinda goes against emacs not being a gui-ide. I can still use watchpoints/local variable buffer; but I really would like the ability to hover my mouse over some variable and see the value. Any help would be much appreciated.
gud-tooltip-mode is supposed to give you just that, I think.
I'm debugging someones code, and it freezes when I do something specific, but Eclipse doesn't stop on an error (I may have accidentally turned this off). When I press pause in the debugger, Eclipse shows me a bunch of suspended threads, where two of them are coloured red.
I want to find out if there is an error anywere, or if there's just an infinite loop somewhere (which doesn't seem likely, because Eclipse should break in the loop in that case).
I'd be great if anyone can help me with this Thanks in advance!
Maybe you have a deadlock?
You can use jconsole (goes with java jdk) to find out this. Launch jconsole, attach to your process, go to the Threads tab. Press "Detect deadlock"... It can be also useful to look at all threads states, for example you can have infinity loop in one thread and another thread blocked etc...
I've had this happen to me before, try inserting breakpoints every few lines of code, then stepping through those until it breaks, removing the breakpoints that don't have any errors between them. Remember the line of code that causes it to crash and make whatever changes are necessary to fix it.