Struck with "Invadid memory access"

Just starting out? Need help? Post your questions and find answers here.
buzzqw
Enthusiast
Enthusiast
Posts: 116
Joined: Sat Aug 27, 2005 10:13 pm
Location: Italy
Contact:

Struck with "Invadid memory access"

Post by buzzqw »

hi all

i have some problem with "invalid memory access"

with previus version of pb 4.30 beta i don't have this error

but with official 4.30 (win 32bit) i am stuck :(

i don't ask to debug the ugly spaghetti code, it's my first program, started over two years ago.., now i code better :p

please download the source package
http://www.64k.it/andres/data/a/automkv_debug.zip

load automkv.pb
active the debugger
compile it

click OK on Tips message

click "!!!" button at right side of "Audio Track 1" frame gadget, just at right of audio codec list
Image

if you think that errors is due to ugly code, well.. it's probably, but any further help is apprecited

BHH

P.S. don't try to encode/open files, the package linked it's a very trimmed one's
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

I can't test your program but i think if you put a:

Code: Select all

CloseWindow(#window0)
at the end of code the ima i gone :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
buzzqw
Enthusiast
Enthusiast
Posts: 116
Joined: Sat Aug 27, 2005 10:13 pm
Location: Italy
Contact:

Post by buzzqw »

sorry ts-soft but i don't understud your suggestion

why i should close my main window ?

BHH
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

In 'automkv_Common.pb', Line 1374 you have a 'CloseGadgetList()' which does not belong there.
You are closing the gadgetlist of the PanelGadget, but then you add more gadgets to it right after.

Since 4.30, you can only call AddGadgetItem() on a PanelGadget if its gadgetlist is open. Previous versions were more relaxed on this issue.
I will try to add a debugger message to easier spot this kind of error.
quidquid Latine dictum sit altum videtur
buzzqw
Enthusiast
Enthusiast
Posts: 116
Joined: Sat Aug 27, 2005 10:13 pm
Location: Italy
Contact:

Post by buzzqw »

GREAT!!!!!!!!!!!!!!!!

THANKS A LOT freak!

BHH
Post Reply