Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Subscript out of range on AIX in AbstractRemoteResourceManagerConfigurationWizardPage

Dave,

Was your fix something like this?

	protected void updateConnectionPulldown() {
IRemoteServices[] allRemoteServices = PTPRemotePlugin.getDefault ().getAllRemoteServices();
		int selectionIndex = remoteCombo.getSelectionIndex();
if (allRemoteServices != null && allRemoteServices.length > 0 && selectionIndex >=0) {
			IRemoteServices selectedServices = allRemoteServices[selectionIndex];
			remoteServicesId = selectedServices.getId();

If so, then I think this is probably the correct behavior if the selection index is -1 (i.e. do nothing). If you see this issue anywhere else, let me know and I'll fix it.

Greg

On Aug 7, 2007, at 9:25 AM, Dave Wootton wrote:

Greg
I see different behavior on Linux/gtk and Aix/Motif Eclipse. On AIX, I
open the new resource manager wizard and select 'PE' from the list of
available RM types then click next. At that point, the breakpoint I have set on the updateRemotePlugin method triggers, before the second page of the wizard displays. On Linux, when I do the same thing, the breakpoint does not trigger. It only triggers after the 2nd page is displayed and I
click the 'new' button.

For AIX, it looks like what is going on is the following at the breakpoint 1) updateRemotePulldown() calls remoteCombo.removeAll() (approx line 421)
2) The Combo class calls OS.XmTextSetString, which in turn calls
OS._XmTextSetString
3) _XmTextSetString calls Display.windowProc (presumably the Motif
ComboBox widget has invoked a XmNvalueChangedCallback due to clearing the
combo box list)
4) The Combo class handles the event and calls
AbstractRemoteResourceManagerConfigurationWizardPage$1.modifyText (the
listener for the ModifyEvent)
5) The listener calls updateRemotePulldown
6) At approx line 381, updateRemotePulldown calls
remoteCombo.getSelectionIndex()
7) Since the combo box is not displayed and/or because the combo box is
empty (from step 1), there cannot be a selection made, so
getSelectionIndex() returns -1.
8) Subscript out of range exception.

I fixed this by ensuring that the selection index was >=0. Would the
correct solution be that if selection index is -1 (no selection), that
this method does nothing?

Unfortunately, I think this potentially affects any place where we use
combo widgets. Assuming this is correct behavior, I wonder how the rest of
eclipse deals with this.

This man page explains a little about ComboBox and XmNvalueChangedCallback

http://hpux.ewi.tudelft.nl/hppd/hpux/Development/Libraries/ ComboBox-1.32/man.html

Dave



Greg Watson <g.watson@xxxxxxxxxxxx>
Sent by: ptp-dev-bounces@xxxxxxxxxxx
08/06/2007 09:26 PM
Please respond to
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>


To
Parallel Tools Platform general developers <ptp-dev@xxxxxxxxxxx>
cc

Subject
Re: [ptp-dev] Subscript out of range on AIX in
AbstractRemoteResourceManagerConfigurationWizardPage






Ugh, I don't have an AIX machine to even begin to look at this. I can
take a look at the code to see if I can figure out what is going on,
but I suspect this may be an AIX/Motif thing. Particularly if it
doesn't happen on Linux. If you can get a handle on what is going
wrong, let me know. I'll try and give you a call in the next couple
of days if you like.

Greg

On Aug 6, 2007, at 4:14 PM, Dave Wootton wrote:

I've sorted out my problems with configure scripts and have my proxy
successfully built for AIX. I've installed RSE runtime and RSE SDK
into my
AIX installation and started my PTP session in a new workspace. I
created
a Local connection from within the RSE perspective even though I'm not
sure I needed one. Then I switched to the PTP perspective and tried
to add
a new PE proxy. I get the first page of the proxy wizard and select
PE (my
proxy type) from the list and click next. Nothing happens, except
for an
ArrayIndexOutOfBoundsException with index -1 reported at line 381 of
AbstractRemoteResourceManagerConfigurationWizardPage
(updateConnectionPulldown()) is posted to the error log.

I traced thru code for the call to remoteCombo.getSelectionIndex()
and in
getSelection() I see a line 'if (OS.XmListPosSelected(argList[1],
index))
return index - 1;
This is returning -1. This is before my proxy wizard page is even
displayed.

If I modify the code in updateConnectionPulldown() to call
remoteCombo.getSelectionIndex, and use the max of the returned
value or
zero, then I do get the second wizard page and can create an entry
for my
proxy.

This all works correctly on x86 Linux, so I'm wondering if I missed
something in my setup or if there is something odd going on with the
AIX/Motif Eclipse.

Dave
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev




Back to the top