473,509 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Python GC does not work as it should be

On Mon, 16 Jun 2008 18:11:24 +0700, Jaimy Azle <ja***@nospam.log.web.idwrote:
>Jean-Paul Calderone wrote:
>>
A system exception? What's that? C doesn't have exceptions.

How could I determine it? I dont know GCC implementation, and others, but C
on MSVC does have it. My application were not written in C, an exception
raised was something like "access violation at address xxxx on module
python25.dll", and MSVC debugger shows collecting state were not reset (1),
that is why GC would never happen.
Ah, one of those. Thanks for the clarification. That basically means your
program was supposed to crash. Instead, since you had visual studio around
it handled the violation by popping up a dialog and giving you the choice to
continue execution, which I guess you did.

There's plenty of things other than that one static variable that can get
messed up in this scenario. The access violation could easily come along
with random memory corruption. Fixing just the GC to handle this doesn't
mean your program will be able to keep running correctly. It's difficult
or impossible to know what else has been put into an inconsistent state.

The real fix is probably to track down what is causing the access violation.
Once you fix that, the GC shouldn't need to be changed to account for this
possibility, and you'll stop getting dialogs popping up from your app. :)

Jean-Paul
Jun 27 '08 #1
2 1448
Jean-Paul Calderone wrote:
>
There's plenty of things other than that one static variable that can get
messed up in this scenario. The access violation could easily come along
with random memory corruption. Fixing just the GC to handle this doesn't
mean your program will be able to keep running correctly. It's difficult
or impossible to know what else has been put into an inconsistent state.

The real fix is probably to track down what is causing the access
violation.
Once you fix that, the GC shouldn't need to be changed to account for this
possibility, and you'll stop getting dialogs popping up from your app. :)
Yes I did my job, i had mention it before. but an application would not
consist mine only, it could be incorporate your c extension module(s), and
others, means problem could be from my side, yours, or others. Though
forcing to reset the state would not mean fixing the real problem, but
making sure the GC would always try to do its job is important as python
itself used as an integrator engine no matter whether it succeed or not.

Salam,

- Jaimy.
Jun 27 '08 #2
Yes I did my job, i had mention it before. but an application would not
consist mine only, it could be incorporate your c extension module(s), and
others, means problem could be from my side, yours, or others. Though
forcing to reset the state would not mean fixing the real problem, but
making sure the GC would always try to do its job is important as python
itself used as an integrator engine no matter whether it succeed or not.
Python does not support the Microsoft structured exceptions at all, and
there is nothing that can be done about it. There are many many many
places in the that would work incorrectly if a structured exception
occurred, including many which lead to significant memory leaks or
completely block the interpreter (as it won't return the GIL. That it
can also happen in GC is just a tiny detail of the problem.

If you think you absolutely need to have that work, just change the
code and use a modified Python DLL.

Regards,
Martin
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

49
2791
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
0
1161
by: Peter Otten | last post by:
QOTW: "Software doesn't work, and hardware is unreliable. If you wait for a guarantee that nothing will go wrong, you'll end up being my age in a just a few dozen short decades, but without the...
68
5775
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
3
2812
by: fdsl ysnh | last post by:
--- python-list-request@python.orgдµÀ: > Send Python-list mailing list submissions to > python-list@python.org > > To subscribe or unsubscribe via the World Wide Web, > visit >...
0
361
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 378 open ( +3) / 3298 closed (+34) / 3676 total (+37) Bugs : 886 open (-24) / 5926 closed (+75) / 6812 total (+51) RFE : 224 open...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
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...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.