区域设置会导致运行时崩溃 [英] Regional settings cause runtime crash

查看:66
本文介绍了区域设置会导致运行时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用vb.net 2003(框架1.1)编写了一个应用程序,它可以自动化第三方查看/打印应用程序(通过activex控件)。我已经在去年发布了几个版本的b $ b而没有问题,但是自从获得一台新的笔记本电脑以来,人们无法运行该程序,因为我用它来构建它

新机器。即使我使用修改后的代码并使用旧的

机器构建它,它仍然会崩溃。


我想也许这是代码,但它运行我可以获得所有机器的罚款。


然后我收到欧洲大陆某人的电子邮件(我住在英国) />
谁说如果他们在控制面板中的区域选项部分更改了

中的小数点分隔符,他们可以让它工作。来自美国和新的

Zealand的人现在也在运行程序时遇到问题。


旧机器有一个我在商店购买的XP Home的副本并且我自己安装了
,新机器预装了XP家用。在两个我有/ b $ b windows设置为英语(英国)与相同的分隔符等,但我注意到

两台机器之间的一些选项是不同的。对于标准数字(0123456789),新机器具有

选项。和数字替换(无)。

代码页转换表列表中的选项也不同。


两台机器都在运行XP主页SP2。


问题是,区域设置是否会导致运行时错误,如果是这样的话?

如何绕过它们?我不是一个高级程序员,也不知道我正在做什么导致问题。


谢谢提前。

I''ve written an application with vb.net 2003 (framework 1.1) which automates
a 3rd party viewing/printing application (via an activex control). I''ve
released several versions over the last year without problem, but since
getting a new laptop, people can''t run the program since I built it with the
new machine. Even if I take the modified code and build it with my old
machine, it still crashes.

I thought maybe it was the code, but it runs fine on all of the machines I
have access to.

Then I got an email from someone in continental Europe (I live in the UK)
who said they could get it to work if they changed the decimal separator in
the regional options section in the contol panel. People from the US and New
Zealand also have problems running the program now.

The old machine has a copy of XP Home which I bought from a store and
installed myself, the new machine has XP home pre-installed. On both I have
windows set to English (UK) with the same separator etc., but I notice that
some options are different between the two machines. The new machine has
options for "Standard digits (0123456789)" and "Digit substitution (None)".
The selections on the list of Code page conversion tables are also different.

Both machines are running XP Home SP2.

The question is, can the regional settings cause runtime errors, and if so
how can I get around them? I''m not an advanced programmer, and don''t know
what I''m doing that''s causing the problems.

Thanks in advance.

推荐答案

如果你自己解析日期或数值,那可能是因为

的差异分隔符。你需要获得一个

的堆栈跟踪,其中问题恰好确定了源并然后修复它。


Colmag <钴**** @ discussions.microsoft.com>在消息中写道

news:65 ********************************** @ microsof t.com ...
If you are parsing dates or numeric values yourself, that might do it due to
differences in separator characters. You would need to get a stack trace of
where the problem happens to really pinpoint the source and then fix it.

"Colmag" <Co****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
我已经用vb.net 2003(框架1.1)编写了一个应用程序,它自动化了第三方查看/打印应用程序(通过activex控制)。我已经在去年发布了几个版本而没有任何问题,但是自从获得一台新的笔记本电脑以来,人们无法运行该程序,因为我用
构建了它。 >新机器。即使我使用修改后的代码并使用我的旧机器构建它,它仍然会崩溃。

我想也许是代码,但它在我所有的机器上运行良好有权访问。

然后我收到一封来自欧洲大陆的人的电子邮件(我住在英国)
谁说他们可以让它工作,如果他们改变小数点分隔符

控制面板中的区域选项部分。来自美国和新西兰的人现在也在运行程序时遇到问题。

旧机器有一个XP Home的副本我从商店购买并且
自己安装,新机已经预装了XP家用。在这两个窗口上都设置了英语(英国)和相同的分隔符等,但我注意到
这两台机器之间的选项有所不同。新机器具有标准数字(0123456789)的选项。 数字替换
(无)。
代码页转换表列表中的选项也不同。

两台机器都在运行XP主页SP2。

问题是,区域设置是否会导致运行时错误,如果是这样的话
如何绕过它们?我不是高级程序员,也不知道我正在做什么导致问题。

提前致谢。
I''ve written an application with vb.net 2003 (framework 1.1) which
automates
a 3rd party viewing/printing application (via an activex control). I''ve
released several versions over the last year without problem, but since
getting a new laptop, people can''t run the program since I built it with
the
new machine. Even if I take the modified code and build it with my old
machine, it still crashes.

I thought maybe it was the code, but it runs fine on all of the machines I
have access to.

Then I got an email from someone in continental Europe (I live in the UK)
who said they could get it to work if they changed the decimal separator
in
the regional options section in the contol panel. People from the US and
New
Zealand also have problems running the program now.

The old machine has a copy of XP Home which I bought from a store and
installed myself, the new machine has XP home pre-installed. On both I
have
windows set to English (UK) with the same separator etc., but I notice
that
some options are different between the two machines. The new machine has
options for "Standard digits (0123456789)" and "Digit substitution
(None)".
The selections on the list of Code page conversion tables are also
different.

Both machines are running XP Home SP2.

The question is, can the regional settings cause runtime errors, and if so
how can I get around them? I''m not an advanced programmer, and don''t know
what I''m doing that''s causing the problems.

Thanks in advance.



感谢您的回复。


我没有做任何约会,据我所知我没有用数字来做任何与众不同的事情。


由于问题已经开始,我建立了一些日志,所以我会尝试获取你引用的

堆栈跟踪。我可以通过改变我自己的

控制面板设置来复制这个问题,所以我会放手一搏。


" Marina"写道:
Thanks for the response.

I''m not doing anything with dates, and as far as I''m aware I''m not doing
anything out of the ordinary with numbers.

Since the problems started, I built in some logging, so I''ll try and get the
stack trace you refer to. I can replicate the problem by changing my own
control panel setting, so I''ll give that a go.

"Marina" wrote:
如果您自己解析日期或数值,可能是因为分隔符的差异。你需要得到一个堆栈痕迹
,问题恰好确定了源,然后修复它。

Colmag <钴**** @ discussions.microsoft.com>在消息中写道
新闻:65 ********************************** @ microsof t.com。 ..
If you are parsing dates or numeric values yourself, that might do it due to
differences in separator characters. You would need to get a stack trace of
where the problem happens to really pinpoint the source and then fix it.

"Colmag" <Co****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
我已经用vb.net 2003(框架1.1)编写了一个应用程序,它可以自动化第三方查看/打印应用程序(通过activex控件)。我已经在去年发布了几个版本而没有任何问题,但是自从获得一台新的笔记本电脑以来,人们无法运行该程序,因为我用
构建了它。 >新机器。即使我使用修改后的代码并使用我的旧机器构建它,它仍然会崩溃。

我想也许是代码,但它在我所有的机器上运行良好有权访问。

然后我收到一封来自欧洲大陆的人的电子邮件(我住在英国)
谁说他们可以让它工作,如果他们改变小数点分隔符

控制面板中的区域选项部分。来自美国和新西兰的人现在也在运行程序时遇到问题。

旧机器有一个XP Home的副本我从商店购买并且
自己安装,新机已经预装了XP家用。在这两个窗口上都设置了英语(英国)和相同的分隔符等,但我注意到
这两台机器之间的选项有所不同。新机器具有标准数字(0123456789)的选项。 数字替换
(无)。
代码页转换表列表中的选项也不同。

两台机器都在运行XP主页SP2。

问题是,区域设置是否会导致运行时错误,如果是这样的话
如何绕过它们?我不是高级程序员,也不知道我正在做什么导致问题。

提前致谢。
I''ve written an application with vb.net 2003 (framework 1.1) which
automates
a 3rd party viewing/printing application (via an activex control). I''ve
released several versions over the last year without problem, but since
getting a new laptop, people can''t run the program since I built it with
the
new machine. Even if I take the modified code and build it with my old
machine, it still crashes.

I thought maybe it was the code, but it runs fine on all of the machines I
have access to.

Then I got an email from someone in continental Europe (I live in the UK)
who said they could get it to work if they changed the decimal separator
in
the regional options section in the contol panel. People from the US and
New
Zealand also have problems running the program now.

The old machine has a copy of XP Home which I bought from a store and
installed myself, the new machine has XP home pre-installed. On both I
have
windows set to English (UK) with the same separator etc., but I notice
that
some options are different between the two machines. The new machine has
options for "Standard digits (0123456789)" and "Digit substitution
(None)".
The selections on the list of Code page conversion tables are also
different.

Both machines are running XP Home SP2.

The question is, can the regional settings cause runtime errors, and if so
how can I get around them? I''m not an advanced programmer, and don''t know
what I''m doing that''s causing the problems.

Thanks in advance.




Marina,


感谢您的建议。似乎我在转换

变量类型方面做得很狡猾。


因为有很多人限制访问权限的地方,
我避免在注册表中写任何东西。要存储应用程序设置

,例如窗口位置,我会在应用程序关闭时写入包含这些设置的文本文件,并在应用程序启动时读取配置文件。 />

我将一个变量声明为一个字符串,它等于文本文件

中的一行,然后将其应用到我的应用程序中。例如:


Dim MainTop As String = streamtoread.ReadLine

Me.top = MainTop


适当的区域设置(十进制分隔符=。)。net将

字符串转换为整数没问题,但只要我将区域设置

更改为逗号之类的内容,转换不再有效。


有什么建议吗?

" Colmag"写道:
Marina,

Thanks for the suggestion. It seems I''m doing something dodgy in converting
variable types.

Because there are so many places where people have restricted access rights,
I''ve avoided writing anything to the registry. To store application settings
such as window positions, I write a text file containing these settings when
the app closes, and read the config file when the app starts.

I''m declaring a variable as a string which equals a line from the text file
and then applying that to my application. e.g:

Dim MainTop As String = streamtoread.ReadLine
Me.top = MainTop

With appropriate regional settings (decimal separator = .) .net converts the
string to an integer no problem, but as soon as I change the regional setting
to something like a comma, the conversion no longer works.

Any suggestions?
"Colmag" wrote:
感谢您的回复。

我对约会没有做任何事情,据我所知,我是没有用数字做任何与众不同的事情。

由于问题已经开始,我内置了一些日志记录,所以我会尝试获取你引用的
堆栈跟踪至。我可以通过改变我自己的
控制面板设置来复制这个问题,所以我会放手一搏。

Marina写道:
Thanks for the response.

I''m not doing anything with dates, and as far as I''m aware I''m not doing
anything out of the ordinary with numbers.

Since the problems started, I built in some logging, so I''ll try and get the
stack trace you refer to. I can replicate the problem by changing my own
control panel setting, so I''ll give that a go.

"Marina" wrote:
如果您自己解析日期或数值,可能是因为分隔符的差异。你需要得到一个堆栈痕迹
,问题恰好确定了源,然后修复它。

Colmag <钴**** @ discussions.microsoft.com>在消息中写道
新闻:65 ********************************** @ microsof t.com。 ..
If you are parsing dates or numeric values yourself, that might do it due to
differences in separator characters. You would need to get a stack trace of
where the problem happens to really pinpoint the source and then fix it.

"Colmag" <Co****@discussions.microsoft.com> wrote in message
news:65**********************************@microsof t.com...
我已经用vb.net 2003(框架1.1)编写了一个应用程序,它可以自动化第三方查看/打印应用程序(通过activex控件)。我已经在去年发布了几个版本而没有任何问题,但是自从获得一台新的笔记本电脑以来,人们无法运行该程序,因为我用
构建了它。 >新机器。即使我使用修改后的代码并使用我的旧机器构建它,它仍然会崩溃。

我想也许是代码,但它在我所有的机器上运行良好有权访问。

然后我收到一封来自欧洲大陆的人的电子邮件(我住在英国)
谁说他们可以让它工作,如果他们改变小数点分隔符

控制面板中的区域选项部分。来自美国和新西兰的人现在也在运行程序时遇到问题。

旧机器有一个XP Home的副本我从商店购买并且
自己安装,新机已经预装了XP家用。在这两个窗口上都设置了英语(英国)和相同的分隔符等,但我注意到
这两台机器之间的选项有所不同。新机器具有标准数字(0123456789)的选项。 数字替换
(无)。
代码页转换表列表中的选项也不同。

两台机器都在运行XP主页SP2。

问题是,区域设置是否会导致运行时错误,如果是这样的话
如何绕过它们?我不是高级程序员,也不知道我正在做什么导致问题。

提前致谢。
I''ve written an application with vb.net 2003 (framework 1.1) which
automates
a 3rd party viewing/printing application (via an activex control). I''ve
released several versions over the last year without problem, but since
getting a new laptop, people can''t run the program since I built it with
the
new machine. Even if I take the modified code and build it with my old
machine, it still crashes.

I thought maybe it was the code, but it runs fine on all of the machines I
have access to.

Then I got an email from someone in continental Europe (I live in the UK)
who said they could get it to work if they changed the decimal separator
in
the regional options section in the contol panel. People from the US and
New
Zealand also have problems running the program now.

The old machine has a copy of XP Home which I bought from a store and
installed myself, the new machine has XP home pre-installed. On both I
have
windows set to English (UK) with the same separator etc., but I notice
that
some options are different between the two machines. The new machine has
options for "Standard digits (0123456789)" and "Digit substitution
(None)".
The selections on the list of Code page conversion tables are also
different.

Both machines are running XP Home SP2.

The question is, can the regional settings cause runtime errors, and if so
how can I get around them? I''m not an advanced programmer, and don''t know
what I''m doing that''s causing the problems.

Thanks in advance.




这篇关于区域设置会导致运行时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆