2 Jul 2012 16:16
[ jedit-Plugin Bugs-3539123 ] Console: NPE when command starts in background
<SourceForge.net>
2012-07-02 14:16:14 GMT
2012-07-02 14:16:14 GMT
Plugin Bugs item #3539123, was opened at 2012-06-30 02:49 Message generated for change (Comment added) made by synh You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=3539123&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Artem Bryantsev (synh) Assigned to: Artem Bryantsev (synh) Summary: Console: NPE when command starts in background Initial Comment: Execution "some_command &" or "some_command&" leads to NPE: [Thread-7] [error] Thread-7: Exception in thread "Thread-7" [Thread-7] [error] Thread-7: java.lang.NullPointerException [Thread-7] [error] Thread-7: at console.ConsoleProcess.showExit(ConsoleProcess.java:156) [Thread-7] [error] Thread-7: at console.ConsoleProcess$1.run(ConsoleProcess.java:111) [Thread-8] [error] StreamThread: Can't Flush: [Thread-8] [error] StreamThread: java.lang.NullPointerException [Thread-8] [error] StreamThread: at console.StreamThread.flushLine(StreamThread.java:217) [Thread-8] [error] StreamThread: at console.StreamThread.run(StreamThread.java:130) - Linux 3.2.0-26-generic #41-Ubuntu SMP Thu Jun 14 17:49:24 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux - java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) - jEdit 04.05.99.02, Console 4.5 + "-nosettings" and... [Thread-6] [error] StreamThread: Can't Flush: [Thread-6] [error] StreamThread: java.lang.NullPointerException [Thread-6] [error] StreamThread: at console.StreamThread.printString(StreamThread.java:332) [Thread-6] [error] StreamThread: at console.StreamThread.run(StreamThread.java:212) - jEdit 05.01.01.00, Console 5.0 The problem is that there is no implementation for processes running in the background, in the module ConsoleProcess.java. If the process starts in the background - Console does not establish Output for such process, and then prints the output from it as from the usual process. ---------------------------------------------------------------------- >Comment By: Artem Bryantsev (synh) Date: 2012-07-02 07:16 Message: Fixed in r21905. ---------------------------------------------------------------------- Comment By: Artem Bryantsev (synh) Date: 2012-07-01 04:55 Message: I've made new tests (without my changes). It does not matter that running ih the background application has gui or not. It does not matter that application works a long time or exits immediately. If command/application running with the argument "&" writes something to stdout - this invokes NPE. f.e. (under Kubuntu 12.04) "okular &" - write to stdout when it is closing, "kate &" - write to stdout when it is starting, "gwenview &" - write to stdout when it is starting. And when I start some command/application in the background, usually I cann't be sure that running process will be quit, will write nothing to stdout. I suppose it's abnormal situation and this functionality requires a correction. ---------------------------------------------------------------------- Comment By: Artem Bryantsev (synh) Date: 2012-06-30 14:35 Message: I did not suppose that can run interactive (gui) apps in this way. To my mind "run in the background" equals "create a daemon-process". But I still get NPE when _close_ gui app (if there is not my changes in the code). ---------------------------------------------------------------------- Comment By: Alan Ezust (ezust) Date: 2012-06-30 12:32 Message: Actually, I can still run gui apps in the background with console, so it's ok. ---------------------------------------------------------------------- Comment By: Alan Ezust (ezust) Date: 2012-06-30 11:33 Message: Running some processes in the background, such as GUI apps (I run okular or xeyes from Console, for example), it works fine. The only issue is when the background process writes to stdout immediately and exits, and that's when you get that NPE. Since nobody ever would run such a program in the background (because we can't see the output anyway), your use case is quite unusual. Mine is more common and worked before you made your change. ---------------------------------------------------------------------- Comment By: Artem Bryantsev (synh) Date: 2012-06-30 04:10 Message: Opened the ticket for the implementation of this feature. See Plugin Feature Requests #3539135. ---------------------------------------------------------------------- Comment By: Artem Bryantsev (synh) Date: 2012-06-30 03:16 Message: Blocked the possibility to run the process in the background - r21890 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=3539123&group_id=588 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ -- -- ----------------------------------------------- jEdit Developers' List jEdit-devel <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jedit-devel
RSS Feed