World: r3wp
[RAMBO] The REBOL bug and enhancement database
older newer | first last |
Anton 10-May-2007 [2881x3] | TO-PATH is affected the same way. |
TO-SET-PATH is also affected. | |
Submitted the above bug to RAMBO. | |
Gregg 10-May-2007 [2884] | Interesting. I assumed new-line markers were liike pseudo-values in blocks. Thanks for doing the research Anton. |
Maxim 10-May-2007 [2885] | AFAICT line-markers are attributes of the "space in between" the content. using new-line we have complete, per-space control. |
Gabriele 10-May-2007 [2886] | new-lines are attributes of value slots. values do not exist without value slots. rebol is always copyiing the 16 bytes of a rebol slot around... so it copies the new-line marker too |
Gregg 10-May-2007 [2887] | Excellent -- attributes of a value slot; that's clear. |
Anton 10-May-2007 [2888x4] | So there must be at least one bit devoted to a new-line marker. |
I tested by extracting a word, then inserting into another block. | |
>> word: first new-line/all reduce ['word] on == word >> head insert [] word == [ word ] | |
and you can move the word into other series datatypes like path, then back to a block and see the new-line has followed it. | |
Gregg 10-May-2007 [2892] | As Gabriele said, it's not just words, it's any value, because it's part of the value slot. >> val: first new-line/all [1 2 3] on == 1 >> head insert [] val == [ 1 ] |
Anton 10-May-2007 [2893] | Yes, that makes the most sense. |
Anton 12-May-2007 [2894x2] | Interesting problem: Why do I need BIND/COPY ? The aim is to copy the values of the facets in face F2 to face F1. f1: make face [] f2: make face [text: "hello"] facets: [text] set bind facets f1 reduce bind facets f2 f1/text ;== none ; <-- why ??? f1/text: none set bind/copy facets f1 reduce bind facets f2 f1/text ;== "hello" f1/text: none set bind facets f1 reduce bind/copy facets f2 f1/text ;== "hello" f1/text: none set bind/copy facets f1 reduce bind/copy facets f2 f1/text ;== "hello" |
Aha! I know why. I seem to remember doing this once before. :) The SET gets its two arguments first, which binds the block twice, leaving the block bound to f2 before the setting takes place. | |
Gregg 12-May-2007 [2896] | That was my first thought. |
Anton 12-May-2007 [2897] | It's interesting I stumbled the same way twice. Will I do it again in a year or so ? |
Gregg 12-May-2007 [2898] | It would be a good guru tech-note to post somewhere, The Singularity of Bindings. |
Anton 12-May-2007 [2899] | :-) I don't know. I kept notes in a file, but don't feel it's developed enough to publish. I have a vague desire for a new function which handles this case (as well as other, more general, set operations). |
Henrik 17-May-2007 [2900x2] | I'm hitting something that causes "invalid datatype during recycle" sometimes. I don't know yet what it is, but I thought the recycle bug was gone? |
this is on View 1.3.2 | |
Sunanda 17-May-2007 [2902] | Not gone entirely, but happens far less frequenty. Which makes it hard to debug. Very deeply nested blocks with many inserts and removes can trigger it. |
Henrik 17-May-2007 [2903] | I see. Unfortunately it seems I hit it close to every time I do a specific operation, but I have no time to debug it... |
Sunanda 17-May-2007 [2904] | It's annoying! Sometimes just moving code around can fix it. Try making some local words global, for example. |
Henrik 17-May-2007 [2905] | it's actually a showstopper for me and exactly this code needs to be working in front of a customer in about 5 hours.... |
Oldes 17-May-2007 [2906] | I think it would be good to have an example with this bug for sending it to Carl |
Henrik 17-May-2007 [2907x2] | the thing is that its db synchronization code (I'll think out loud here) and it's used in 5-6 different places. only in one place does it crash. |
it seems to be accumulative, since it does not happen in exactly the same spot every tine and is possibly related to Rugby's do-every function, because it seems to happen whenever the do-every is executed. | |
Sunanda 17-May-2007 [2909] | To tell the truth, I don't know what I did with previous versions that actually worked. But doing *something* that affected garbage colection seemd to move the bug around. eg -- global words not local words -- xx: make block! 1000 not xx: copy [] |
Henrik 17-May-2007 [2910x3] | http://rebol.hmkdesign.dk/db-sync.r<-- the db sync code is here. |
sunanda, repeated clears of a block perhaps? | |
I had adopted the techinque of clearing a block before reusage instead of using a new make block! [] Maybe that's a bad idea. | |
Sunanda 17-May-2007 [2913] | Clear -- It's probably a good idea for this reason: the block will grow to its maximum size after repeated uses, and so saves time in memory allocation / block extension. May be a bad idea if that max size is causing problems :-) |
Henrik 17-May-2007 [2914] | allocated 100000 to the first block in the code and it's still running... |
Sunanda 17-May-2007 [2915] | Let's hope that gets you through the demo....Good luck! |
Henrik 17-May-2007 [2916x2] | it crashed again :-( |
I think I'll panic and allocate 100000 elements to every single block in the database | |
Volker 17-May-2007 [2918] | i had such a problem with massive gui and async. Workarounded the following way: recycle is off permanently. there is a thread (do-every or such) which checks how much memory was allocated and when it is to much it recycled. crashing stopped. |
Oldes 17-May-2007 [2919x2] | you may try recycle/off and do it yourself |
:) | |
Volker 17-May-2007 [2921] | ;like if 20 * 1000 * 1000 + stats > last-mem [ recycle . last-mem: stats ] ;and that every 0.01 second or so. |
Oldes 17-May-2007 [2922x2] | anyway.... using make block! [] is quite useless |
allocating 100000 elements for each block will slow down performance too much I guess | |
Volker 17-May-2007 [2924] | Its only for demo, and 3:30 left. better waste memory than a contract.. |
Henrik 17-May-2007 [2925] | with recycle forced off, it seems to be running OK for now |
Oldes 17-May-2007 [2926] | just make sure you recycle sometimes... if it's long running process |
Henrik 17-May-2007 [2927x2] | it will not run more than 2-3 hours today :-) |
ok, it ran perfectly. the demo was approved and the product goes live on Wednesday. | |
Sunanda 17-May-2007 [2929] | Good news! So you have a few days to fix the recycle problem for real :-) |
Henrik 17-May-2007 [2930] | actually I'm going to look at a printerserver, which deadlocks, if two people are trying to print too close to eachother. |
older newer | first last |