Jump to page: 1 2
Thread overview
dwt-samples\jface run time Exception: Attempt to include invalid key _in Collection
May 05, 2008
yidabu
May 05, 2008
John Reimer
Re: dwt-samples\jface run time Exception: Attempt to include
May 06, 2008
Tower Ty
May 06, 2008
yidabu
May 06, 2008
Frank Benoit
May 06, 2008
yidabu
May 06, 2008
Frank Benoit
terrible executable size if with dsss -full buildflags
May 06, 2008
yidabu
May 06, 2008
yidabu
May 06, 2008
Frank Benoit
May 07, 2008
yidabu
May 18, 2008
Long Chang
May 05, 2008
only ShowFieldPrefs.d builds and runs ok, other samples cause run time error:

tango.core.Exception.IllegalElementException: Attempt to include invalid key _in
 Collection

what's the issue ? how to fix this?

tested with DMD 1.028, Tango svn, dwt svn, dwt addons svn.

-- 
yidabu <yidabu.spam@gmail.com> http://www.dsource.org/projects/dwin

D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/


May 05, 2008
On Mon, 05 May 2008 18:20:27 +0800, yidabu wrote:

> only ShowFieldPrefs.d builds and runs ok, other samples cause run time error:
> 
> tango.core.Exception.IllegalElementException: Attempt to include invalid
> key _in
>  Collection
> 
> what's the issue ? how to fix this?
> 
> tested with DMD 1.028, Tango svn, dwt svn, dwt addons svn.


I believe DWT svn is tracking the Tango releases.  Thus you are likely to get an error if you use Tango svn.  Last Tango release was 0.99.6.

-JJR

May 06, 2008
John Reimer Wrote:


> I believe DWT svn is tracking the Tango releases.

What does this mean John ? DWT releases are  lagging Tango releases or something else ?
May 06, 2008


On Mon, 5 May 2008 13:20:32 +0000 (UTC)
John Reimer <terminal.node@gmail.com> wrote:

> On Mon, 05 May 2008 18:20:27 +0800, yidabu wrote:
> 
> > only ShowFieldPrefs.d builds and runs ok, other samples cause run time error:
> > 
> > tango.core.Exception.IllegalElementException: Attempt to include invalid
> > key _in
> >  Collection
> > 
> > what's the issue ? how to fix this?
> > 
> > tested with DMD 1.028, Tango svn, dwt svn, dwt addons svn.
> 
> 
> I believe DWT svn is tracking the Tango releases.  Thus you are likely to get an error if you use Tango svn.  Last Tango release was 0.99.6.
> 
> -JJR

I switched to Tango 0.99.6 (revision 3461), get same errors.

tested with DMD 1.028, Tango 0.99.6, dwt-win svn, dwt addons svn.



-- 
yidabu <yidabu.spam@gmail.com> http://www.dsource.org/projects/dwin

D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/


May 06, 2008
yidabu schrieb:
> only ShowFieldPrefs.d builds and runs ok, other samples cause run time error:
> 
> tango.core.Exception.IllegalElementException: Attempt to include invalid key _in
>  Collection
> 
> what's the issue ? how to fix this?
> 
> tested with DMD 1.028, Tango svn, dwt svn, dwt addons svn.
> 


I used tango collections in many places. But it turns out that they are different in some ways.
One example is, that maps from tango throw on null keys, in java they do not.

I still did not test the jface examples with tango 0.99.6, sorry.

Did they work for you with 0.99.5? (to be sure its an tango 0.99.5->0.99.6 issue)
Did you apply the changes from http://www.dsource.org/projects/dwt/wiki/JFace ?
May 06, 2008
On Tue, 06 May 2008 03:11:07 +0200
Frank Benoit <keinfarbton@googlemail.com> wrote:

> yidabu schrieb:
> > only ShowFieldPrefs.d builds and runs ok, other samples cause run time error:
> > 
> > tango.core.Exception.IllegalElementException: Attempt to include invalid key _in
> >  Collection
> > 
> > what's the issue ? how to fix this?
> > 
> > tested with DMD 1.028, Tango svn, dwt svn, dwt addons svn.
> > 
> 
> 
> I used tango collections in many places. But it turns out that they are
> different in some ways.
> One example is, that maps from tango throw on null keys, in java they do
> not.
> 
> I still did not test the jface examples with tango 0.99.6, sorry.
> 
> Did they work for you with 0.99.5? (to be sure its an tango 0.99.5->0.99.6 issue)

I tested with tango 0.99.5 svn first, get same issues.

> Did you apply the changes from http://www.dsource.org/projects/dwt/wiki/JFace ?

yes, I apply the changes to build dwtx.lib.

-- 
yidabu <yidabu.spam@gmail.com> http://www.dsource.org/projects/dwin

D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/


May 06, 2008
yidabu schrieb:
>> Did they work for you with 0.99.5? (to be sure its an tango 0.99.5->0.99.6 issue)
> 
> I tested with tango 0.99.5 svn first, get same issues.

hm, i tested all jface examples in this scenario.
Do you have a chance to locate the problematic place within dwtx ? stacktrace/debugger?
May 06, 2008
On Tue, 06 May 2008 09:12:33 +0200
Frank Benoit <keinfarbton@googlemail.com> wrote:


> hm, i tested all jface examples in this scenario.
> Do you have a chance to locate the problematic place within dwtx ?
> stacktrace/debugger?

build ok if add -full to dsss buildflags, but the executable size is 14.1 MB to build a simplest JFace sample:

import
    dwt.widgets.Display,
    dwt.widgets.Shell,
    dwt.DWT,
    dwt.widgets.Control,
    dwt.widgets.Composite,
    dwt.widgets.Label,
    dwtx.jface.window.ApplicationWindow;

public class MyWindow : ApplicationWindow
{
    this()
    {
        super(null);
    }
    void run()
    {
        setBlockOnOpen(true);
        open();
        Display.getCurrent.dispose;
    }

    protected Control createContents(Composite parent)
    {
        auto label = new Label(parent, DWT.CENTER);
        label.setText("hello");
        return label;
    }

}

void main(char[][] args)
{
    (new MyWindow).run;

}


due to the executable is larger if build with dsss -full, I want to build JFace application via dmd: dmd test.d -L/SUBSYSTEM:windows:5

but cause unhandled run time exception (swt based code have not this issue):
 tango.core.Exception.IllegalElementException: Attempt to include invalid key _in Collection

how to fix this ?



-- 
yidabu <yidabu.spam@gmail.com> http://www.dsource.org/projects/dwin

D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/


May 06, 2008
On Tue, 6 May 2008 17:52:22 +0800
yidabu <yidabu.spam@gmail.com> wrote:

> On Tue, 06 May 2008 09:12:33 +0200
> Frank Benoit <keinfarbton@googlemail.com> wrote:
> 
> 
> > hm, i tested all jface examples in this scenario.
> > Do you have a chance to locate the problematic place within dwtx ?
> > stacktrace/debugger?
> 
> build ok if add -full to dsss buildflags, but the executable size is 14.1 MB to build a simplest JFace sample:
> 
> import
>     dwt.widgets.Display,
>     dwt.widgets.Shell,
>     dwt.DWT,
>     dwt.widgets.Control,
>     dwt.widgets.Composite,
>     dwt.widgets.Label,
>     dwtx.jface.window.ApplicationWindow;
> 
> public class MyWindow : ApplicationWindow
> {
>     this()
>     {
>         super(null);
>     }
>     void run()
>     {
>         setBlockOnOpen(true);
>         open();
>         Display.getCurrent.dispose;
>     }
> 
>     protected Control createContents(Composite parent)
>     {
>         auto label = new Label(parent, DWT.CENTER);
>         label.setText("hello");
>         return label;
>     }
> 
> }
> 
> void main(char[][] args)
> {
>     (new MyWindow).run;
> 
> }
> 
> 
> due to the executable is larger if build with dsss -full, I want to build JFace application via dmd: dmd test.d -L/SUBSYSTEM:windows:5
> 
> but cause unhandled run time exception (swt based code have not this issue):
>  tango.core.Exception.IllegalElementException: Attempt to include invalid key _in Collection
> 
> how to fix this ?
> 

same executable size if build with dmd directly.

dwt.lib : 6177 KB
dwtx.lib: 8788 KB
JFace based executable size: 14MB+ (with -release -O -inline buildflags)

does whole lib linked into JFace based executable?

14 MB is too bigger!!

how to decrease the executable size (e.g. to 7MB without UPX) ?

-- 
yidabu <yidabu.spam@gmail.com> http://www.dsource.org/projects/dwin

D 语言-中文(D Chinese): http://www.d-programming-language-china.org/ http://bbs.d-programming-language-china.org/ http://dwin.d-programming-language-china.org/ http://scite4d.d-programming-language-china.org/


May 06, 2008
yidabu schrieb:
> On Tue, 6 May 2008 17:52:22 +0800
> yidabu <yidabu.spam@gmail.com> wrote:
> 
>> On Tue, 06 May 2008 09:12:33 +0200
>> Frank Benoit <keinfarbton@googlemail.com> wrote:
>>
>>
>>> hm, i tested all jface examples in this scenario.
>>> Do you have a chance to locate the problematic place within dwtx ? stacktrace/debugger?
>> build ok if add -full to dsss buildflags, but the executable size is 14.1 MB to build a simplest JFace sample:
>>
>> import      dwt.widgets.Display,
>>     dwt.widgets.Shell,
>>     dwt.DWT,
>>     dwt.widgets.Control,
>>     dwt.widgets.Composite,
>>     dwt.widgets.Label,
>>     dwtx.jface.window.ApplicationWindow;
>>
>> public class MyWindow : ApplicationWindow
>> {        this()
>>     {
>>         super(null);
>>     }
>>     void run()
>>     {                setBlockOnOpen(true);
>>         open();
>>         Display.getCurrent.dispose;
>>     }
>>         protected Control createContents(Composite parent)
>>     {
>>         auto label = new Label(parent, DWT.CENTER);
>>         label.setText("hello");
>>         return label;
>>     }
>>     }
>>
>> void main(char[][] args)
>> {
>>     (new MyWindow).run;
>>         }  
>>
>>
>> due to the executable is larger if build with dsss -full, I want to build JFace application via dmd:
>> dmd test.d -L/SUBSYSTEM:windows:5 
>>
>> but cause unhandled run time exception (swt based code have not this issue):
>>  tango.core.Exception.IllegalElementException: Attempt to include invalid key _in Collection
>>
>> how to fix this ? 
>>
> 
> same executable size if build with dmd directly.
> 
> dwt.lib : 6177 KB
> dwtx.lib: 8788 KB
> JFace based executable size: 14MB+ (with -release -O -inline buildflags)
> 
> does whole lib linked into JFace based executable? 
> 
> 14 MB is too bigger!!
> 
> how to decrease the executable size (e.g. to 7MB without UPX) ?
> 

I don't know exactly why the old dwt is significant smaller in code size. Perhaps this is because Shawn combined many Java classes into modules. I decided not to do this, instead I want to stay as close as possible to the Java sources. So later merges are easier.

Another issue is, to have dynamic libs available. Afaik, at the moment DMD doesn't support dynamic libs for classes/exceptions/GC on win32 nor linux. On win32 DDL might be an option. But i don't know if libs would solve your problem with the executable size.

So my main toolchain issues at the moment are:
- compile speed
- executable size
- dynamic lib supprt (D<->D with classes/interfaces/exceptions/...)
- distribution system with easy install and dependency management
- better debugging support and stacktrace information at runtime

Frank


« First   ‹ Prev
1 2