This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 207530 - error during start
Summary: error during start
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 211004 (view as bug list)
Depends on: 193681
Blocks: 141069 211486
  Show dependency tree
 
Reported: 2012-01-19 17:03 UTC by kvaso
Modified: 2012-04-25 10:01 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example log file for "Result: 170" (156.68 KB, text/plain)
2012-02-06 08:16 UTC, mkutscheid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kvaso 2012-01-19 17:03:48 UTC
when using Netbeans Platform to create my own application, sometimes (1 out of 10 tries), application won't start (run)

here are a few last lines in netbeans IDE console:

Generating information for Auto Update...
run:
run.run:
Unrecognized option --test-userdir-lock-with-invalid-arg
Result: 170

after that run fails
Comment 1 kvaso 2012-01-19 17:36:30 UTC
now it happens after modules were loaded.. - with the same error code

I am sorry, but I cannot provide any steps to reproduce, because it happens randomly and ... well I would think that running app is a normal (bug-free) process
however, I would be glad to provide any information to solve this issue
Comment 2 Jesse Glick 2012-01-23 20:18:59 UTC
This fake option is passed by the IDE when you try to run the app and it is already running, or it was forcibly terminated before and left behind its lock file. In the former case the attempted launch should return error codes 2 or 50346 and the Ant console should print

"The application is already running within the test user directory.
You must shut it down before trying to run it again."

In the latter case the app should start up after a few moments when no previous instance responds to its ping (but currently you need to do a clean build first).

Never heard of status code 170.

You did not say what version of the NB IDE or Platform you were using.
Comment 3 kvaso 2012-01-24 12:30:29 UTC
sorry: I am using NB 7.1 as IDE and Platform as well
Comment 4 kvaso 2012-02-05 18:03:51 UTC
there are few other guys with this problem:
http://forums.netbeans.org/viewtopic.php?p=123459

mKutscheid points out, that this "error code 170" problem occures when application is forced stopped by "red stop button" (i.e. netbeans platform application is not properly closed)
Comment 5 mkutscheid 2012-02-06 08:16:12 UTC
Created attachment 115483 [details]
Example log file for "Result: 170"

This is an error log, taken from a debug run with NetBeans 7.1 that resulted in "Result: 170"
Comment 6 Jaroslav Tulach 2012-02-09 10:49:45 UTC
The IDE should use the same mechanism as ./org/netbeans/nbbuild/IsLocked.java and common.xml is using to detect whether the application is really running or not.
Comment 7 Jesse Glick 2012-04-23 14:56:45 UTC
*** Bug 211004 has been marked as a duplicate of this bug. ***
Comment 8 Jesse Glick 2012-04-23 16:18:35 UTC
core-main #48544616eb4b
Comment 9 Jaroslav Tulach 2012-04-24 10:20:56 UTC
The IsLockable Ant condition seems to work fine, so I am glad the apisupport.project also move in this direction.
Comment 10 Quality Engineering 2012-04-25 10:01:03 UTC
Integrated into 'main-golden', will be available in build *201204250400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/48544616eb4b
User: Jesse Glick <jglick@netbeans.org>
Log: #207530: error during start
Removing --test-userdir-lock-with-invalid-arg mechanism for testing liveness of target platform.
Instead just checking whether $userdir/lock can be locked by the IDE process.