digitalmars.D.dwt - Exception in (0): invalid utf8 input
- yidabu (9/9) Nov 29 2008 My application( contains Chinese ) some times causes Exception in (0): i...
- Frank Benoit (8/16) Nov 29 2008 A short example for error reproduction would be a perfect help.
- yidabu (12/30) Nov 29 2008 Seems exception on ApplicationWindow.setStatus(longerUtf8Str);
- yidabu (11/22) Nov 29 2008 On Sat, 29 Nov 2008 17:42:14 +0800
- Frank Benoit (10/14) Nov 29 2008 With this few information it is hard to help.
- yidabu (16/36) Nov 29 2008 dwt-samples: jface.ActionAndStatusbar
- Frank Benoit (2/2) Nov 30 2008 I added a fix for dwt-win.
- yidabu (11/13) Nov 30 2008 I upated dwt-win, run jface sample ActionAndStatusbar causes Access Viol...
- Frank Benoit (2/10) Nov 30 2008 is there location where it happens?
- yidabu (11/22) Nov 30 2008 happens on app starts. I tried all jface samples, all failed to starts, ...
- Frank Benoit (3/18) Nov 30 2008 is this an update problem? I don't see this. have you rebuilt both libs
- yidabu (11/30) Nov 30 2008 Thanks. rebuilt dwtx, seems works fine now.
My application( contains Chinese ) some times causes Exception in (0): invalid utf8 input , I find that it's from dwt.dwthelper.utils.getAbsoluteCodePointOffset getAbsoluteCodePointOffset, I failed to debug this exception by ddbg, I don't isue it's my application issue or dwt issue, any body help? -- 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/
Nov 29 2008
yidabu schrieb:My application( contains Chinese ) some times causes Exception in (0): invalid utf8 input , I find that it's from dwt.dwthelper.utils.getAbsoluteCodePointOffset getAbsoluteCodePointOffset, I failed to debug this exception by ddbg, I don't isue it's my application issue or dwt issue, any body help?A short example for error reproduction would be a perfect help. Or can you see from where the getAbsoluteCodePointOffset got called from or with what parameters? If nothing else works, you can use tango.util.log.Trace to hexdump the arguments with Trace.memory. So the question is, is getAbsoluteCodePointOffset wrong, or is it called with invalid args.
Nov 29 2008
On Sat, 29 Nov 2008 10:57:04 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:yidabu schrieb:Seems exception on ApplicationWindow.setStatus(longerUtf8Str); dwt split longerUtf8str to invalid Chinese characters I guess. -- 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/My application( contains Chinese ) some times causes Exception in (0): invalid utf8 input , I find that it's from dwt.dwthelper.utils.getAbsoluteCodePointOffset getAbsoluteCodePointOffset, I failed to debug this exception by ddbg, I don't isue it's my application issue or dwt issue, any body help?A short example for error reproduction would be a perfect help. Or can you see from where the getAbsoluteCodePointOffset got called from or with what parameters? If nothing else works, you can use tango.util.log.Trace to hexdump the arguments with Trace.memory. So the question is, is getAbsoluteCodePointOffset wrong, or is it called with invalid args.
Nov 29 2008
On Sat, 29 Nov 2008 17:42:14 +0800 yidabu <yidabu.spam gmail.com> wrote: I'm sure it's valid utf8 characters, exception when ApplicationWindow.setStaus(utf8Str);-- 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/-- 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/
Nov 29 2008
yidabu schrieb:On Sat, 29 Nov 2008 17:42:14 +0800 yidabu <yidabu.spam gmail.com> wrote: I'm sure it's valid utf8 characters, exception when ApplicationWindow.setStaus(utf8Str);With this few information it is hard to help. Can you give me an example of the input string, so i can try to find out what is the problem? for example put this at the start of getRelativeCodePointOffset: Trace.formatln( "str={}, startIndex={}, searchRelCp={}", str, startIndex, searchRelCp ); Trace.memory( str ); and post the output. Also using the stacktrace enabled tango lib from team0xf can help.
Nov 29 2008
On Sat, 29 Nov 2008 12:10:39 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:yidabu schrieb:dwt-samples: jface.ActionAndStatusbar Line 133: statman.setMessage( Format("The status action has fired. Count: {}", triggercount)); replace with: statman.setMessage( tango.text.Util.repeat("中国", 100) ); dwt split Chinese to invalid utf8 character, which causes invalid utf8 exception. -- 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/On Sat, 29 Nov 2008 17:42:14 +0800 yidabu <yidabu.spam gmail.com> wrote: I'm sure it's valid utf8 characters, exception when ApplicationWindow.setStaus(utf8Str);With this few information it is hard to help. Can you give me an example of the input string, so i can try to find out what is the problem? for example put this at the start of getRelativeCodePointOffset: Trace.formatln( "str={}, startIndex={}, searchRelCp={}", str, startIndex, searchRelCp ); Trace.memory( str ); and post the output. Also using the stacktrace enabled tango lib from team0xf can help.
Nov 29 2008
I added a fix for dwt-win. Please verify that it works for you.
Nov 30 2008
On Sun, 30 Nov 2008 09:27:59 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:I added a fix for dwt-win. Please verify that it works for you.I upated dwt-win, run jface sample ActionAndStatusbar causes Access Violation. -- 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/
Nov 30 2008
yidabu schrieb:On Sun, 30 Nov 2008 09:27:59 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:is there location where it happens?I added a fix for dwt-win. Please verify that it works for you.I upated dwt-win, run jface sample ActionAndStatusbar causes Access Violation.
Nov 30 2008
On Sun, 30 Nov 2008 11:37:34 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:yidabu schrieb:happens on app starts. I tried all jface samples, all failed to starts, the GUI not shown. -- 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/On Sun, 30 Nov 2008 09:27:59 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:is there location where it happens?I added a fix for dwt-win. Please verify that it works for you.I upated dwt-win, run jface sample ActionAndStatusbar causes Access Violation.
Nov 30 2008
yidabu schrieb:On Sun, 30 Nov 2008 11:37:34 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:is this an update problem? I don't see this. have you rebuilt both libs (dwt+dwtx)?yidabu schrieb:happens on app starts. I tried all jface samples, all failed to starts, the GUI not shown.On Sun, 30 Nov 2008 09:27:59 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:is there location where it happens?I added a fix for dwt-win. Please verify that it works for you.I upated dwt-win, run jface sample ActionAndStatusbar causes Access Violation.
Nov 30 2008
On Sun, 30 Nov 2008 13:07:29 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:yidabu schrieb:Thanks. rebuilt dwtx, seems works fine now. -- 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/On Sun, 30 Nov 2008 11:37:34 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:is this an update problem? I don't see this. have you rebuilt both libs (dwt+dwtx)?yidabu schrieb:happens on app starts. I tried all jface samples, all failed to starts, the GUI not shown.On Sun, 30 Nov 2008 09:27:59 +0100 Frank Benoit <keinfarbton googlemail.com> wrote:is there location where it happens?I added a fix for dwt-win. Please verify that it works for you.I upated dwt-win, run jface sample ActionAndStatusbar causes Access Violation.
Nov 30 2008