-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Re-Allocation Denied #58
Comments
After some more testing, I was able to find get a card that always causes the issue, I'm not sure why these specific GW entries cause it to fail though, nothing seems obviously incorrect to me. It's specifically the combination of the two GWs, individually they load fine.
|
It also only starts to fail when GW 2 Segments are >=13, if that helps |
I have not yet looked in detail, but typically these crashes are related to GW line intersections that do not me at a segment vertex, or lines that overlap at least partially. Is this possible? (Assume floating point error is connected or overlapping within 1e-6.) |
fyi, crash was "fixed" via work-around in unreleased b085ded . The real issue is segment distance problems. These warnings are not yet committed (soon!), but I have tested them on the file that you gave me in this is what I see: [warn] Tag 2 segment 44 length 2.614e-05 is too short compared to tag 1 segment 1 length 3.399e-02; These segments are close enough that connection detection issues may occur [warn] tag=2/seg=44: length=2.614e-05 too short (and close enough) compared to tag=1/seg=1 length=3.399e-02; connection detection may fail |
Add comprehensive geometry validation that checks: 1. Segment self-connections: - Detects segments that would connect to themselves - Validates endpoint separation distances 2. Segment overlaps: - Checks for unintended segment proximity - Validates segment spacing against connection thresholds - Detects potential unwanted connections 3. Length ratio validation: - Verifies relative segment lengths - Checks for problematic length differences - Validates connection detection with varying lengths 4. Wavelength ratio validation: - Validates segment length vs wavelength (0.001-0.1λ) - Checks high accuracy regions (<0.05λ) - Improves error messages for ratio violations 5. Kernel ratio validation: - Validates length/radius ratios for thin-wire kernels - Standard kernel (2.0-8.0 range) - Extended kernel (0.5-2.0 range) - Maintains accurate 1% error threshold reporting Refactor connection checking in conect(): - Add helper functions for consistent calculations: * calc_manhattan_distance() - fast endpoint distance check * calc_connection_threshold() - segment-specific connection limit * points_would_connect() - unified connection test - Pre-allocate connection buffer based on typical wire geometry (2 connections per segment plus extra for junctions) - Replace repeated distance calculations with helper functions - Consolidate connection logic into reusable functions - Improve readability of connection tests Call validation after reading geometry and show warnings for issues. Fixes #58 Signed-off-by: Eric Wheeler <[email protected]>
Please build the segment-tests branch if you would like to test the additional verifications. |
Thank you! |
When running xnec2c with the xnec2c-gao optimizer I regularly get the error
Memory re-allocation denied in geometry.c
which crashes the application and I unfortunately loose all progress that gao has made.I don't believe this is a problem with xnec2c-gao, it is simply running the command:
xnec2c --optimize -j7 -i [myFile].nec > /dev/null 2>&1
I'm running xnec2c 4.4.16, installed on Manjaro (Arch-based) linux. I'm not sure where else to look to get better logs to debug the issue.
Thank you for any help you can provide!
The text was updated successfully, but these errors were encountered: