472,364 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 1395
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
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
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
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
3
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
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
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

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.