473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Small Problem P 2.4 (line>2048 Bytes)

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
3 1450
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
>> [...]
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jim | last post by:
All of a sudden I am unable to create tables or add columns to existing tables if I specify CHARACTER greater than 254. If I try I get the following error: DB21034E The command was processed as...
2
by: sieg1974 | last post by:
Hi, I came accross this command line "#define PIDHASH_SZ (4096 >> 2)", but I didn't find any information about the >> operator. Could anyway give me a brief explanation? Thanks, Andre
2
by: ANaiveProgrammer | last post by:
Hi all I have been trying to send a struct over socket. I tried to assign the values of struct to unsigned char array. I have attached both .c files at the bottom. 'Client.c' takes a struct,...
6
by: Dave | last post by:
In .Net 2003 if a line, read from a text file is larger than a size parameter, the ifstream getline(buff, sze) put the file pointer to the EOF, so next peek() returns EOF. I saw this problem...
4
by: Josh Soref | last post by:
It seems that windows file systems can have files dated to 1617, and unfortunately if you call _findfirst/_findnext on such a directory, msvcr80d will assert. Is there some provision for...
4
by: penzer | last post by:
how to exchange 1234(number) -bytes sequence in the C#?
9
by: =?Utf-8?B?QmVu?= | last post by:
Hi, I'm trying to figure out the purpose of these operators. Now, I know what they do. They shift bits either left or right. But I don't know why would anybody want to do that. I've never seen...
3
by: MIUSS | last post by:
Hello everyone! I got a problem with creating new line... I tried this: lstrcpy(NewLineIdr, TEXT("\r\n")); I already tried this: NewLineIdr = 0x000D; NewLineIdr = 0x000A;...
1
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.