Memory access violation caused in string class

Hello all,
I have a multithreaded application. In my main thread I create a link list using the STL list container. The list is an doubly link list of structs and each struct contains a string* to identify the name of the struct.
The string* is allocated in the main thread using new as shown below:-
typedef struct{
string* name;
}GRM;
GRM* lgrm = new GRM;
//I have a pre-allocated GRM struct with values filled in and I am making a local copy of it here..
_localCopy(GRM &lgrm, const GRM &grm);
mylist.push_back(*lgrm);
void _localCopy(GRM &lgrm, const GRM &grm)
name = new string( grm.name->c_str());
somewhere else in this I invoke multiple threads with each thread trying to print the name of a single struct.
Now the problem is even before the threads are invoked, the address of the location pointed by the lgrm.name gets changed. Not sure why??. when I trace this variable ( lgrm.name ) inside the list, it remains intact till I start allocating memory for my thread objects:
pthread_t *child = new pthread_t[maxThreads];
The problem completely disappears when I use char* instead of string* ..
Please help!!!!
Is it do with some STL library requirements. I use -mt and -D_REENTRANT option and the library=-lpthread

Yes, I am compiling and linking with -mt option. This is what is happening. I am giving you the debug output. I have function called readXMLInput() where I create a struct called grm of type GSstruct.
typedef struct{
string* groupName;
}_GSstruct;
typedef<_GSstruct> GSlist
typedef struct{
string *rName;
GSlist gslist;
} Combo;
list<Combo> clist;
--------------------------debug output--------------------------
2836 _grm.groupName = new string(uc.groupAddress);
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) next
t@1 (l@1) stopped in MgroupManager::readXMLInput at line 2837 in file "MgroupManager.cc"
2837 _grm.problemCondition=0;
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print _grm.groupName
_grm.groupName = 0x14d6c0
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print _grm.groupName
_grm.groupName = {
__data_ = {
__data_ = 0x14d280 "239.2.2.2"
__nullref = struct __rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char> > > /* STATIC CLASS */
-----------------------debug output end---------------------
Now somewhere down I pass this struct as reference pointer to another function called
insertToComboList(&grm) where I make a copy of the contents of this struct _grm by copying its contents into another struct lgrm of the same type but allocated on the heap: see below:-
---------------------------debug output-------------------------
GSstruct* lgrm   = new GSstruct;
_localGSCopy(*lgrm,grm);
localGSCopy(GSstruct&lgrm, GSstruct &grm)
595 lgrm.groupName =new string();
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) next
t@1 (l@1) stopped in McastTopo::_localGSCopy at line 596 in file "McastTopo.cc"
596 lgrm.groupName->assign(*(grm.groupName));
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) next
t@1 (l@1) stopped in McastTopo::_localGSCopy at line 597 in file "McastTopo.cc"
597 lgrm.sourceLen = grm.sourceLen;
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print lgrm.groupName
lgrm.groupName = 0x14d6d0
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print *lgrm.groupName
*lgrm.groupName = {
__data_ = {
__data_ = 0x14d188 "239.2.2.2"
__nullref = struct __rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char> > > /* STATIC CLASS */
-------------------------debug output end-------------------
3. Now this struct is inserted into a list of type GSstruct which belongs to another struct of type Combo as mentioned in step 1. sorry if it is getting complicated and unfortunately it is complicated..
Combo *rs = new Combo;
combo.gslist.pushback(*lgrm);
867 rs->gslist.push_back(*lgrm);
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) next
t@1 (l@1) stopped in McastTopo::_insertToComboList at line 868 in file "McastTopo.cc"
868 rlist.push_back(*rs);(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) st.__node.next.data.groupName <print
*clist.__node->next->data.gslist.__node->next->data.groupName = {
__data_ = {
__data_ = 0x14d188 "239.2.2.2"
__nullref = struct __rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char> > > /* STATIC CLASS */
-----------------------end of debug output------------------
4. as you can see from above, the struct still contains the groupName with valid data content.
5. Now down the line we stop before we starts the thread to see if the contents have changed in the above memory location. see below. we are in a method called forkChildren()
----------------------------debug output-----------------------
t@1 (l@1) stopped in MgroupManager::forkChildren at line 2584 in file "MgroupManager.cc"
2584 cout << "printing list 1 in fork children.."<<endl<<endl;
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print *clist.__node.next.data.gs >
*clist.__node->next->data.gslist.__node->next->data.groupName = {
__data_ = {
__data_ = 0x14d188 "239.2.2.2"
__nullref = struct __rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char> > > /* STATIC CLASS */
----------------------output end---------------------------------
6. Now we will trace thru this method to see where the contents are changing. see that I am going to allocate memory for pthread_t and I check the data content of groupName inside the list before I execute this line:-
---------------------------debug out start------------------
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx)next
2620 pthread_t *child = new pthread_t[maxThreads];
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print *clist.__node.next.data.gs >
*clist.__node->next->data.gslist.__node->next->data.groupName = {
__data_ = {
__data_ = 0x14d188 "239.2.2.2"
__nullref = struct __rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char> > > /* STATIC CLASS */
--------------------------debug output end-------------
7. as you can see from above it is stil intact. Now I will go ahead and execute this line and see the contents inside my clist
----------------------------debug starts------------------
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx)next
2621 int *timeArray = new int[maxThreads +1];
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) print *clist.__node.next.data.gs >
*clist.__node->next->data.gslist.__node->next->data.groupName = {
__data_ = {
__data_ = 0x14d708 ""
__nullref = struct __rwstd::__null_string_ref_rep<char,std::char_traits<char>,std::allocator<char>,__rwstd::__string_ref_rep<std::allocator<char> > > /* STATIC CLASS */
------------------------debug ends here.----------------------
As you can see from above as I moved from line number 2620 to 2621, my clist memory content holding the groupName got erased. NOT SURE HOW!!
Please help. I am very tempted to move to char* way of doing things rather than using STL string as I have spend enough time on this.
Thanyou all in advance for help here.. I am frustrated!- could be a silly error on my part but I am clueless.

Similar Messages

  • Profile error: Memory access violation (data fetch)

    Hello,
    I have VI with a lot of mathematic Nodes. When I try to profile it, I allways get this error: "Memory access violation (data fetch)".
    Keil uVision shows this error:
    "Memory write not possible (Real-Time Agent)
    Memory read not possible (Real-Time Agent)"
    Without profiling the VI works on the MCB2400. And profiling also works if I try very simple examples.
    bye & thanks
    amin

    Hi Amin, Alex,
    I noticed this issue had been open for some time, so I decided to post directly to save time.
    Thanks,
    Jaidev Amrite
    LabVIEW Embedded PSE
     Diagnosis: So apparently, this behavior has nothing to do with the profiler. The culprit is the Advanced Analysis SubVI call (Mean.vi) in BB.vi. 
    Mean.vi has a call library function node inside it and this CLN is configured to run in its own thread (labVIEW spawns a new thread for each call). Probably due to bad thread management on the ARM (in this case), this call causes a memory violation. 
    Solution:Turn off the "Run in any thread" setting on the CLN as shown in the attached screenshot - change it to "Run in UI Thread". For good measure also turn off reentrancy on Mean.vi (second screenshot)
    National Instruments
    LabVIEW Embedded Product Support Engineer

  • Unigraphics CPP JNI Memory Access violation.

    I have written a CPP code to get datas from Unigraphics which internally calls java through jni. I have created a dll using vc++6.0.
    when i run the dll from Unigraphics I am getting this problem.
    Prob: memory access violation.
    But i can able to create JVM using
    res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    But when i use cls = env->FindClass("Prog");
    i am getting this error from Unigraphics.
    (Note : CPP code can be invoked only from Unigraphics. b'cos Its a internal call from unigraphics through dll. This works fine when i write external cpp code to retrive datas from Unigraphics with jni code).
    If needed vl send the code.

    thanks for your reply.
    Most of the examples I have found on the net use a 3 parameter call to getStringUTFchars looking something similar to this:
    const char *str = GetStringUTFChars( env, some_jstring, 0);However when I try and add a third param in my dll file using VC++, i get a compile error saying:
    error C2660: 'JNIEnv_::GetStringUTFChars' : function does not take 3 argumentseven though clearly in the stacktrace output I previously included, in one of the lines it says that JINEnv does take 3 params:
    at JNIEnv_.GetStringUTFChars(JNIEnv_* , _jstring* str, Byte* isCopy)I am not sure why but using 2 params is the only way i can get the dll to compile correctly.
    That is why I used      const char *cName;
         const char *wName;
         cName = env->GetStringUTFChars( className,false);
         wName = env->GetStringUTFChars( windowName, false);Also, as I said at the end of my first post, somehow the program worked a few times ( 3-4 ) without giving me the errors, and thus, gave me the intended output. However, I have not been able to get it to work since then, nor do I know what I did, or what happened so that it would work in the first place.
    -Dale
    Message was edited by:
    smithdale87

  • CIN Code memory access violation

    I am new to CINs and am trying something simple but get a memory access violation when the following code segment executes:
    typedef struct {
    int32 dimSize;
    uInt8 Numeric[1];
    } TD13;
    typedef TD13 **TD13Hdl;
    MgErr CINRun(TD13Hdl *configMsgDataIn);
    MgErr CINRun( TD13Hdl *configMsgDataIn)
    /* Insert code here */
    (**configMsgDataIn)->Numeric[0] = 10;
    return noErr;
    How do I reference the array?

    Got the same problem!!!
    Can someone please tell me what is wrong with the following code?
    typedef struct
        int32 dimSize;
        float64 Numeric[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    MgErr CINRun(TD1Hdl *Array);
    MgErr CINRun(TD1Hdl *Array)
        int32 size = (**Array)->dimSize;
        return noErr;
    Every single time, when trying to acces the array, Dev Studio generates the following error:
    Unhandled exception in
    Labview.exe (LVS73.TMP) : 0XC0000005: Access Violation.
    Whats the deal ??? The input array is not even empty!
    Thanks...
    SW used :
    - VC++ 5.0
    - Labview 7 Express - Student edition
    - Windows XP Professional SP2

  • Adobe Reader 10.1.7 crashing with memory access violation

    After upgrading to 10.1.7 on some Windows Server 2003 SP2 (32-bit) terminal servers, we get Adobe Reader X unable to open any PDF. It launches for a brief second and then closes, apparently with exit code -1073741819 which I was able to get from running Sysinternal Process Monitor, since the Reader application and Windows give no indication or popup error about why the program crashed. I understand this exit code translates to 0xC0000005 "access violation". To make things more interesting, it seems to ONLY occur when accessing the servers via RDP, and may have somethig to do with the configured screen resolution or color depth for that RDP session. In some cases we are able to get Adobe to open for the same user opening the same PDF file without crashing by temporarily changing the RDP settings to a lower resolution, or a color depth other than 256 colors. I tried to disable protected mode at startup via local Group Policy in the registry, but that did not seem to help. We are running McAfee VirusScan Enterprise as well, though I have no indication that is a factor at this point. Any clues on what might be going on here or how to zero in closer on the problem?

    From event log, when trying to access preferences.
    Event Type: Error
    Event Source: Application Error
    Event Category: (100)
    Event ID: 1000
    Date:  16-05-2012
    Time:  14:35:09
    User:  N/A
    Computer: AOCITRIX09
    Description:
    Faulting application AcroRd32.exe, version 10.1.3.23, faulting module unknown, version 0.0.0.0, fault address 0x000528ef.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 41 70 70 6c 69 63 61 74   Applicat
    0008: 69 6f 6e 20 46 61 69 6c   ion Fail
    0010: 75 72 65 20 20 41 63 72   ure  Acr
    0018: 6f 52 64 33 32 2e 65 78   oRd32.ex
    0020: 65 20 31 30 2e 31 2e 33   e 10.1.3
    0028: 2e 32 33 20 69 6e 20 75   .23 in u
    0030: 6e 6b 6e 6f 77 6e 20 30   nknown 0
    0038: 2e 30 2e 30 2e 30 20 61   .0.0.0 a
    0040: 74 20 6f 66 66 73 65 74   t offset
    0048: 20 30 30 30 35 32 38 65    000528e
    0050: 66                        f      

  • Access violation Internal string variable

    Hello ,
    I have a code here that is kind of tricky to me. The code works fine when it it in the
    main function of my C program. BUT when I try to run the same code in a custom function that I create, I get the error
    Access violation writing location 0xNNNNNNNN  (N being any hex number)
    So after reading on or two comments on the internet I understood that the variable in the custom might have been allocated memory in some read only area. BUT I need to use it in my custom function. So could anybody explain me what exactly is happenig and how
    to move around it ?
    Below is the code
    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    void test(void);
    void main(void)
    test();
    _getch();
    void test(void)
    {char const * typeOP;
    int repType = 0;
      do
            system("cls");
        printf("Enter a string)\n");
            typeOP = (const char*)malloc(sizeof(const char));
        fflush(stdin);
        if (!scanf_s("%s", typeOP))
                printf("ERROR\n");
                repType = 1;
        } while (repType);
    _getch();
    Below is the code that works fine
    #include<stdio.h>
    #include<conio.h>
    #include<stdlib.h>
    void main(void)
    char const * typeOP;
    int repType = 0;
    do
    system("cls");
    printf("Enter a string)\n");
    typeOP = (const char*)malloc(sizeof(const char));
    fflush(stdin);
    if (!scanf_s("%s", typeOP))
    printf("ERROR\n");
    repType = 1;
    } while (repType);
    _getch();

    I see three obvious problems with the code:
    The first, you seem to see yourself -- you are modifying a char const * string.  This is bad form.  Having said that, I doubt that it would cause a crash, because the actual address returned by malloc will be to memory that is read/write. 
    Just get rid of the const though.  You only use const to announce you do not intend to change the data that typeOP points to.  However you obviously do intend to change the data.
    The huge issue is that you are using malloc to allocate enough space to hold exactly one char, but you are trying to store an entire array of them in there.  Normally, if you want to malloc the storage, you would use something like:
    typeOP = (const char*)malloc(1000 *sizeof(const char));
    (You can replace 1000 with the size of the largest possible string you would expect someone to type -- be sure to include 1 for the null terminator).  This will allocate storage for an entire string.  scanf also has format specifiers to prevent
    the user from entering more data than you provided storage.
    Finally you leak the memory you allocated.   You need a free call before the end of your loop to release the memory.  Again, failure to release the memory won't cause a crash (unless you eventually leak so much that Windows cannot give you
    any more)
    Lastly, as a style note:  I would suggest using a fixed size array in this scenario instead of malloc -- then you cannot forget to free the memory. 
    Something like:
    char typeOP[1000]; // also remove the line with malloc

  • LabVIEW Class crash - ntdll.dll access violation

    Hi,
    When I close my LV11SP1f2 I always get a warning.
    It didn't bother me until a vi I wrote that uses a class with nothing out of the ordinary started crashing my LV.
    The crash says that: "DAbort 0x37C03D in MemoryManager.cpp"
    I sent the log files to the local support and they saw that the common issue between my logs is an access violation in ntdll.dll.
    Any operation that uses the property nodes of that crazy class fails, sometimes with a crash and sometimes with a error that sends me to a bundle by name in the autocreated property node.
    I rewrote the project with the class and there is no error.
    Sending the crashing project to another computer gave no error.
    Before I go on and investigate windbg to search for a conflicting app and finally formatting my entire computer could some1 help? Please...
    I attached several logs for example.
    Thanks in advance,
    GoofyWires.
    Attachments:
    92c82e7b-fa2a-43af-b2be-a6650c031681.zip ‏2485 KB
    daa462b5-9395-4e3f-8894-05a3bdb3d159.zip ‏65 KB
    ea2c40ef-056d-41ed-a4c5-9cf4bc6666fc.zip ‏494 KB

    I did a clean format and reinstalled LabVIEW 11.0.1f2 without adding many of the add-ons from VIPM and without installing the rest of my shortwave, yet, the crash is still here!
    I was able to reproduce it on my pc:
    1. I have a class that contains two children of another class which each contain another class with a class inside it.
    2. I accessed the classed through property nodes.
    3. I then went on and deleted a private data from the first class control, deleted its property nodes and added a new private data to that class control and added the property nodes for it.
    4. I updated the vi that used the classes to stop using the deprecated property node and start working with the new one.
    5. I did a "save all" and run the vi. All OK!
    6. I closed LabVIEW and reopened the project and run the vi which is not broken! LabVIEW crashes!!!
    I guess the complexity of the class is not the issue and it can be reproduced in a much simpler way.
    Yet, since I bet the scenario caused you to raise an eye brow I'll give an example as an analogy:
    File Handler class contains ASCII Read class and ASCII Write class which inherit from class ASCII.
    Class ASCII parent contains class Headers while class Header contains class Data.
    Thus, class ASCII Handler will use class ASCII Read/Write to give a high level simple interface while during the read/write the inner ASCII Read, for example, will add to the Header class in it the read data which will in turn be added to the array in the private data of class Data.
    I'll try and reproduce it on a different pc and send the local NI support the code and way to reproduce.
    I see two possibilities:
    1. Something is wrong with my new Dell PC.
    2. LabVIEW doesn't handle and propagate correctly changes in a class to all the vis that use it. Maybe changing the array size in a class overrides some memory since the class can't change its size.
    Please let me know if this rings a bell.
    Update: I coundn't reproduce the crash on my pc with a simpler case. There is something missing...
    I'll try to replroduce with the complex class on a different pc and if it crashes I'll simply send my original code.

  • "Access Violation" exception while accessing PDEImage in outside of the class as a parameter

    Hi,
    In our project, we are retrieving PDEImage content from PDF Page by using below line of code in our Plugin project:
    But we are getting "Access Violation" exception while accessing retrieved PDEImage in outside of the class as a parameter.
    This issue is happening only in Windows 8.1 and Acrobat 11 combination.
    If we remove the above highlighted lines from the method then no exception and working fine.
    But we don't know why these lines are added, because we are not updating any of the PDF content here.
    We are planning to remove these highlighted lines from the method.
    We want to know whether the removing of these lines will impact the application.
    Kindly help us to resolve the issue.

    And will removing the lines impact the application? Certainly. If you do not call PDPageReleasePDEContent you will have a memory leak at best, or may prevent other activity from completing (such as saving or closing the file). The first two lines, however, are redundant since you do not seem to be actually changing the page.
    You must call PDPageReleasePDEContent  when you have finished with the content, in every case.

  • Is the instance fields have private accessibility in String class?

    Is the instance fields have private accessibility in an immutable class, such as the String class?
    also Could any one answer the following question,
    (This is the question I got in written exam for job recruitment)
    "Invoking a method can represent a significant amount of overhead in a program; as such, some compilers will perform an optimization called "method inlining." This optimization will remove a method call by copying the code inside the method into the calling method."
    Referring to the text above, which one of these statements is true?
    Choice 1 The performance benefits should be balanced against the increased chance of a RuntimeException.
    Choice 2 It allows the use of getter and setter methods to execute nearly as fast as direct access to member variables.
    Choice 3 This optimization will only occur if the relevant methods are declared volatile.
    Choice 4 The developer of inlined methods must copy and paste the code that is to be inlined into another method.
    Choice 5 It prevents code from executing in a way that follows object-oriented encapsulation.

    Sarwan_Gres wrote:
    Is the instance fields have private accessibility in an immutable class, such as the String class?Usually, but not always.
    "Invoking a method can represent a significant amount of overhead in a program; as such, some compilers will perform an optimization called "method inlining." This optimization will remove a method call by copying the code inside the method into the calling method."The java compiler does not inline methods so this is not relevant to Java. (The JVM does inline methods) The java compiler does inline constants known at compile time but it is a feature causes more trouble than good IMHO.

  • How to access a method of a class which just known class name as String

    Hi,
    Now I have several class and I want to access the method of these class. But what I have is a String which contain the complete name of the class.
    For example, I have two class name class1and class2, there are method getValue in each class. Now I have a String containing one class name of these two class. I want to access the method and get the return value.
    How could I do?
    With Class.forName().newInstance I can get a Object. but it doesn't help to access and execute the method I want .
    Could anybody help me?
    Thanks

    Or, if Class1 and Class2 have a common parent class or interface (and they should if you're handling them the same way in the same codepath)...Class c = Class.forName("ClassName");
    Object o = c.newInstance(); // assumes there's a public no-arg constructor
    ParentClassOrInterface pcoi = (ParentClassOrInterface)o;
    Something result = pcoi.someMethod(); Or, if you're on 5.0, I think generics let you do it this way: Class<ParentClassOrInterface> c = Class.forName("ClassName");
    // or maybe
    Class<C extends ParentClassOrInterface> c = Class.forName("ClassName");
    ParentClassOrInterface pcoi = c.newInstance();
    Something result = pcoi.someMethod();

  • Memory leak in string class

    We have developed our application in Solaris 10 environment. While running Purify on that it shows leak in the string class. This leak is incremental and so process size keeps in increasing. If we replace string with char array, the leaks disappears and process size also becomes stable.
    Following is the snapshot of the memory leak stack reported by Purify:
    MLK: 4505 bytes leaked in 85 blocks
    * This memory was allocated from:
    malloc [rtlib.o]
    operator new(unsigned) [libCrun.so.1]
    void*operator new(unsigned) [rtlib.o]
    __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> >*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep(unsigned,unsigned) [libCstd.so.1]
    char*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::replace(unsigned,unsigned,const char*,unsigned,unsigned,unsigned) [libCstd.so.1]
    std::basic_string<char,std::char_traits<char>,std::allocator<char> >&std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const char*) [libCstd.so.1]
    Has anyone faced this problem earlier or is there any patch available for this?

    Over time, we have found and fixed memory leaks in the C++ runtime libraries.
    Get the latest patches for the compiler you are using. (You didn't say which one.) You can find all patches here:
    [http://developers.sun.com/sunstudio/downloads/patches/index.jsp]
    Also get the latest Solaris patch for the C++ runtime libraries, listed on the same web page.
    If that doesn't fix the problem, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to demonstrate the problem.

  • Access violation (0xC0000005) cause crash

    Access violation (0xC0000005) cause crash. The crash report is as blow. It may be caused by the function IMAQ FillHole. How this function crash?
    Who knows why? Thank you!
    #Date: 2014年8月12日 14:21:51
    #OSName: Windows 7 Ultimate 
    #OSVers: 6.1
    #OSBuild: 7600
    #AppName: 
    #Version: 12.0 32-bit
    #AppKind: AppLib
    #AppModDate: 08/12/2014 06:17 GMT
    #LabVIEW Base Address: 0x30000000
    <LVExec>
    {"a":[
    "vi": "D\\VISION_SYSTEM\\build\\MyProgram.exe\\IMAQ FillHole",
    "ctx": "主应用程序实例",
    "type": "subVI"
    "vi": "D\\VISION_SYSTEM\\build\\MyProgram.exe\\ccd2表面2二值化.vi",
    "ctx": "主应用程序实例",
    "type": "subVI"
    </LVExec>
    <DEBUG_OUTPUT>
    2014/8/12 16:48:15.894
    Crash 0x0: Crash caught by NIER
    File Unknown(0) : Crash 0x0: Crash caught by NIER
    minidump id: 6e35643f-8ff2-49e6-bbde-98bac2ffa48a
    ExceptionCode: 0xC0000005$N
    </DEBUG_OUTPUT>
    0x307277B4 - lvrt <unknown> + 0
    0x30727B38 - lvrt <unknown> + 0
    0x7C37FDB4 - MSVCR71 <unknown> + 0
    0x77CA5A74 - ntdll <unknown> + 0
    0x77C8B3C8 - ntdll <unknown> + 0
    0x00000000 - <unknown> <unknown> + 0
    Solved!
    Go to Solution.
    Attachments:
    ccd2表面2二值化.vi ‏21 KB

    Hi,
    please stick with your original thread! Don't create double posts!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Statements like 'List String .class' cause error.

    Consider the following simple code:
        Class<List<String>> cl;
        cl=List<String>.class;The first line is valid but the second one causes the "illegal start of expression" error.
    That's rather strange: the type
    Class<List<String>>is valid itself, but variables of that type cannot be assigned via the ".class" expression.
    Is this a bug or I am missing something?
    Thanks.

    Java generics aren't C++ templates; they don't cause new classes to be created based on parameter type.
    What this means is that for types...
    List<String> stringList = new ArrayList<String>();
    List<Number> numberList = new ArrayList<Number>();...the class of those lists is, in both cases, java.util.ArrayList...
    string.getClass().equals(ArrayList.class);
    numberList.getClass().equals(ArrayList.class);Neither class ArrayList<String> nor class ArrayList<Number> exist, because such generics information is wiped out at runtime. That's why an expression like...
    ArrayList<Number>.class...is illegal.

  • Did the Java Writers Get a Little Happy with Memory Use in String class?

    I mean that question half jokingly.
    Taking a look at the String class code, I saw the following (below).
    Why is there an int for offset and an int for count?
    String is immutable, why not just return value.length for the count?
    And what is the offset for?
    Thanks!
    public final class String
        implements java.io.Serializable, Comparable<String>, CharSequence
        /** The value is used for character storage. */
        private final char value[];
        /** The offset is the first index of the storage that is used. */
        private final int offset;
        /** The count is the number of characters in the String. */
        private final int count;
        /** Cache the hash code for the string */
        private int hash; // Default to 0PS: a second look kinda verifies it too.
    in the constructor ,count is even defined as value.length.
        public String(char value[]) {
         int size = value.length;
         this.offset = 0;
         this.count = size;
         this.value = Arrays.copyOf(value, size);
        }

    You don't get the choice. The arrays are shared
    whenever you do substring.Yea, thats my point. I think most Strings are unique.
    Id be very surprised if even 2% of all String use was
    a result of a substring.The wrapper classes use it for parsing.
    File uses it for getName and getParent.
    String uses it for trim.
    Class uses it for resolving names.
    Regex uses it.
    etc. ...
    Now, I don't know what percentage of usage all that amounts to, but it IS heavily used.
    So your desire to gain the 2 bytes back would cost enough byte every time substring is used that it might end up costing far more than the 8 bytes you save.

  • JNI Hotspot Error: Access Violation, need help interpreting the log.

    Hello. I'm a relatively new developer (previously an engineer), and so to start me off I was given the task of providing a JNI-enabled interface to some legacy licensing software (it's C++, we want Java). Now the functionality of JNI is not the problem I have. I HAD those types of problems but now I'm having a far more obscure problem that is absolutely stumping me.
    It's a Hotspot error that I cannot get rid off... and I cannot find a clear bit of info on how to interpret them.
    About the problem...first off this does not happen on my development machine, where it is isolated from other components in the end-product. The integration machine with the rest of the software runs fine with a "Dummy" version of my component, but we get errors when the real version is in use. I'd really appreciate any help in understanding these things, even if it is just some general pointers.
    First off here is the log
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c82caa4, pid=5516, tid=4420
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_14-b03 mixed mode)
    # Problematic frame:
    # C  [ntdll.dll+0x2caa4]
    ---------------  T H R E A D  ---------------
    Current thread (0x0aa1eaa0):  JavaThread "btpool0-5" [_thread_in_native, id=4420]
    siginfo: ExceptionCode=0xc0000005, reading address 0x00000004
    Registers:
    EAX=0x0b1a9a40, EBX=0x00030000, ECX=0x00001448, EDX=0x00000000
    ESP=0x0c90e774, EBP=0x0c90e780, ESI=0x0b1a9a38, EDI=0x0b1aa000
    EIP=0x7c82caa4, EFLAGS=0x00010246
    Top of Stack: (sp=0x0c90e774)
    0x0c90e774:   00030000 00000003 00030005 0c90e7b8
    0x0c90e784:   7c833a2a 0b1a9a4c 0b1aa000 0c90e7ac
    0x0c90e794:   00000000 00000477 00030178 00030000
    0x0c90e7a4:   0ab2de05 0003015c 00000600 0afd0000
    0x0c90e7b4:   00030178 0c90e9e4 7c82b5fb 04030000
    0x0c90e7c4:   000023b8 000023ac 00000000 7c829fd6
    0x0c90e7d4:   7c82a124 00031138 0c90ea04 7c82a0b8
    0x0c90e7e4:   7c82a0fc 000001ba 00000000 7c829fd6
    Instructions: (pc=0x7c82caa4)
    0x7c82ca94:   63 02 00 8b 4e 0c 8d 46 08 8b 10 89 4d 08 8b 09
    0x7c82caa4:   3b 4a 04 89 55 0c 0f 85 ae 4f 01 00 3b c8 0f 85
    Stack: [0x0c8d0000,0x0c910000),  sp=0x0c90e774,  free space=249k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C  [ntdll.dll+0x2caa4]
    C  [ntdll.dll+0x33a2a]
    C  [ntdll.dll+0x2b5fb]
    C  [MSVCRT.dll+0x1d08c]
    C  [verify.dll+0x4897]
    C  [verify.dll+0x19c6]
    C  [verify.dll+0x126b]
    C  [java.dll+0x3fb7]
    V  [jvm.dll+0x11d86a]
    V  [jvm.dll+0x78acb]
    V  [jvm.dll+0x78deb]
    V  [jvm.dll+0x78aaa]
    V  [jvm.dll+0xcb029]
    V  [jvm.dll+0xcbcc6]
    V  [jvm.dll+0xcbbac]
    V  [jvm.dll+0x82c7b]
    j  com.a.b.c.lmv.Factoralproducer.MeanManagerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;
    Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;Ljava/lang/Boolean;
    Lorg/oasis_open/docs/wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lcom/a/b/c/lmv/Factoralproducer/MeanPolicyType;Ljavax/xml/datatype/XMLGregorianCalendar;
    Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+231
    j  com.a.b.c.lmv.Factoralproducer.FactoralProducerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;
    Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;Ljava/lang/Boolean;Lorg/oasis_open/docs/wsrf/_2004/_06/
    wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lcom/a/b/c/lmv
    /Factoralproducer/MeanPolicyType;Ljavax/xml/datatype/XMLGregorianCalendar;Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+20
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0x875dd]
    V  [jvm.dll+0xdfd96]
    V  [jvm.dll+0x874ae]
    V  [jvm.dll+0xf3f82]
    V  [jvm.dll+0xa5752]
    C  [java.dll+0x6d4f]
    j  sun.reflect.NativeMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
    J  sun.reflect.DelegatingMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Lorg/apache/cxf/message/Exchange;
    Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+57
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object;
    Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+26
    j  org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object
    ;Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+179
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object;)
    Ljava/lang/Object;+114
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run()V+26
    j  org.apache.cxf.workqueue.SynchronousExecutor.execute(Ljava/lang/Runnable;)V+1
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Lorg/apache/cxf/message/Message;)V+94
    j  org.apache.cxf.phase.PhaseInterceptorChain.dcntercept(Lorg/apache/cxf/message/Message;)Z+76
    j  org.apache.cxf.transport.ChainInitiationObserver.onMessage(Lorg/apache/cxf/message/Message;)V+137
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+334
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+341
    j  org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+47
    j  org.mortbay.jetty.handler.ContextHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+700
    j  org.mortbay.jetty.handler.ContextHandlerCollection.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+272
    j  org.mortbay.jetty.handler.HandlerWrapper.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+23
    j  org.mortbay.jetty.Server.handle(Lorg/mortbay/jetty/HttpConnection;)V+110
    j  org.mortbay.jetty.HttpConnection.handleRequest()V+131
    J  org.mortbay.jetty.HttpParser.parseNext()J
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.mortbay.jetty.HttpParser.parseAvailable()J+1
    j  org.mortbay.jetty.HttpConnection.handle()V+122
    j  org.mortbay.jetty.bio.SocketConnector$Connection.run()V+130
    j  org.mortbay.jetty.security.SslSocketConnector$SslConnection.run()V+51
    j  org.mortbay.thread.BoundedThreadPool$PoolThread.run()V+45
    v  ~StubRoutines::call_stub
    V  [jvm.dll+0x875dd]
    V  [jvm.dll+0xdfd96]
    V  [jvm.dll+0x874ae]
    V  [jvm.dll+0x8720b]
    V  [jvm.dll+0xa2089]
    V  [jvm.dll+0x1112e8]
    V  [jvm.dll+0x1112b6]
    C  [MSVCRT.dll+0x2b530]
    C  [kernel32.dll+0x24829]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j  com.a.b.c.lmv.Factoralproducer.MeanManagerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;
    Ljava/lang/Boolean;Lorg/oasis_open/docs/wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lcom/a/b/c/lmv/Factoralproducer/MeanPolicyType;
    Ljavax/xml/datatype/XMLGregorianCalendar;Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+231
    j  com.a.b.c.lmv.Factoralproducer.FactoralProducerImpl.subscribe
    (Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;Lcom/a/b/c/lmv/baseFactoral/TopicExpressionType;
    Ljava/lang/Boolean;Lorg/oasis_open/docs/wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;
    Lorg/oasis_open/docs/
    wsrf/_2004/_06/wsrf_ws_resourceproperties_1_2_draft_01/QueryExpressionType;Lcom/a/b/c/lmv/Factoralproducer
    /MeanPolicyType;Ljavax/xml/datatype/XMLGregorianCalendar;Lcom/a/b/c/lmv/types/ppoToken;)
    Lorg/xmlbp/schemas/ws/_2003/_03/addressing/EndpcntReferenceType;+20
    v  ~StubRoutines::call_stub
    j  sun.reflect.NativeMethodAccepporImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)
    Ljava/lang/Object;+0
    j  sun.reflect.NativeMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87
    J  sun.reflect.DelegatingMethodAccepporImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    J  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Lorg/apache/cxf/message/
    Exchange;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+57
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;
    Ljava/lang/Object;Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+26
    j  org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(Lorg/apache/cxf/message/Exchange;
    Ljava/lang/Object;Ljava/lang/reflect/Method;Ljava/util/List;)Ljava/lang/Object;+179
    j  org.apache.cxf.service.invoker.AbstractInvoker.invoke(Lorg/apache/cxf/message/Exchange;Ljava/lang/Object;)
    Ljava/lang/Object;+114
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run()V+26
    j  org.apache.cxf.workqueue.SynchronousExecutor.execute(Ljava/lang/Runnable;)V+1
    j  org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Lorg/apache/cxf/message/Message;)V+94
    j  org.apache.cxf.phase.PhaseInterceptorChain.dcntercept(Lorg/apache/cxf/message/Message;)Z+76
    j  org.apache.cxf.transport.ChainInitiationObserver.onMessage(Lorg/apache/cxf/message/Message;)V+137
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+334
    j  org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;)V+341
    j  org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+47
    j  org.mortbay.jetty.handler.ContextHandler.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+700
    j  org.mortbay.jetty.handler.ContextHandlerCollection.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+272
    j  org.mortbay.jetty.handler.HandlerWrapper.handle(Ljava/lang/String;Ljavax/servlet/http/HttpServletRequest;
    Ljavax/servlet/http/HttpServletResponse;I)V+23
    j  org.mortbay.jetty.Server.handle(Lorg/mortbay/jetty/HttpConnection;)V+110
    j  org.mortbay.jetty.HttpConnection.handleRequest()V+131
    J  org.mortbay.jetty.HttpParser.parseNext()J
    v  ~RuntimeStub::alignment_frame_return Runtime1 stub
    j  org.mortbay.jetty.HttpParser.parseAvailable()J+1
    j  org.mortbay.jetty.HttpConnection.handle()V+122
    j  org.mortbay.jetty.bio.SocketConnector$Connection.run()V+130
    j  org.mortbay.jetty.security.SslSocketConnector$SslConnection.run()V+51
    j  org.mortbay.thread.BoundedThreadPool$PoolThread.run()V+45
    v  ~StubRoutines::call_stub
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x0aa2d9f8 JavaThread "RMI RenewClean-[47.166.94.29:3617]" daemon [_thread_in_native, id=4792]
    =>0x0aa1eaa0 JavaThread "btpool0-5" [_thread_in_native, id=4420]
      0x0aa1c450 JavaThread "btpool0-4" [_thread_in_native, id=4600]
      0x0aa574d0 JavaThread "btpool0-3" [_thread_in_native, id=3456]
      0x0aa61c60 JavaThread "RMI ConnectionExpiration-[localhost:8099]" daemon [_thread_blocked, id=5060]
      0x0aa44988 JavaThread "btpool0-2" [_thread_in_native, id=3956]
      0x0aa2f270 JavaThread "RMI LeaseChecker" daemon [_thread_blocked, id=4640]
      0x0aa2e668 JavaThread "RMI TCP Connection(1)-47.166.94.29" daemon [_thread_in_native, id=1600]
      0x0aa40d48 JavaThread "RMI Reaper" [_thread_blocked, id=4696]
      0x0b20ae68 JavaThread "Timer-0" daemon [_thread_blocked, id=4688]
      0x0aa294f8 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=4884]
      0x0aa29680 JavaThread "RMI ConnectionExpiration-[47.166.94.29:4375]" daemon [_thread_blocked, id=4860]
      0x0abfe318 JavaThread "btpool0-1" [_thread_in_native, id=716]
      0x0ac2b1f0 JavaThread "GC Daemon" daemon [_thread_blocked, id=3588]
      0x0ac26730 JavaThread "RMI RenewClean-[47.166.94.29:4375]" daemon [_thread_blocked, id=1820]
      0x0ab92d70 JavaThread "btpool1-0 - Acceptor0 [email protected]:9082" [_thread_in_native, id=3168]
      0x0b162be0 JavaThread "btpool0-0 - Acceptor0 [email protected]:9080" [_thread_in_native, id=5856]
      0x0b0e7a18 JavaThread "RMManager-Timer-12388840" daemon [_thread_blocked, id=4328]
      0x00035088 JavaThread "DestroyJavaVM" [_thread_blocked, id=4780]
      0x0afc6460 JavaThread "Thread-1" [_thread_blocked, id=440]
      0x0afd6768 JavaThread "Thread-0" daemon [_thread_blocked, id=4840]
      0x00814cc8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3076]
      0x00813950 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3248]
      0x00812cc8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=5140]
      0x00809bf8 JavaThread "Finalizer" daemon [_thread_blocked, id=3704]
      0x00808780 JavaThread "Reference Handler" daemon [_thread_blocked, id=5196]
    Other Threads:
      0x00804530 VMThread [id=736]
      0x00816058 WatcherThread [id=4436]
    VM state:not at safepcnt (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation   total 1984K, used 1897K [0x02850000, 0x02a70000, 0x02d30000)
    *eden space 1792K,  95% used [0x02850000, 0x029fa418, 0x02a10000)*
    * from space 192K, 100% used [0x02a40000, 0x02a70000, 0x02a70000)*
      to   space 192K,   0% used [0x02a10000, 0x02a10000, 0x02a40000)
    tenured generation   total 25896K, used 18178K [0x02d30000, 0x0467a000, 0x06850000)
       the space 25896K,  70% used [0x02d30000, 0x03ef0b60, 0x03ef0c00, 0x0467a000)
    compacting perm gen  total 22784K, used 22721K [0x06850000, 0x07e90000, 0x0a850000)
      * the space 22784K,  99% used [0x06850000, 0x07e806c8, 0x07e80800, 0x07e90000)*
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040d000      D:\apps\Java\jre1.5.0_14\bin\java.exe
    0x7c800000 - 0x7c8c0000      C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000      C:\WINDOWS\system32\kernel32.dll
    0x77f50000 - 0x77feb000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000      C:\WINDOWS\system32\RPCRT4.dll
    0x76f50000 - 0x76f63000      C:\WINDOWS\system32\Secur32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\system32\MSVCRT.dll
    0x6d640000 - 0x6d7de000      D:\apps\Java\jre1.5.0_14\bin\client\jvm.dll
    0x77380000 - 0x77411000      C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000      C:\WINDOWS\system32\GDI32.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x71bc0000 - 0x71bc8000      C:\WINDOWS\system32\rdpsnd.dll
    0x771f0000 - 0x77201000      C:\WINDOWS\system32\WINSTA.dll
    0x71c40000 - 0x71c97000      C:\WINDOWS\system32\NETAPI32.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d290000 - 0x6d298000      D:\apps\Java\jre1.5.0_14\bin\hpi.dll
    0x6d610000 - 0x6d61c000      D:\apps\Java\jre1.5.0_14\bin\verify.dll
    0x6d310000 - 0x6d32d000      D:\apps\Java\jre1.5.0_14\bin\java.dll
    0x6d630000 - 0x6d63f000      D:\apps\Java\jre1.5.0_14\bin\zip.dll
    0x68000000 - 0x68035000      C:\WINDOWS\system32\rsaenh.dll
    0x7c8d0000 - 0x7d0cf000      C:\WINDOWS\system32\SHELL32.dll
    0x77da0000 - 0x77df2000      C:\WINDOWS\system32\SHLWAPI.dll
    0x77420000 - 0x77523000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls
                                           _6595b64144ccf1df_6.0.3790.3959_x-ww_D8713E55\comctl32.dll
    0x6d4d0000 - 0x6d4e3000      D:\apps\Java\jre1.5.0_14\bin\net.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71b20000 - 0x71b61000      C:\WINDOWS\System32\mswsock.dll
    0x76ed0000 - 0x76efa000      C:\WINDOWS\system32\DNSAPI.dll
    0x76f70000 - 0x76f77000      C:\WINDOWS\System32\winrnr.dll
    0x76f10000 - 0x76f3e000      C:\WINDOWS\system32\WLDAP32.dll
    0x76f80000 - 0x76f85000      C:\WINDOWS\system32\rasadhlp.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x6d4f0000 - 0x6d4f9000      D:\apps\Java\jre1.5.0_14\bin\nio.dll
    0x6d5f0000 - 0x6d5f6000      D:\apps\Java\jre1.5.0_14\bin\rmi.dll
    0x10000000 - 0x10006000      C:\Program Files\a\lmv\punix.dll
    0x71f50000 - 0x71f58000      C:\WINDOWS\system32\snmpapi.dll
    0x0bb90000 - 0x0bb98000      C:\Program Files\a\lmv\periwin.dll
    0x0bba0000 - 0x0bbab000      C:\Program Files\a\lmv\vas.dll
    0x0bbb0000 - 0x0bbd0000      C:\Program Files\a\lmv\nilm.dll
    0x48890000 - 0x488cd000      C:\WINDOWS\system32\ODBC32.dll
    0x77530000 - 0x775c7000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls
                                            _6595b64144ccf1df_5.82.3790.3959_x-ww_78FCF8D0\COMCTL32.dll
    0x762b0000 - 0x762f9000      C:\WINDOWS\system32\comdlg32.dll
    0x76cf0000 - 0x76d0a000      C:\WINDOWS\system32\iphlpapi.dll
    0x7f010000 - 0x7f134000      C:\WINDOWS\system32\MFC42u.DLL
    0x77670000 - 0x777a9000      C:\WINDOWS\system32\ole32.dll
    0x77d00000 - 0x77d8b000      C:\WINDOWS\system32\OLEAUT32.dll
    0x77210000 - 0x772bb000      C:\WINDOWS\system32\WININET.dll
    0x761b0000 - 0x76243000      C:\WINDOWS\system32\CRYPT32.dll
    0x76190000 - 0x761a2000      C:\WINDOWS\system32\MSASN1.dll
    0x71bb0000 - 0x71bb9000      C:\WINDOWS\system32\WSOCK32.dll
    0x0bda0000 - 0x0bdb7000      C:\WINDOWS\system32\odbcint.dll
    0x0bf20000 - 0x0bf61000      C:\Program Files\a\lmv\JniLib.dll
    0x76cd0000 - 0x76ce9000      C:\WINDOWS\system32\MPRAPI.dll
    0x76df0000 - 0x76e24000      C:\WINDOWS\system32\ACTIVEDS.dll
    0x76dc0000 - 0x76de8000      C:\WINDOWS\system32\adsldpc.dll
    0x76b80000 - 0x76bae000      C:\WINDOWS\system32\credui.dll
    0x76a80000 - 0x76a98000      C:\WINDOWS\system32\ATL.DLL
    0x76e30000 - 0x76e3c000      C:\WINDOWS\system32\rtutils.dll
    0x7e020000 - 0x7e02f000      C:\WINDOWS\system32\SAMLIB.dll
    0x770e0000 - 0x771e8000      C:\WINDOWS\system32\SETUPAPI.dll
    0x77840000 - 0x77882000      C:\WINDOWS\system32\netman.dll
    0x76300000 - 0x764c0000      C:\WINDOWS\system32\netshell.dll
    0x74de0000 - 0x74df2000      C:\WINDOWS\system32\CLUSAPI.dll
    0x76e90000 - 0x76ecf000      C:\WINDOWS\system32\RASAPI32.dll
    0x76e40000 - 0x76e52000      C:\WINDOWS\system32\rasman.dll
    0x76e60000 - 0x76e8f000      C:\WINDOWS\system32\TAPI32.dll
    0x7fcf0000 - 0x7fd7e000      C:\WINDOWS\system32\WZCSvc.DLL
    0x76cc0000 - 0x76cc5000      C:\WINDOWS\system32\WMI.dll
    0x76d10000 - 0x76d2f000      C:\WINDOWS\system32\DHCPCSVC.DLL
    0x76f00000 - 0x76f08000      C:\WINDOWS\system32\WTSAPI32.dll
    0x4b180000 - 0x4b284000      C:\WINDOWS\system32\ESENT.dll
    0x730a0000 - 0x730ae000      C:\WINDOWS\system32\WZCSAPI.DLL
    VM Arguments:
    java_command: C:\Program Files\a\lmv\CDF\b_c_lmv.jar C:\Program Files\a\lmv\CDF
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=D:\a\Contact Center\Common Components\Cache\lib
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;
    C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Rational\common;
    C:\a\Cache\CacheSys\Mgr\a\DLL;C:\Program Files\a\lmv\TAPI;C:\Program Files\a\lmv\
    OS=Windows_NT
    PROCEppoR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
    ---------------  S Y S T E M  ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 2
    CPU:total 4 (cores per cpu 4, threads per core 1) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 2097151k(2097151k free), swap 4194303k(3537076k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_14-b03) for windows-x86, built on Oct  5 2007 01:21:52 by "java_re" with MS VC++ 6.0
    {code}
    Sorry it's so long.
    Anyways my dll is Jni_interface.dll. It loads legacy.dll, and its dependents. Other code also uses these libraries.
    *So question 1* :
    I load the jni_interface.dll (and also the legacy.dll and its dependents) library at the start of execution in a static class and so it is never unloaded. I do this because the legacy.dll will be calling functions in my Jni_Interface.dll, which are propagated into the Java class on top of it all. Does this stop other code from loading the legacy.dll or from using its functionality?
    *On to question 2*:
    Here is the logged output from my library, immediately before the crash:
    {code:java}
          ***     JNI INTERFACE LIB - LOG 21 Jul 08 19:11:35.682     *** Log Level = DEBUG
    21 Jul 08 19:11:35.698 - Level[ info ] -          Thread[ 716 ]     :: initRegistry     Registry initialisation ok
    21 Jul 08 19:11:35.760 - Level[ info ] -          Thread[ 716 ]     :: vPersistData     vPersistData() called
    21 Jul 08 19:11:35.823 - Level[ debug ] -     Thread[ 716 ]     :: doVoidCallback() [ persistDataHandler ]       Signature  = (I)V
    21 Jul 08 19:11:35.823 - Level[ debug ] -     Thread[ 716 ]     :: doVoidCallback() [ setMaxUsageHandler ]       Signature  = (I)V
    21 Jul 08 19:11:35.838 - Level[ info ] -          Thread[ 716 ]     :: Constructor     _instance is instantiated
    21 Jul 08 19:11:35.838 - Level[ info ] -          Thread[ 716 ]     :: initiateLegacy()     JniManager initialisation successful
    21 Jul 08 19:11:35.838 - Level[ info ] -          Thread[ 716 ]     :: initiateLegacy()     Initial state is NORMAL
    21 Jul 08 19:11:35.838 - Level[ debug ] -     Thread[ 716 ]     :: getLicense()     Get request
    21 Jul 08 19:11:36.010 - Level[ debug ] -     Thread[ 716 ]     :: getLicense()     Get request
    {code}
    Now notice that the current thread in the Hotspot output is NOT the thread in my library. Thread 716 is a java thread by the way. This log appears absolutely fine according to me. Also note that in the hotspot log there is no mention of my java component  (the "boss" class), which is called LegacyLM. So does that mean that is in not to do with my code even though the problem only occurs when my component is included? Or is this just the cryptic nature of these problems?
    *Question 3*:
    If you see the heap section of the report, there are 3 items that I have highlighted that seem like very high values. Is this a possible cause of a crash? Or would I have received an "Out of space" error instead?
    In terms of actual code, I cannot post much, but I can tell you what I have done to try to solve the problem:
    (i) I have added mutex synchronisation to most of my shared variables.
    (ii) I have used monitorEnter and MonitorExit to control callback access to my java class.
    (iii) I have re-organised my code and replaced nearly every occurance of non-string character arrays with string equivalents.
    (iv) I changed how I attach and detach my threads so that I only attach/detach ones that previously were not (i.e. I leave java threads alone)
    As I said at the start, I am utterly confused and I don't have much of an idea about how to proceed. I'd really really appreciate a pointer or two.
    Thanks in advance.
    D
    Edited by: Diom1982 on Jul 21, 2008 12:35 PM
    Edited by: Diom1982 on Jul 21, 2008 12:40 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    For those of you who might be interested, I found a solution to this problem (my version, at least). In my situation, this was caused by attempting to access the fields of a ActionEvent object in VC++ by casting a variant to a BSTR. While the cast "worked", it somehow caused the state of the Java plugin or the AxBridge DLL to get flummoxed, causing the VM dump far downstream.
    The takehome message?
    When seeing problems like this in the plugin / ActiveX bridge, do not assume that the causative error is occuring in the location noted in the stack trace. Visual C++, in all of its gory unprotected glory, gives full memory access to the DLL interface and you can do a serious fandango on the VM core. that won't necessarily bite you until later.
    PS -- Sun gurus ... does this present a security violation in the Java paradigm?

Maybe you are looking for

  • ICal and iPod Touch won't synch

    I have an iPod Touch (OS 4.0) that I had been synching with my iCal (4.0) through iTunes (9.2.1) on my Mac (OS X 10.6.4). I am the only user of all of these. I have 5 calendars in iCal. Several problems have started occurring (many months after purch

  • Display Z reports in Portal

    Hi All, My requirement is to Display a Custom Report in Portal. This Report is developed in Abap. Since I am new to this portal thing I can think of only 1 idea to display these reports in Portal by creating transactional iViews . But In HTML transac

  • How to declare a variable in Custom column formula?

    I'm adding a new column and I have a formula like it: if Text.Length(Text.Replace(Text.Replace([Text], "-", ""), " ", "") ) = 4 then "CB0" & Text.Range(Text.Replace(Text.Replace([Text], "-", ""), " ", "") , 2) else Text.Replace(Text.Replace([Text], "

  • Is oil - best practice  documents or test cases

    hi i have got new project , and that is a oil and gas  IS solution project. i want to learn oil and gas from scratch. can any body help me in understanding this project. did any body got any test case or blue print documents of any test case ?  actua

  • Variables & Processing Types

    Hi, I am looking for variables & Processing types.Could any one guide me on Variables & Processing types in BI 7.0. Thanks in advance! Regards, Vijji