Bug in CL_SALV_TREE when using ADD_AGGREGATION / SET_STYLE ?
Hi Experts!
I am trying to implement CL_SALV_TREE for creating a tree report which will be capable of performing AVERAGE and TOTAL on numeric (INT / DEC) columns. Secondly, I am trying to change the color (style) of the cell (item) based on its value.
To add aggregations I am doing something like this:
DATA: lr_aggregations TYPE REF TO cl_salv_aggregations.
lr_aggregations = gr_tree->get_aggregations( ).
lr_aggregations->clear( ).
TRY.
lr_aggregations->add_aggregation( columnname = 'BKJOB'
aggregation = if_salv_c_aggregation=>total ).
lr_aggregations->add_aggregation( columnname = 'CNJOB'
aggregation = if_salv_c_aggregation=>total ).
lr_aggregations->add_aggregation( columnname = 'AVCAP'
aggregation = if_salv_c_aggregation=>total ).
CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing.
ENDTRY.
And for changing the STYLE (background color) of a cell (item) I am using following code:
TRY .
LOOP AT it_nodes INTO wa_nodes.
l_node_key = wa_nodes-key.
nodes = gr_tree->GET_NODES( ).
node = nodes->get_node( l_node_key ).
item = node->get_item( 'BKCAP' ).
lv_val = item->get_value( ).
ASSIGN lv_val->* TO <lv_value>.
IF <lv_value> GT '100.00'.
item->set_style( lv_high ). "5 (Red)
ELSEIF <lv_value> BETWEEN '80.00' AND '100.00'.
item->set_style( lv_med ). "7 (Yellow)
ELSEIF <lv_value> LT '80.00'.
item->set_style( lv_low ). "6 (Green)
ENDIF.
ENDLOOP.
CATCH cx_salv_msg.
ENDTRY.
The color changes work fine for leaf nodes but it doesn't if it is parent node. If I comment the aggregation code, it displays the color.
I believe ADD_AGGREGATION method overrides the STYLE of the NODE ITEM.
Is it a bug? Any fixes?
Thanks & Regards,
Aabhas K Vishnoi
Actually, when you don't add the aggregations in your TREE, the Node record is exactly same as your very first Leaf so, it takes the same property as the Leaf's property. That's why we can see the color on the first node when we don't apply the Aggregations.
Now, when we apply the aggregations, system applies its own Style on the NODE (Dark Blue color) and this style overrides the style of the Leaf.
Regards,
Naimesh Patel
Similar Messages
-
Revision: 2692
Author: [email protected]
Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
Log Message:
Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
QA: Yes
Doc: No
Checkintests: Pass
Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-227
Modified Paths:
blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
blazeds/branches/3.0.x/qa/build.xmlRevision: 2692
Author: [email protected]
Date: 2008-07-31 13:05:35 -0700 (Thu, 31 Jul 2008)
Log Message:
Bug: BLZ-227 - When using JMS Destination, MessageClient and FlexClient not released from memory when the session times out.
QA: Yes
Doc: No
Checkintests: Pass
Details: Fixed a memory leak with JMS adapter. Also a minor tweak to QA build file to not to start the server if the server is already running.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-227
Modified Paths:
blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/messaging/adapters/J MSAdapter.java
blazeds/branches/3.0.x/qa/build.xml -
[Bug] Finder crashes when using "Go To Directory" from Finder icon
Hi,
My finder crashes instantly and locks everything releated to it.
This happens when i option/right click on finder and use "Go to directory" with a path name.
I can restart the finder from the dock and/or kill the process.
The finder won't crash when a finder window is already open..
So when there isnt't a finder window open, it crashes when using this option.
This is what i use:
OSX Leopard 9A581 (Dutch/Netherlands as a main language)
Intel Core Duo 1,83 Ghz
Intel GMA950 Graphics
2GB Non-ECC mem.Hi,
My finder crashes instantly and locks everything releated to it.
This happens when i option/right click on finder and use "Go to directory" with a path name.
I can restart the finder from the dock and/or kill the process.
The finder won't crash when a finder window is already open..
So when there isnt't a finder window open, it crashes when using this option.
This is what i use:
OSX Leopard 9A581 (Dutch/Netherlands as a main language)
Intel Core Duo 1,83 Ghz
Intel GMA950 Graphics
2GB Non-ECC mem. -
Possible bug in ccfe when using Apache STL
Environment details:
Solaris 10 @ patch version 148888-03
Sun Studio 12.3 (5.12, 2011/11/16)
I'm attempting to get boost 1.54 to build with this version of Sun Studio. I ran into a number of issues when trying to get it to build with stlport4 (let alone the default STL implementation) and decided to try the apache STL.
At one point when trying to build boost I ran into an error and as I delved into the problem I've discovered something extremely weird. I've been unable to reduce this to a simplified example, so I'll apologize ahead of time when I say you'll need to get the boost source code to see this happen. Here's the steps:
~ cd /tmp
~ gtar xf ~/Downloads/boost_1_54_0.tar.gz
~ cd boost_1_54_0/
~ BUILD_COMMAND=CC -library=stdcxx4 -I. libs/log/src/process_id.cpp
~ ${BUILD_COMMAND} -c
"/usr/include/stdcxx4/loc/_num_put.cc", line 67: Error: The prior declaration for std::num_put<std::_CharT, std::_Iter>::~num_put() has no exception specification.
1 Error(s) detected.
That build command is clearly simplified from what it would've been during a normal boost build, but since it reliably reproduces the error I've omitted the rest of the flags.
My environment is pretty clean; I'll quote variables that could be considered relevant:
~ env | ggrep -P 'PATH|SHELL|LANG|HOSTTYPE|OSTYPE|VENDOR|MACHTYPE|LC_TIME|LC_CTYPE
PATH=/opt/csw/bin:.:/usr/bin:/bin:/usr/local/bin:/bin:/sbin:/opt/sfw/bin
LANG=C
OSTYPE=solaris
VENDOR=sun
MACHTYPE=sparc
LC_CTYPE=C
LC_TIME=C
I'll demonstrate what I consider odd below; it'll probably be more clear through shell examples than from me describing it. Wherever you see ${BUILD_COMMAND}, it's the same as above:
~ ggrep -lRIP '_num_put.cc' /usr/include $(gfind ${SUNPRO_INSTALL_PATH}/ -type d -name include)
/usr/include/stdcxx4/loc/_num_put.c
/usr/include/stdcxx4/loc/_num_put.cc
/usr/include/stdcxx4/loc/_num_put.h
${SUNPRO_INSTALL_PATH}/prod/include/CC/stlport4/stl/_num_put.h
~ truss -eaf ${BUILD_COMMAND} -c 2>&1 | ggrep -P 'open.*_num_put\.c'
1729: open("/usr/include/stdcxx4/loc/_num_put.cc", O_RDONLY) = 8
... so clearly it's not going through _num_put.c, so it can't be going through the stlport4 header to do it; that means it must be going through _num_put.h (none of the boost headers or code files use this _num_put thing directly)
~ ${BUILD_COMMAND} -c -H 2>&1 | ggrep -P '^\s.*_num_put\.c'
The fact this last one didn't print anything seemed really odd. This next one is the weirdest though:
~ ${BUILD_COMMAND} -P
~ gsed -e '/^#/d' libs/log/src/process_id.i
~ CC -library=stdcxx4 libs/log/src/process_id.i -c
... produces no errors. It builds just fine. Furthermore, if you look at the output in the .i file (or if you use -E instead of -P) you won't see any of the code from _num_put.cc because the pre-processor doesn't spit it out.
Another way to see that:
~ ${BUILD_COMMAND} -c -Qoption ccfe ++boolflag:prepoutstd=true 2>&1 | ggrep -P '~\s*_num_put'
You won't see the destructor it's complaining about from the above. However, as I demonstrated above (and as the error message clearly demonstrates), it is in fact using the contents of _num_put.cc.
To put the final nail in the coffin, I looked at the output of using -xdumpmacros=%all (after examining how _num_put.h works) and this big of code sort of seals it for me:
~ ${BUILD_COMMAND} -c -xdumpmacros=%all 2>71 | ggrep -P '#define _RWSTD_DEFINE_TEMPLATE_(FIRST|LAST)'
/usr/include/stdcxx4/rw/_defs.h, line 1498: #define _RWSTD_DEFINE_TEMPLATE_FIRST(ignore) 0
/usr/include/stdcxx4/rw/_defs.h, line 1499: #define _RWSTD_DEFINE_TEMPLATE_LAST(ignore) 0
~ gtail -n 28 /usr/include/stdcxx4/loc/_num_put.h
#if _RWSTD_DEFINE_TEMPLATE_FIRST (_NUM_PUT)
# include <loc/_num_put.cc>
#endif /* ... more stuff ... */
There's another #if for _TEMPLATE_LAST later on with another #include line for _num_put.cc, but as demonstrated from the -xdumpmacros thing, both #if lines should not allow it to include _num_put.cc
I believe this is a bug in ccfe. If there's a straightforward way to force the compiler driver to do the preprocessing and compiling in two steps I believe I could work around this issue, but I don't see a way to do that.
As an aside, could someone point out a way to get some information on undocumented commands and flags? I found a way to get a listing, but figuring out what they actually do and when they're valid to use is another matter:
~ ${SUNPRO_INSTALL_PATH}/prod/bin/ccfe ++dumpswitches
~ ${SUNPRO_INSTALL_PATH}/prod/bin/ccfe ++dumpflags
-BrianBased on your response to my question about forcing the use of a 3rd party pre-processor, I found I can make this build error go away with the -template=no%extdef option. I was under the assumption that the compiler wouldn't take it upon itself to automatically 'discover' the .cc file and attempt to use it; I assumed once the pre-processing stage was complete it would only attempt to compile the output from the pre-processor stage. Clearly that assumption was faulty.
Thank you for the response Steve. I've put in for the IT team to get/install the updates for us.
-Brian -
Bug in Mail when using Google Apps Gmail and sync
I found a bug in the sync process between the Mac and the phone. If you have Mail (on the computer) set to use Google Apps for Your Domain, the sync on the phone changes the user for the mail account. I assume this is because it sees "smtp.gmail.com" or something and decides to "protect" you from having an incorrect user account.
So for example, if you're using Google Apps and your e-mail is [email protected], Mail (on the computer) will also have smtp.gmail.com and pop.gmail.com as the servers. When sync'd to the phone, iTunes or the phone decide to change the user account for both servers to [email protected]@gmail.com, which is of course not what we want.
I'm kind of annoyed that they're trying to protect us like this.Yeah unfortunately if you tried to send an e-mail
before discovering that bug, you will have an error
message show every time you access Mail saying "the
sender address [email protected]@gmail.com was
rejected by the server."
I can't get it to go away even by deleting the
account on iPhone and not setting it to sync.
Anybody know of a fix?
-AJT
Yes. Create the GMail account on your iPhone using the Other shortcut instead of the GMail shortcut. That will let you specify whatever address you want. -
Bug in XSQLServlet when using the XSQLDMLHandler?
Hi all & Steve,
I am trying to call the XSQLDMLHandler as a nested Handler inside my own handler. But I always get this error message:
XSQL-014: Resulting page is an empty document or had multiple document elements.
I was checking the result for the call and it seems to be ok, I get the usual status message for my update. But when my actionhandler finishs and the XSQLServlet tries to carry on, I get the error above .
I am doing this already with the XSQLQueryHandler and it works fine. So it seems to me that the XSQLServlet has a problem if the XSQLDMLHandler is called as a nested handler?
Any suggestion or help will be appreciated.
Thanks
PeterYeah unfortunately if you tried to send an e-mail
before discovering that bug, you will have an error
message show every time you access Mail saying "the
sender address [email protected]@gmail.com was
rejected by the server."
I can't get it to go away even by deleting the
account on iPhone and not setting it to sync.
Anybody know of a fix?
-AJT
Yes. Create the GMail account on your iPhone using the Other shortcut instead of the GMail shortcut. That will let you specify whatever address you want. -
BUG: 11g problem when using orabpel.jar for tasklist page
Hi,
Using 11g i created a BC view object to show a BPEL/Workflow tasklist. Using the SOAP_CLIENT method i got this working. When i test my view object with the business component tester it works. When i create a taskflow with a page fragment that has a table based on the view object it is not working. I need to deploy (among others) the orabpel.jar library with the application because my view object implementation depends on it. As soon as i run the application however with the orabpel.jar deployed the browser keeps showing the Loading image but refuses to continue to load. I also do not get any error in the console or the domain and server log files. It looks like there is a problem with some classes in the orabpel.jar that get in the way of weblogic adf libraries.
Does anybody have experience with 10.1.3 orabpel.jar library in combination with the new 11g weblogic stack? Can i somehow configure class loading in a way that weblogic classes have preference over orabpel.jar classes if they exist? Is there a way to increase logging so i can trace at what point the problem occurs? Any help would be greatly appreciated.
Kind Regards,
Andre
Edited by: AJochems (Redora) on Nov 18, 2008 2:08 PMHi,
Traced the problem to be related to the use of ADF XML menus. When i remove them the problem disappears. So i have traced the problem although i still do not exactly know what is causing it. Since there are a lot of redundant (probably altered versions) of classes in the orabpel.jar library one of them gets in the way with a weblogic class that is used while rendering the ADF Menu. The problem should be reproducible if you create a menu based on the model of an adf menu and add the orabpel.jar to your deployment.
Kind Regards,
Andre -
This is the code of my document class:
public class FirstMask extends Sprite
private var maskedShape:Shape;
public function FirstMask() {
init();
private function init():void {
maskedShape = new Shape();
addChild(maskedShape);
maskedShape.graphics.beginFill(0xff0000);
maskedShape.graphics.drawRect(0,0,80,80);
maskedShape.graphics.endFill();
var maskShape:Sprite=new Sprite();
maskShape.graphics.beginFill(0x000000);
maskShape.graphics.drawRect(0, 0, 20,20);
maskShape.graphics.endFill();
maskedShape.mask=maskShape;
var bmd:BitmapData=new BitmapData(80,80);
bmd.draw(maskedShape);
When I do not use the bmd to draw the maskedShape,everything is ok.When I do that,it seems the maskShape is auto-transformed including its position and size.As a result,I can not see the maskedShape unless I adjusted the IE size.Can anybody tell me why?
ps:If I set this.stage.align=StageAlign.TOP_LEFT; I can see the small scaled maskedShape.If I add the maskedShape to the displaylist ,everythis is ok.But Why drawing has the effect on the drawn shape?Thanks again.But the "draw" itself is all right.
After " bmd.draw(maskedShape);",I code:
var bm:Bitmap=new Bitmap(bmd);
bm.x=100;
bm.y=0;
addChild(bm);
The bm can be shown.
So to make it clear,I print the screen:
1.No"mask" No "draw" at all.
2."mask" without "draw"
3."mask"and then "draw"---the IE shows nothing
4.If I drag the IE,adjust its size,then I can see a little thing on the top-left.
confusing...
PS:If I run the code as "air application",it seems all right. -
Bug? Error when using Alternate Display for a preso with Build transitions.
I was working on a preso and Alternate Display worked fine for a while when I'd play the presentation. Then I added some Build transitions and when I tried to play the presentation, I started getting this error:
*Keynote cannot play your slideshow because an error occurred.*
I restarted Keynote and created a new presentation. Alternate Display worked fine when I just had a couple of plain test slides. Then I added a Build to a set of bullet points and started getting the error again.
Is this a known bug? Any way to fix it? Is it caused by something else?
System Version: Mac OS X 10.6.4 (10F569)
Chipset Model: NVIDIA GeForce GT 330M
Model Name: MacBook Pro
Total Number Of Cores: 2
L2 Cache (per core): 256 KB
L3 Cache: 3 MB
Memory: 4 GBCertainly not a known KN bug, but might be an expression of the NVIDIA problem referred to here: <http://www.macrumors.com/2010/09/29/nvidia-class-action-settlement-for-macbook -pro-owners/>. Given your expertise and your hardware, that'd be my first guess. Barring that, you have to line up the usual suspects: corrupt pref file, corrupted app, etc. Have you been having any other problems/strange behavior either with KN, with other apps, or with your Mac generally? What, if any, software maintenance/repair have you tried/do you do routinely?
-
Bug on terminal when using C's scanf and printf?
Hi, I'm studying C and C++ and i used to compile my files on linux and use the terminal to work with the standard i/o, but now I'm using emacs on mac and using the same method for the standard i/o (terminal), but i noticed that 'long double' values for example, are (apparently) too big for the terminal (i guess) and it can't handle the size of the output generated by my program. I Know my question might be a bit confusing but i've had a hard time looking for related topics.
Does anybody know what can i do?
Thanks.Thanks BobHarris for your reply, I think i might have found the problem, the values i was working with are 64-bit and the terminal is a 32-bit application, so, basically the terminal can't handle it and that's what's been giving me trouble, now, my question should change, How can i get a 64-bit Terminal?
(I know that in some linux distributions you can do that).
thank you. -
I have created a field input worksheet in which the user identifies start and end dates for training sessions, using the Date and Time Picker Active X Control. It works fine on-screen, but when the worksheets are printed, the dates that were selected
using the date picker calendar print out in an unreadable, huge font. The large font also appears in the print preview mode. I've tried modifying various properties in design mode, but nothing that I have tried will correct the problem.
Any ideas?The DTPicker seems to have some bugs in it when used on a worksheet. I have overcome the above by setting the size properties to the same size as a cell and the Linked cell property to the
cell under the DTPicker. (Even setting the Linked cell had problems with an error message referring to the Check box property to be set to true so I just set it to true and inserted the linked cell and set the checkbox property back to
false.)
Then the VBA code below that Hides the DTPicker after a date is selected and unhides the DTPicker when the linked cell with the date is selected. The code is for 2 DTPickers so you will need to edit to suit your requirements.
Caveat: If the DTPicker is visible then you can't hide it by selecting the same date again. If this occurs then it is a multi step operation. First select another date and the DTPicker will hide, then click on another cell then back on the cell with
the date to unhide the DTPicker and then select the correct date.
Hope it helps and feel free to get back to me with any questions etc.
Private Sub DTPicker1_Change()
Me.DTPicker1.Visible = False
End Sub
Private Sub DTPicker2_Change()
Me.DTPicker2.Visible = False
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Address
Case "$E$5" 'This is the linked cell for DTPicker1
Me.DTPicker1.Visible = True
Case "$E$13" 'This is the linked cell for DTPicker2
Me.DTPicker2.Visible = True
End Select
End Sub
Regards, OssieMac -
ITunes 11.4 bug when used with OS 10.6.8 - won't sync or backup iPhone
I actually just wanted to post this in case Apple monitors these boards. iTunes 11.4 says it's compatible with OS 10.6.8 or later, but there is a bug in it when you're running OS 10.6.8 that prevents you from backing up or synching your iPhone (in my case, a 5s). Doesn't matter what iOS you're running. If you attempt to backup in iTunes 11.4, it immediately ends the backup and only displays "Other" content being stored on your phone. Also, the "Sync" button is greyed out, so you can't even attempt to sync.
No amount of restoring (even a DFU restore) or reinstalling iTunes 11.4 will fix this. The solution is to delete iTunes 11.4 and its related files and to reinstall iTunes 11.3.1, at least until Apple gets the bug corrected. After hours of restores trying to resolve it, I followed this process and it completely solved my problem in about ten minutes. I found the solution with instructions in this thread:
Upgraded to iTunes 11.4 and now it won't sync my iPhone 5s-sync button is greyed out.
Thanks to cwa2, enee and Zak for supplying the solution. I've also summarized the steps here.
(1) Use this link to download a copy of iTunes 11.3.1:
http://www.v3.co.uk/v3-uk/download-review/1957301/apple-itunes-for-mac-1110
(2) Delete the following iTunes 11.4 components (they will be replaced when you install iTunes 11.3.1) by dragging them to the Trash:
/Applications/iTunes.app
/Library/Frameworks/iTunesLibrary.framework
/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/MobileDevices.bun dle
/System/Library/Extensions/AppleMobileDevice.kext
/System/Library/Extensions/AppleUSBEthernetHost.kext
/System/Library/PrivateFrameworks/AirTrafficHost.framework
/System/Library/PrivateFrameworks/CoreFP.framework
/System/Library/PrivateFrameworks/DeviceLink.framework
/System/Library/PrivateFrameworks/iTunesAccess.framework
/System/Library/PrivateFrameworks/MobileDevice.framework
(3) Some people have had trouble seeing the contents of the CoreTypes.bundle to get to the MobileDevices.bundle. You can access it this way:
In the Finder, select Go To Folder under the Go To menu (or Shift+ Cmd+ G)
Type in: /System/Library/CoreServices/CoreTypes.bundle/Contents/Library/
The MobileDevices.bundle will be displayed; drag it to the Trash.
(4) Empty your Trash.
(5) Install iTunes 11.3.1, and go back to living your life. Remember, do not upgrade to iTunes 11.4 again until you're certain the bug has been resolved.In Reply to all fellow Apple fans: It is great that someone found a work-around to the iTunes 11.4 no syncing problem. I think that is fine for the short term. And I am really glad that we customers have a forum to share information and experiences regarding Apple's products. However, as someone here said, we are all customers; and posting a problem here "IN HOPES THAT APPLE READS THESE POSTS" is NOT a way to resolve this issue or any issue.
PLEASE CONTACT APPLE: Apple Service Center: 1-800-275-2273 - Once you get a ticket number then and only then is this documented and then Apple can follow-through and alert the engineers who will fix this.
The "CWA2" work-around band-aid does several things in addition to reverting back to iTunes 11.3.1. :
1) It ensures that Apple continues to know nothing of the problem.
2) It ensures that the faulty code that is within 11.4 remains there and is perpetuated into future versions.
3) It ensures that YOU can never upgrade to future versions. (If the resident faulty code remains and perpetuates)
So once you have reverted back to 11.3.1, the problem APPEARS to have gone away (FOR YOU) but you have not solved the problem.
Again, respectfully,
1) Sending feedback to apple (using the "Report Bugs To Apple" menu item in Safari will get the information to someone, somewhere and add it to the pile of issues, complaints, suggestions, etc.
2) CALLING the Apple service/support Center at 1-800-275-2273 will put you in touch with a real APPLE person who will begin the process of documenting and forwarding this issue on to those who will fix it.
and
3) emailing Apple directly will make sure that they get the information.
lets get this fixed !!!!!!!!! -
Revision: 1720
Author: [email protected]
Date: 2008-05-14 14:50:06 -0700 (Wed, 14 May 2008)
Log Message:
Bugs: LCDS-304 - Authentication not working in all cases when using security constraint with NIO endpoints.
QA: Yes
Doc: No
Details:
Update to the TomcatLoginCommand to work correctly with NIO endpoints.
Ticket Links:
http://bugs.adobe.com/jira/browse/LCDS-304
Modified Paths:
blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. javaRevision: 1720
Author: [email protected]
Date: 2008-05-14 14:50:06 -0700 (Wed, 14 May 2008)
Log Message:
Bugs: LCDS-304 - Authentication not working in all cases when using security constraint with NIO endpoints.
QA: Yes
Doc: No
Details:
Update to the TomcatLoginCommand to work correctly with NIO endpoints.
Ticket Links:
http://bugs.adobe.com/jira/browse/LCDS-304
Modified Paths:
blazeds/branches/3.0.x/modules/opt/src/tomcat/flex/messaging/security/TomcatLoginCommand. java -
When using the BerkeleyDB shared environment in parallel processes, the processes get "out of memory" error, even when there is plenty of free memory available. This results in possible database corruption.
Typical use case when this bug manifests is when BerkeleyDB is used by rpm, which is installing an rpm package into custom location, or calls another rpm instance during the installation process.
The bug seems to originate in the env/env_region.c file: (version of the file from BDB 4.7.25, although the culprit code is the same in newer versions too):
330 /*
331 * Allocate room for REGION structures plus overhead.
332 *
333 * XXX
334 * Overhead is so high because encryption passwds, replication vote
335 * arrays and the thread control block table are all stored in the
336 * base environment region. This is a bug, at the least replication
337 * should have its own region.
338 *
339 * Allocate space for thread info blocks. Max is only advisory,
340 * so we allocate 25% more.
341 */
342 memset(&tregion, 0, sizeof(tregion));
343 nregions = __memp_max_regions(env) + 10;
344 size = nregions * sizeof(REGION);
345 size += dbenv->passwd_len;
346 size += (dbenv->thr_max + dbenv->thr_max / 4) *
347 __env_alloc_size(sizeof(DB_THREAD_INFO));
348 size += env->thr_nbucket * __env_alloc_size(sizeof(DB_HASHTAB));
349 size += 16 * 1024;
350 tregion.size = size;
Usage from the rpm's perspective:
The line 346 calculates how much memory we need for structures DB_THREAD_INFO. We allocate structure DB_THREAD_INFO for every process calling db4 library. We don't deallocate these structures but when number of processes is greater than dbenv->thr_max then we try to reuse some structure for process that is already dead (or doesn't use db4 no longer). But we have DB_THREAD_INFOs in hash buckets and we can reuse DB_THREAD_INFO only if it is in the same hash bucket as new DB_TREAD_INFO. So line 346 should contain:
346 size += env->thr_nbucket * (dbenv->thr_max + dbenv->thr_max / 4) *
347 __env_alloc_size(sizeof(DB_THREAD_INFO));
Why we don't encounter this problem earlier? There are some magic reserves as you can see on line 349 and some other additional space is created by alligning to blocks. But if we have two processes running at the same time and these processes end up in the same hash bucket and we repeat this proces many times to fill all hash buckets with two DB_THREAD_INFOs then we have 2 * env->thr_nbucket(37) = 74 DB_THREAD_INFOs, which is much more than dbenv->thr_max(8) + dbenv->thr_max(8) / 4 = 10 and plus allocation from dbc_put, we are out of memory.
And how we will create two processes that end up in the same hash bucket. We can start one process (rpm -i) and then in scriptlet we start many processes (rpm -q ...) in loop and one of them will be in the same hash bucket as the first process (rpm -i).
I would like to know your opinion on this issue, and if the proposed fix would be acceptable.
Thanks in advance for answers.The attached patch for db-4.7 makes two changes:
it allows enough for each bucket to have the configured number of threads, and
it initializes env->thr_nbuckets, which previously had not been initialized.
Please let us know how it works for you.
Regards,
Charles -
Bug in JDev 9.0.3.3 when using derived views
Hi,
I observed in JDev 9.0.3.3 the following behavior when
using derived views:
-I'm creating the view V1 based on the entity E1, add to it a couple of fields from E1 without generating Java files and close the wizard
-now I'm trying to create another view V1Ext that extends V1; when I try to add to V1Ext new fields from E1, the corresponding wizard button is disabled!!
Regards,
DanIf you whant to add additional attributes from E1 you must now the "magic clue" to tell Jdeveloper to make E1 editable. As far as I know this is not a bug, but a "feature" of JDeveloper:
Do the following:
In the ViewObject Wizard go to the Entities page and mark the Entity E1 on the left and also mark Entity E1 on the right. Now you will realize that the Button ">" will be enabled. If you click on it you will be asked if you "want to update Entity E1 with E1..." (don't know the actual message, sorry). Press "OK" and you will be able to edit attributes of E1.
It's magic, isn't it?
Maybe you are looking for
-
My iphone 4 got damp last night and this morning it is locked with a lock symbol in the upper right corner. How do I unlock this so I can use my phone?
-
Automation API License - FlashBuilder Premium 4.5, SDK 3.6A
Hi, I'm currently doing a POC with FlexMonkey in order to automate some user interface tests. I have Licensed version of Flash Builder 4.6 Though i have a premium license of 4.5, I am using FlexSDK 3.6A to compile the project, after recordning / play
-
Hi All, I'm having seroius difficulty with Mail. Every time I start it up, it crashes within 30 seconds and I have to Force Quit every time. It has all the looks of a virus!!!! How do I erradicate this or how do I go about reinstalling Mail. I've rep
-
Hi I might be forced to migrate my project from JDeveloper 9.0.3.4 to 9.0.4 due to an ugly bug. As far as I can see JDeveloper 9.0.4 uses OC4J 9.0.4. But does this mean, that I also have to upgrade my Application Server to 9.0.4 ? Or is it possible t
-
HELP recovery of files needed!!!
I deleted about 79 pictures of something that is not possible to do again, they were stored in: /home/WIBBLE/.Desktop/Develop I know for sure that they are all jpg files. Is there any software I can run to scan for jpg files etc and recover them?