You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Anthony <ha...@gmail.com> on 2020/02/06 21:21:45 UTC

Need help for Access Violation

Hello,

I am new to ignite C++. I am using windows 10, VS community.

I keep getting Access Violation when I am trying to run the following code.

#include<iostream>
#include<ignite/ignition.h>
using namespace ignite;

int main() {
IgniteConfiguration cfg;
Ignite node = Ignition::Start(cfg);
std::cout << "node started" << std::endl;
return 0;
}

Can anyone help with that?

The error was generated from:

std::string NormalizeClasspath(const std::string& usrCp)
        {
            if (usrCp.empty() || *usrCp.rbegin() == ';')
                return usrCp;

            return usrCp + ';';
        }
Following are the error messages:

Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in Project1.exe:
0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. occurred

Thank you !!

Re: Need help for Access Violation

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Since it is Windows (build once, run everywhere no sh!t), maybe you can
just share the compiled project with general public, or just the .exe?

We could try running it, see if it fails. BTW, did you try to run it on a
different box?

Regards,
-- 
Ilya Kasnacheev


пт, 7 февр. 2020 г. в 00:22, Anthony <ha...@gmail.com>:

> Hello,
>
> I am new to ignite C++. I am using windows 10, VS community.
>
> I keep getting Access Violation when I am trying to run the following code.
>
> #include<iostream>
> #include<ignite/ignition.h>
> using namespace ignite;
>
> int main() {
> IgniteConfiguration cfg;
> Ignite node = Ignition::Start(cfg);
> std::cout << "node started" << std::endl;
> return 0;
> }
>
> Can anyone help with that?
>
> The error was generated from:
>
> std::string NormalizeClasspath(const std::string& usrCp)
>         {
>             if (usrCp.empty() || *usrCp.rbegin() == ';')
>                 return usrCp;
>
>             return usrCp + ';';
>         }
> Following are the error messages:
>
> Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in Project1.exe:
> 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. occurred
>
> Thank you !!
>

Re: Need help for Access Violation

Posted by Igor Sapego <is...@apache.org>.
No, they are not.

Honestly, I'm running out of ideas as I can not reproduce the issue
and thus can not debug it. It actually looks like some kind of memory
corruption. Are you sure that the issue can be reproduced with the
code snippet you've provided?

Best Regards,
Igor


On Tue, Feb 11, 2020 at 12:40 AM Anthony <ha...@gmail.com> wrote:

> Yes. I was using MSVC for both of them.
>
> BTW, are the project odbc and thin-client in the ignite needed? I did not
> build them because of some compiling issues.
>
> On Mon, Feb 10, 2020 at 5:54 AM Igor Sapego <is...@apache.org> wrote:
>
>> The issue looks very weird to me. Have you compiled the Ignite
>> libs using the same compiler as you use in your project?
>>
>> Best Regards,
>> Igor
>>
>>
>> On Fri, Feb 7, 2020 at 7:39 PM Anthony <ha...@gmail.com> wrote:
>>
>>> Hello,
>>> The "usrCp" value is
>>> NameValueType
>>> ▶ usrCp <Error reading characters of string.> const std::string &
>>> Seems that the "cfg.jvmClassPath" was not set properly?
>>>
>>> I am not familiar with java environment, should i set some environmental
>>> variable?
>>>
>>> Thank you!
>>>
>>> Anthony
>>>
>>> On Fri, Feb 7, 2020 at 5:20 AM Igor Sapego <is...@apache.org> wrote:
>>>
>>>> Hi
>>>>
>>>> And what is the value of "usrCp" argument?
>>>> For me the code works just fine.
>>>>
>>>> Best Regards,
>>>> Igor
>>>>
>>>>
>>>> On Fri, Feb 7, 2020 at 12:22 AM Anthony <ha...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I am new to ignite C++. I am using windows 10, VS community.
>>>>>
>>>>> I keep getting Access Violation when I am trying to run the following
>>>>> code.
>>>>>
>>>>> #include<iostream>
>>>>> #include<ignite/ignition.h>
>>>>> using namespace ignite;
>>>>>
>>>>> int main() {
>>>>> IgniteConfiguration cfg;
>>>>> Ignite node = Ignition::Start(cfg);
>>>>> std::cout << "node started" << std::endl;
>>>>> return 0;
>>>>> }
>>>>>
>>>>> Can anyone help with that?
>>>>>
>>>>> The error was generated from:
>>>>>
>>>>> std::string NormalizeClasspath(const std::string& usrCp)
>>>>>         {
>>>>>             if (usrCp.empty() || *usrCp.rbegin() == ';')
>>>>>                 return usrCp;
>>>>>
>>>>>             return usrCp + ';';
>>>>>         }
>>>>> Following are the error messages:
>>>>>
>>>>> Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in
>>>>> Project1.exe: 0xC0000005: Access violation reading location
>>>>> 0xFFFFFFFFFFFFFFFF. occurred
>>>>>
>>>>> Thank you !!
>>>>>
>>>>

Re: Need help for Access Violation

Posted by Anthony <ha...@gmail.com>.
Yes. I was using MSVC for both of them.

BTW, are the project odbc and thin-client in the ignite needed? I did not
build them because of some compiling issues.

On Mon, Feb 10, 2020 at 5:54 AM Igor Sapego <is...@apache.org> wrote:

> The issue looks very weird to me. Have you compiled the Ignite
> libs using the same compiler as you use in your project?
>
> Best Regards,
> Igor
>
>
> On Fri, Feb 7, 2020 at 7:39 PM Anthony <ha...@gmail.com> wrote:
>
>> Hello,
>> The "usrCp" value is
>> NameValueType
>> ▶ usrCp <Error reading characters of string.> const std::string &
>> Seems that the "cfg.jvmClassPath" was not set properly?
>>
>> I am not familiar with java environment, should i set some environmental
>> variable?
>>
>> Thank you!
>>
>> Anthony
>>
>> On Fri, Feb 7, 2020 at 5:20 AM Igor Sapego <is...@apache.org> wrote:
>>
>>> Hi
>>>
>>> And what is the value of "usrCp" argument?
>>> For me the code works just fine.
>>>
>>> Best Regards,
>>> Igor
>>>
>>>
>>> On Fri, Feb 7, 2020 at 12:22 AM Anthony <ha...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am new to ignite C++. I am using windows 10, VS community.
>>>>
>>>> I keep getting Access Violation when I am trying to run the following
>>>> code.
>>>>
>>>> #include<iostream>
>>>> #include<ignite/ignition.h>
>>>> using namespace ignite;
>>>>
>>>> int main() {
>>>> IgniteConfiguration cfg;
>>>> Ignite node = Ignition::Start(cfg);
>>>> std::cout << "node started" << std::endl;
>>>> return 0;
>>>> }
>>>>
>>>> Can anyone help with that?
>>>>
>>>> The error was generated from:
>>>>
>>>> std::string NormalizeClasspath(const std::string& usrCp)
>>>>         {
>>>>             if (usrCp.empty() || *usrCp.rbegin() == ';')
>>>>                 return usrCp;
>>>>
>>>>             return usrCp + ';';
>>>>         }
>>>> Following are the error messages:
>>>>
>>>> Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in
>>>> Project1.exe: 0xC0000005: Access violation reading location
>>>> 0xFFFFFFFFFFFFFFFF. occurred
>>>>
>>>> Thank you !!
>>>>
>>>

Re: Need help for Access Violation

Posted by Igor Sapego <is...@apache.org>.
The issue looks very weird to me. Have you compiled the Ignite
libs using the same compiler as you use in your project?

Best Regards,
Igor


On Fri, Feb 7, 2020 at 7:39 PM Anthony <ha...@gmail.com> wrote:

> Hello,
> The "usrCp" value is
> NameValueType
> ▶ usrCp <Error reading characters of string.> const std::string &
> Seems that the "cfg.jvmClassPath" was not set properly?
>
> I am not familiar with java environment, should i set some environmental
> variable?
>
> Thank you!
>
> Anthony
>
> On Fri, Feb 7, 2020 at 5:20 AM Igor Sapego <is...@apache.org> wrote:
>
>> Hi
>>
>> And what is the value of "usrCp" argument?
>> For me the code works just fine.
>>
>> Best Regards,
>> Igor
>>
>>
>> On Fri, Feb 7, 2020 at 12:22 AM Anthony <ha...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am new to ignite C++. I am using windows 10, VS community.
>>>
>>> I keep getting Access Violation when I am trying to run the following
>>> code.
>>>
>>> #include<iostream>
>>> #include<ignite/ignition.h>
>>> using namespace ignite;
>>>
>>> int main() {
>>> IgniteConfiguration cfg;
>>> Ignite node = Ignition::Start(cfg);
>>> std::cout << "node started" << std::endl;
>>> return 0;
>>> }
>>>
>>> Can anyone help with that?
>>>
>>> The error was generated from:
>>>
>>> std::string NormalizeClasspath(const std::string& usrCp)
>>>         {
>>>             if (usrCp.empty() || *usrCp.rbegin() == ';')
>>>                 return usrCp;
>>>
>>>             return usrCp + ';';
>>>         }
>>> Following are the error messages:
>>>
>>> Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in Project1.exe:
>>> 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. occurred
>>>
>>> Thank you !!
>>>
>>

Re: Need help for Access Violation

Posted by Anthony <ha...@gmail.com>.
Hello,
The "usrCp" value is
NameValueType
▶ usrCp <Error reading characters of string.> const std::string &
Seems that the "cfg.jvmClassPath" was not set properly?

I am not familiar with java environment, should i set some environmental
variable?

Thank you!

Anthony

On Fri, Feb 7, 2020 at 5:20 AM Igor Sapego <is...@apache.org> wrote:

> Hi
>
> And what is the value of "usrCp" argument?
> For me the code works just fine.
>
> Best Regards,
> Igor
>
>
> On Fri, Feb 7, 2020 at 12:22 AM Anthony <ha...@gmail.com> wrote:
>
>> Hello,
>>
>> I am new to ignite C++. I am using windows 10, VS community.
>>
>> I keep getting Access Violation when I am trying to run the following
>> code.
>>
>> #include<iostream>
>> #include<ignite/ignition.h>
>> using namespace ignite;
>>
>> int main() {
>> IgniteConfiguration cfg;
>> Ignite node = Ignition::Start(cfg);
>> std::cout << "node started" << std::endl;
>> return 0;
>> }
>>
>> Can anyone help with that?
>>
>> The error was generated from:
>>
>> std::string NormalizeClasspath(const std::string& usrCp)
>>         {
>>             if (usrCp.empty() || *usrCp.rbegin() == ';')
>>                 return usrCp;
>>
>>             return usrCp + ';';
>>         }
>> Following are the error messages:
>>
>> Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in Project1.exe:
>> 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. occurred
>>
>> Thank you !!
>>
>

Re: Need help for Access Violation

Posted by Igor Sapego <is...@apache.org>.
Hi

And what is the value of "usrCp" argument?
For me the code works just fine.

Best Regards,
Igor


On Fri, Feb 7, 2020 at 12:22 AM Anthony <ha...@gmail.com> wrote:

> Hello,
>
> I am new to ignite C++. I am using windows 10, VS community.
>
> I keep getting Access Violation when I am trying to run the following code.
>
> #include<iostream>
> #include<ignite/ignition.h>
> using namespace ignite;
>
> int main() {
> IgniteConfiguration cfg;
> Ignite node = Ignition::Start(cfg);
> std::cout << "node started" << std::endl;
> return 0;
> }
>
> Can anyone help with that?
>
> The error was generated from:
>
> std::string NormalizeClasspath(const std::string& usrCp)
>         {
>             if (usrCp.empty() || *usrCp.rbegin() == ';')
>                 return usrCp;
>
>             return usrCp + ';';
>         }
> Following are the error messages:
>
> Exception thrown at 0x00007FFBADD635D6 (ignite.jni.dll) in Project1.exe:
> 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. occurred
>
> Thank you !!
>