By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,716 Members | 1,304 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,716 IT Pros & Developers. It's quick & easy.

Small Problem P 2.4 (line>2048 Bytes)

P: n/a
Hi, all !

I have un python script of 75 kB, who make a COM server. It's run OK with
Python 2.3 + PyWin + P.I.L.

But, with Python 2.4, I obtain a windows error (sorry, it's in french) :

python.exe a rencontrée un problème, et doit fermer.

erreur sur module: ntdll.dll

Exception Information
Code: 0xc0000005
Flags: 0x00000000
Record: 0x000000000000000
Address: 0x0000000077f773905

I had try on three computers differents (XP SP1 and/or SP2) : it's same.

After search, I had found that the problem come from a "long line" (more
than 2048 caracters), with begin :
mappingcharmaj = { chr(97):'A', chr(98):'B', chr(99):'C', ...

And, if I "break" in multiples lines, the problem is solved.

(I keep the script, to be able to repeat the error, upon request)
Therefore, I have a sufficient solution. But I want just to announce this
problem, which could have consequences, for other users.
*sorry for my bad english*
@-salutations
--
Michel Claveau

Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Michel Claveau - abstraction méta-galactique non triviale en fuite
perpétuelle. wrote:
Hi, all !

I have un python script of 75 kB, who make a COM server. It's run OK with
Python 2.3 + PyWin + P.I.L.

But, with Python 2.4, I obtain a windows error (sorry, it's in french) :

python.exe a rencontrée un problème, et doit fermer.

erreur sur module: ntdll.dll

Exception Information
Code: 0xc0000005
Flags: 0x00000000
Record: 0x000000000000000
Address: 0x0000000077f773905

I had try on three computers differents (XP SP1 and/or SP2) : it's same.

After search, I had found that the problem come from a "long line" (more
than 2048 caracters), with begin :
mappingcharmaj = { chr(97):'A', chr(98):'B', chr(99):'C', ...

And, if I "break" in multiples lines, the problem is solved.

(I keep the script, to be able to repeat the error, upon request)
Therefore, I have a sufficient solution. But I want just to announce this
problem, which could have consequences, for other users.
*sorry for my bad english*


Michael:

You should probably log this as a bug in the sourceforge tracker - it's
good to see that shortening the lines fixed the bug for you, but it
would be even better if the problem were removed.

Your English, by the way, is perfectly comprehensible, so there is no
need to apologise.

regards
Steve

--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
Jul 18 '05 #2

P: n/a
>> [...]
After search, I had found that the problem come from a "long line" (more
than 2048 caracters), with begin :
mappingcharmaj = { chr(97):'A', chr(98):'B', chr(99):'C', ...

And, if I "break" in multiples lines, the problem is solved.


This sounds like bug http://www.python.org/sf/1076985
"Incorrect behaviour of StreamReader.readline leads to crash".

Are you using a PEP 263 coding header for your script?

Bye,
Walter Dörwald


Jul 18 '05 #3

P: n/a
Hi !

You are a very good soothsayer (*) !

With # -*- coding: cp-1252 -*- it's bugging
With # -*- coding: utf-8 -*- it's OK !

(*) soothsayer is the masculine of pythoniss (good english term ?)

--
Michel Claveau


Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.