[ERROR] CThread::staticThread : Access violation

Requests, suggestions, support, and everything else python / plugin related.
Post Reply
User avatar
Dom DXecutioner
Posts: 587
Joined: Thu Jul 05, 2012 11:59 pm
Location: California
Has thanked: 249 times
Been thanked: 226 times
Contact:

[ERROR] CThread::staticThread : Access violation

Post by Dom DXecutioner »

Hopefully someone can assist with this rather annoying error...

I'm attempting to read an XML file and manipulate it via BeautifulSoup; however, when I try it I get the following error:

Code: Select all

20:20:50 T:2804 M:1472647168   ERROR: CThread::staticThread : Access violation at 0x774a224d: Writing location 0x00000014
The target file path and name is e:/cache/92240a58/466b23e2.xml

The code is as follows:

Code: Select all

		# this code works fine
		xml_file = open( os.path.join( BASE_DIR, XML_FILE ) )
		xml_data = open( xml_file, "r" ).read()
		file_target_name = beatifulSoup.element.someTag
		file_target = os.path.join( BASE_DIR, file_target_name )

		# this code crashes xbmc
		file_data = open( file_target, "r" ).read()
The interesting thing is that if I declare this as a regular variable, i.e.:

Code: Select all

		filePath = "e:cache/92240a58/466b23e2.xml"
		file_data = open( filePath, "r" ).read()
Then the file is fetched and parse properly; furthermoe, if I give it the direct path, i.e.:

Code: Select all

		file_data = open( "e:cache/92240a58/466b23e2.xml", "r" ).read()
This will also fetch the path and parse the information correctly! WTF!!! :evil:

I've tested and checked, then double checked that the path is the very same but it continues to freeze and crash... any ideas?

On an unrelated subject... why do we not have a Python Plugins & Script section in the Development forum? Yeah, yeah, perhaps we don't many devs, but it would still make sense to have one... i'm just saying! :D

:geek:
Image
User avatar
Dan Dar3
Posts: 1176
Joined: Sun Jul 08, 2012 4:09 pm
Has thanked: 273 times
Been thanked: 257 times
Contact:

Re: [ERROR] CThread::staticThread : Access violation

Post by Dan Dar3 »

Is it because you're opening a file object? the compressed version of what you wrote would be:

xml_data = open( open( os.path.join( BASE_DIR, XML_FILE ) ), "r" ).read()
User avatar
BuZz
Site Admin
Posts: 1891
Joined: Wed Jul 04, 2012 12:50 am
Location: UK
Has thanked: 66 times
Been thanked: 423 times
Contact:

Re: [ERROR] CThread::staticThread : Access violation

Post by BuZz »

does it occur with older versions of xbmc4xbox ? would be nice to track this down to a commit for example if it was broken in recent years. regarding the forum section, just use the main dev section.
Post Reply