Coder Social home page Coder Social logo

hllib's People

Contributors

mark-grimes avatar rupan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hllib's Issues

[C# Wrapper] Formatted HLLib.hlGetString returns ExecutionEngineException

Calling hlGetString with HLOption.HL_ERROR_SHORT_FORMATED or HLOption.HL_ERROR_LONG_FORMATED

Will return:
ExecutionEngineException: String conversion error: Partial byte sequence encountered in the input.

image
image

I manually checked what the error was myself. And it was something about not being able to find the file. Nothing big

v17-v18 BSP (HL2 Beta) crashes HLLib

Opening v17 BSP will crash GCFScape (which uses HLLib). This is a huge deal because it means the embedded contents of a map cant be seen.

-Getting package type from memory works (returns HL_PACKAGE_VBSP)
-Creating package works (returns true)
-Opening causes a crash

Received signal SIGSEGV
Stack trace:
0x00000257ac970300 (HLLib.x64) HLLib::CPackage::Close
0x00000257ac9701e5 (HLLib.x64) HLLib::CPackage::Open
0x00000257ac957503 (Mono JIT Code) (wrapper managed-to-native) HLLib/x64:hlPackageOpenMemory (intptr,uint,uint)
0x00000257ac95745b (Mono JIT Code) HLLib:hlPackageOpenMemory (intptr,uint,uint)
0x00000257ac95729b (Mono JIT Code) S2U.SourcePackageMemory:Open ()
0x00000257ac956e58 (Mono JIT Code) S2U.BaseSourcePackageFile:EndMount ()
0x00000257ac9560db (Mono JIT Code) S2U.SourcePackageMemory:Mount (byte[])
0x00000257ac9531bb (Mono JIT Code) S2U.SourceBSPLoader:Load (string,S2U.BSPLoadSettings)
0x00000257ac952b93 (Mono JIT Code) S2U.Test:Load ()`

The above stacktrace is from my Unity application, but this does not make a difference here because GCFScape also uses HLLib and gets a crash from these map files.

A quick Google search tells me that SIGSEGV means it tried to access memory it shouldn't?

The header file of v17 BSP can be found here: https://github.com/Clepoy3/LeakNet/blob/master/public/bspfile.h

Add a new file to a package?

Hi, I am trying to figure out how to add a new file to a package. hlPackageOpenFile() returns 0 if the file does not already exist:

int WriteStream(Package* pak, wchar_t* path, void* data, uint64_t sz)
{
	hlBindPackage(pak->hlpak);
	auto s = String(path);
	if (not hlPackageOpenFile(s.c_str(), HL_MODE_WRITE)) return 0;
	auto root = hlPackageGetRoot();
	auto item = hlFolderGetItemByPath(root, s.c_str(), HL_FIND_ALL);
	HLStream* stream;
	hlPackageCreateStream(item, &stream);
	hlStreamWrite(stream, data, sz);
	hlStreamClose(stream);
	pak->modified = true;
	return 1;
}

Is it possible to use HLLib to add a new file to the package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.