Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Memory reference error in Vb.exe


  • Please log in to reply
10 replies to this topic

#1 ana13

ana13

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:04:20 PM

Posted 07 February 2012 - 07:48 AM

Hi,

I am getting the error "The instuction at "0x7c910a19" refrenced memory at "0xffffffff". The memory could not be read" when I exit from the application EXE which is built in VB6.0. I do not get this error when I run the program through Vb environment. Only getting error when I make EXE and run it.

Can somebody help me please with the solution?

Thanks,
Ana

BC AdBot (Login to Remove)

 


#2 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:03:50 AM

Posted 07 February 2012 - 09:05 AM

Any number of things might cause that. Can you post the relevant section of code where the crash occurs?

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#3 ana13

ana13
  • Topic Starter

  • Members
  • 3 posts
  • OFFLINE
  •  
  • Local time:04:20 PM

Posted 07 February 2012 - 09:15 AM

Hi Billy,

I am getting error when i run EX and exit from it. I have placed debugger on terminate and unload of main form. But not able to catch the error. I am not getting error when I run program through VB environment. So not able to catch the exact line of code.

Thanks,
Ana

#4 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:03:50 AM

Posted 07 February 2012 - 09:23 AM

Maybe not the exact line, but we're not going to be able to diagnose a but with just the crashing error message. I suspect being VB6 that you guys losded some kind of COM component and didn't unload it correctly, but I'm not sure.

There are a couple of people here who do (unfortunately) still use VB6; perhaps they'll be able to help with the debugger to run down the problem. (But I can't do that)

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#5 ident

ident

  • Members
  • 109 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Cambridge
  • Local time:06:50 AM

Posted 12 February 2012 - 06:15 PM

ana13 we can't really do much with out viewing your code. I also have the same opinion as billy when it comes to vb6. Why are you still using it? Yes this is an argument that has been discussed god knows how many times on the net. But point still stands. Why?

#6 James Litten

James Litten

    Ԁǝǝ˥q


  • BC Advisor
  • 1,946 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:New Jersey
  • Local time:05:50 AM

Posted 12 February 2012 - 06:40 PM

Hi

Keep in mind that 0xffffffff is not a real memory address since
0xffffffff = -1 (using two's complement)

The last time I saw this with VB6 was quite some time ago but if I remember correctly it had to do with a Windows Media Player control or component in the program. Does your program have anything using WMP in it? If so, you should double check that part of the code.

James

#7 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:03:50 AM

Posted 12 February 2012 - 11:51 PM

James, I don't follow. Memory addresses do not use two's complement.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#8 James Litten

James Litten

    Ԁǝǝ˥q


  • BC Advisor
  • 1,946 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:New Jersey
  • Local time:05:50 AM

Posted 13 February 2012 - 11:35 AM

Right, the error is saying that it referenced an invalid memory address. Not that it literally addressed the memory address at location 0xffffffff .

I have encountered people trying to troubleshoot the problem by searching for what was trying to access memory location 0xffffffff and that does not work :)

James

#9 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:03:50 AM

Posted 13 February 2012 - 11:36 AM

James, trying to access the literal memory location 0xFFFFFFFF would cause an error message like this. I don't see what about looking for the portion of code causing such things would be wrong. Typically such an access might be caused by dereferencing a uninitialized pointer, though I'm not sure how such would happen in VB.

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#10 James Litten

James Litten

    Ԁǝǝ˥q


  • BC Advisor
  • 1,946 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:New Jersey
  • Local time:05:50 AM

Posted 13 February 2012 - 11:49 AM

Right again :)
It doesn't happen in VB, but it is probably what you suggested before...

I suspect being VB6 that you guys losded some kind of COM component and didn't unload it correctly,


and the COM component was probably not written in VB.

A lot of VB6 devs don't go that deep though and look for the error in VB. I guess that was the convoluted point I was trying to make and failed miserably. I apologize for the confusion.

James

#11 James Litten

James Litten

    Ԁǝǝ˥q


  • BC Advisor
  • 1,946 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:New Jersey
  • Local time:05:50 AM

Posted 13 February 2012 - 01:47 PM

I remember seeing this error in a VB6 exe file long ago. I had a little time to dig into my old emails and I think this is what we had come up with (in 2001) but I can't find any documentation supporting it.

What happens is a something (probably a COM object or part of one) gets cleaned up twice on exit and the second time it throws an INVALID_HANDLE_VALUE error. The value of INVALID_HANDLE_VALUE is 0xFFFFFFFF and something in VB6 mistakenly tries to access that INVALID_HANDLE_VALUE value.

Billy is correct that it is possible (if not probable) that it is trying to access 0xFFFFFFFF.

So if that is the case, the program is trying to close and clean up something twice in the regular runtime environment that it is only doing once in the developer environment.

I could be wrong though as I could not find anything online about this in a quick search.

My mistake comes from interpreting 0xFFFFFFFF as -1 in other programming languages :)

James




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users